Line 78: |
Line 78: |
| ** direction.meta.single.var.out: Direction of meta-analysis statistics for single variant test. It may be useful for inspecting if any of the variant in the gene have opposite effects etc. | | ** direction.meta.single.var.out: Direction of meta-analysis statistics for single variant test. It may be useful for inspecting if any of the variant in the gene have opposite effects etc. |
| ** pos.ref.alt.out: Position, reference and alternative alleles for each variant position in the gene | | ** pos.ref.alt.out: Position, reference and alternative alleles for each variant position in the gene |
| + | |
| + | == Performing conditional analysis for single variant tests == |
| + | * We provide functions for performing single variant conditional meta-analysis. For variants within the sliding window, the conditional analysis is exact, in the sense that they are equal to conditional analysis results obtained using individual level data. |
| + | * The following function can be used: |
| + | conditional.rareMETALS.single.basic(candidate.variant,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=0,alternative=c('two.\ |
| + | sided','greater','less'),alpha=0.05,ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,gene.file="refFlat_hg19.txt.gz",p.value.known.v\ |
| + | ariant.vec="N/A",anno.known.variant.vec="N/A",anno.candidate.variant="N/A") |
| + | } |
| + | |
| + | * Input parameters are described below: |
| + | ** candidate variant: the chromosomal position for the candidate variant to be tested, e.g. "1:12345"; |
| + | ** score.stat.file is the vector of file names for single variant score statistics. |
| + | ** cov.file is the vector of files of covariance matrices for single variant score statistics |
| + | ** known.variant.vec is the vector of chromosomal positions for known variants. Examples include c("1:12345","1:1234567"); |
| + | ** alternative specifies alternative hypothesis to be tested. The default is two.sided. |
| + | ** ix.gold is the index to be used for choosing a "gold standard" population, in case flips of alleles are observed, and the gold standard population can be used to correct for the flips |
| + | ** callrate.cutoff specifies the call rate cutoffs that will be used. All sites with call rates lower than the cutoff will be labelled as missing. |
| + | ** hwe.cutoff specifies the cutoffs for call rate, All sites with call rate lower than the cutoff will be labeled as missing. |
| + | ** anno.known.variant.vec: Annotation information for known variant. It is optional. If the annotation is not present, please use "NA". Note that the quotation mark is a must. |
| + | ** anno.candidate.variant: Annotation information for candidate variant. It is optional and can be ignored |
| + | |
| + | * Output is a dataframe that consist of the following fields: |
| + | ** pos.single.out: Chromosomal position for candidate variants |
| + | ** ref.single.out: Referrence allele |
| + | ** alt.single.out: Alternative allele |
| + | ** p.value.single.out: P values |
| + | ** maf.single.out: Minor allele frequencies |
| + | ** beta1.est.single.out: Estimates of alternative allele effects |
| + | ** beta1.sd.single.out: Standard deviation for beta estimates |
| + | ** direction.single.out: Direction of effects |
| + | ** anno.single.out: Annotation information for candidate variants |
| + | ** pos.ref.alt.known.single.out: Position/ref/alt alleles for known variants |
| + | ** p.value.known.single.out: p-values for known variants |
| + | ** anno.known.single.out: annotation for known variants |