https://genome.sph.umich.edu/w/api.php?action=feedcontributions&user=Dajiang+Liu&feedformat=atomGenome Analysis Wiki - User contributions [en]2022-11-30T18:27:44ZUser contributionsMediaWiki 1.29.2https://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.8.tar.gz&diff=14713File:RareMETALS 6.8.tar.gz2017-05-18T14:28:21Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=14712RareMETALS2017-05-18T14:18:17Z<p>Dajiang Liu: /* Where to download */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 05/18/2017 Version 6.8 incorporates a number of new features and bug fixes. We included support for multi-allelic variants, the support for a new conditional analysis method, the support for cohort level genomic controls, and the bug fixes for calculating heterogeneity statistics such as Q and I2. <br />
* 04/09/2016 Version 6.3 is released. Minor bug fix: Due to different level of missingness of variants in the gene, the single variant association statistics calculated using the covariance matrices of score statistics can be different than single variant association statistics calculated using vstat. This has lead to confusions. It has been fixed in version 6.3. The primary results from version 6.2 should be correct. <br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.8.tar.gz | rareMETALS_6.8.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=14711RareMETALS2017-05-18T14:17:57Z<p>Dajiang Liu: /* Change Log */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 05/18/2017 Version 6.8 incorporates a number of new features and bug fixes. We included support for multi-allelic variants, the support for a new conditional analysis method, the support for cohort level genomic controls, and the bug fixes for calculating heterogeneity statistics such as Q and I2. <br />
* 04/09/2016 Version 6.3 is released. Minor bug fix: Due to different level of missingness of variants in the gene, the single variant association statistics calculated using the covariance matrices of score statistics can be different than single variant association statistics calculated using vstat. This has lead to confusions. It has been fixed in version 6.3. The primary results from version 6.2 should be correct. <br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.3.tar.gz | rareMETALS_6.3.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.3.tar.gz&diff=14152File:RareMETALS 6.3.tar.gz2016-04-09T18:50:49Z<p>Dajiang Liu: Dajiang Liu uploaded a new version of &quot;File:RareMETALS 6.3.tar.gz&quot;</p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.3.tar.gz&diff=14151File:RareMETALS 6.3.tar.gz2016-04-09T17:35:34Z<p>Dajiang Liu: Dajiang Liu uploaded a new version of &quot;File:RareMETALS 6.3.tar.gz&quot;</p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.3.tar.gz&diff=14150File:RareMETALS 6.3.tar.gz2016-04-09T05:41:58Z<p>Dajiang Liu: Dajiang Liu uploaded a new version of &quot;File:RareMETALS 6.3.tar.gz&quot;</p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=14149RareMETALS2016-04-09T05:40:53Z<p>Dajiang Liu: /* Where to download */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 04/09/2016 Version 6.3 is released. Minor bug fix: Due to different level of missingness of variants in the gene, the single variant association statistics calculated using the covariance matrices of score statistics can be different than single variant association statistics calculated using vstat. This has lead to confusions. It has been fixed in version 6.3. The primary results from version 6.2 should be correct. <br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.3.tar.gz | rareMETALS_6.3.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=14148RareMETALS2016-04-09T05:40:35Z<p>Dajiang Liu: Undo revision 14146 by Dajiang Liu (talk)</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 04/09/2016 Version 6.3 is released. Minor bug fix: Due to different level of missingness of variants in the gene, the single variant association statistics calculated using the covariance matrices of score statistics can be different than single variant association statistics calculated using vstat. This has lead to confusions. It has been fixed in version 6.3. The primary results from version 6.2 should be correct. <br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.2.tar.gz | rareMETALS_6.2.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.3.tar.gz&diff=14147File:RareMETALS 6.3.tar.gz2016-04-09T05:20:36Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=14146RareMETALS2016-04-09T05:18:12Z<p>Dajiang Liu: /* Where to download */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 04/09/2016 Version 6.3 is released. Minor bug fix: Due to different level of missingness of variants in the gene, the single variant association statistics calculated using the covariance matrices of score statistics can be different than single variant association statistics calculated using vstat. This has lead to confusions. It has been fixed in version 6.3. The primary results from version 6.2 should be correct. <br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.3.tar.gz | rareMETALS_6.3.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=14145RareMETALS2016-04-09T05:17:56Z<p>Dajiang Liu: /* Change Log */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 04/09/2016 Version 6.3 is released. Minor bug fix: Due to different level of missingness of variants in the gene, the single variant association statistics calculated using the covariance matrices of score statistics can be different than single variant association statistics calculated using vstat. This has lead to confusions. It has been fixed in version 6.3. The primary results from version 6.2 should be correct. <br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.2.tar.gz | rareMETALS_6.2.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.2.tar.gz&diff=13773File:RareMETALS 6.2.tar.gz2015-09-26T03:28:55Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=13772RareMETALS2015-09-26T03:27:13Z<p>Dajiang Liu: /* Where to download */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.2.tar.gz | rareMETALS_6.2.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=13771RareMETALS2015-09-26T03:26:54Z<p>Dajiang Liu: /* Change Log */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 09/25/2015 Version 6.2 is released. Minor bug fix: Removed the incorrect warning information in version 6.1 when quantitative traits are meta-analyzed. The software incorrectly consider it as binary trait and suggested the use of rareMETALS2. <br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.1.tar.gz | rareMETALS_6.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=Dajiang_Liu&diff=13667Dajiang Liu2015-08-13T18:30:51Z<p>Dajiang Liu: </p>
<hr />
<div>Dajiang Liu completed a post-doc research fellowship, working on rare variant analysis methods with Goncalo Abecasis. Previously, he obtained his Ph.D. at Rice University working with Suzanne Leal and Marek Kimmel. Dajiang's new lab is hosted at https://dajiangliu.wordpress.com <br />
<br />
== Software ==<br />
<br />
=== Rare Metal and Rare Metal Worker ===<br />
<br />
While at Michigan, Dajiang directed the development of the [[Rare-Metal|Rare Metal]] and [[Rare-Metal-Worker|Rare Metal Worker]] packages for analysis and meta-analysis of rare variant association studies.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=Dajiang_Liu&diff=13666Dajiang Liu2015-08-12T01:01:23Z<p>Dajiang Liu: </p>
<hr />
<div>Dajiang Liu completed a post-doc research fellow working on rare variant analysis methods with Goncalo Abecasis. Previously, he completed his Ph.D. at Rice University working with Suzanne Leal and Marek Kimmel. Dajiang's new lab is hosted at https://dajiangliu.wordpress.com <br />
<br />
== Software ==<br />
<br />
=== Rare Metal and Rare Metal Worker ===<br />
<br />
While at Michigan, Dajiang directed the development of the [[Rare-Metal|Rare Metal]] and [[Rare-Metal-Worker|Rare Metal Worker]] packages for analysis and meta-analysis of rare variant association studies.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=Dajiang_Liu&diff=13665Dajiang Liu2015-08-12T01:00:42Z<p>Dajiang Liu: </p>
<hr />
<div>Dajiang Liu completed a post-doc research fellow working on rare variant analysis methods with Goncalo Abecasis. Previously, he completed his Ph.D. at Rice University working with Suzanne Leal and Marek Kimmel. Dajiang's new lab is hosted at [here]<br />
<br />
== Software ==<br />
<br />
=== Rare Metal and Rare Metal Worker ===<br />
<br />
While at Michigan, Dajiang directed the development of the [[Rare-Metal|Rare Metal]] and [[Rare-Metal-Worker|Rare Metal Worker]] packages for analysis and meta-analysis of rare variant association studies.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.1.tar.gz&diff=13653File:RareMETALS 6.1.tar.gz2015-07-25T20:08:34Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=13652RareMETALS2015-07-25T20:08:12Z<p>Dajiang Liu: /* Where to download */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.1.tar.gz | rareMETALS_6.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=13651RareMETALS2015-07-25T20:07:58Z<p>Dajiang Liu: /* Change Log */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 07/23/2015 Version 6.1 is released. Minor feature changes include output for VT the sites where the statistics are maximized; fixed a bug for determining monomorphic sites. Issue warnings when rareMETALS is used to analyze binary trait for meta-analysis. <br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.0.tar.gz | rareMETALS_6.0.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13531RareMETALS22015-06-17T03:25:29Z<p>Dajiang Liu: /* Exemplar Datasets */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets [[Media:ExampleDataaset.zip | ExampleDataset.zip]] can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
* ''Covariance Matrix File''<br />
* ''Tabix index file''<br />
These files are all automatically generated by rvtests.<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:ExampleDataaset.zip&diff=13530File:ExampleDataaset.zip2015-06-17T03:25:14Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13529RareMETALS22015-06-17T03:24:53Z<p>Dajiang Liu: /* Exemplar Datasets */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets [[Media:ExampleDataaset.zip | ExampleDataset.zip]]can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
* ''Covariance Matrix File''<br />
* ''Tabix index file''<br />
These files are all automatically generated by rvtests.<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13528RareMETALS22015-06-17T02:26:49Z<p>Dajiang Liu: /* Exemplar Datasets */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
[[Media:example1.MetaScore.assoc.gz | example1.MetaScore.assoc.gz]]. <br />
[[Media:example2.MetaScore.assoc.gz | example2.MetaScore.assoc.gz]]. <br />
* ''Covariance Matrix File''<br />
[[Media:example1.MetaCov.assoc.gz | example1.MetaCov.assoc.gz]]. <br />
[[Media:example2.MetaCov.assoc.gz | example2.MetaCov.assoc.gz]]. <br />
<br />
These input files are bgzip compressed. Tabix index is automatically generated when files are generated by rvtests.<br />
* ''Tabix index files are below:''<br />
[[File:example1.MetaScore.assoc.gz.tbi | example1.MetaScore.assoc.gz.tbi]]. <br />
[[Media:example2.MetaScore.assoc.gz.tbi | example2.MetaScore.assoc.gz.tbi]]. <br />
[[Media:example1.MetaCov.assoc.gz.tbi | example1.MetaCov.assoc.gz.tbi]]. <br />
[[Media:example2.MetaCov.assoc.gz.tbi | example2.MetaCov.assoc.gz.tbi]].<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13527RareMETALS22015-06-17T02:21:18Z<p>Dajiang Liu: /* Exemplar Datasets */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
[[Media:example1.MetaScore.assoc.gz | example1.MetaScore.assoc.gz]]. <br />
[[Media:example2.MetaScore.assoc.gz | example2.MetaScore.assoc.gz]]. <br />
* ''Covariance Matrix File''<br />
[[Media:example1.MetaCov.assoc.gz | example1.MetaCov.assoc.gz]]. <br />
[[Media:example2.MetaCov.assoc.gz | example2.MetaCov.assoc.gz]]. <br />
<br />
These input files are bgzip compressed. Tabix index is automatically generated when files are generated by rvtests.<br />
* ''Tabix index files are below:''<br />
[[Media:example1.MetaScore.assoc.gz.tbi | example1.MetaScore.assoc.gz.tbi]]. <br />
[[Media:example2.MetaScore.assoc.gz.tbi | example2.MetaScore.assoc.gz.tbi]]. <br />
[[Media:example1.MetaCov.assoc.gz.tbi | example1.MetaCov.assoc.gz.tbi]]. <br />
[[Media:example2.MetaCov.assoc.gz.tbi | example2.MetaCov.assoc.gz.tbi]].<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13526RareMETALS22015-06-17T02:19:51Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
[[Media:example1.MetaScore.assoc.gz | example1.MetaScore.assoc.gz]]. <br />
[[Media:example2.MetaScore.assoc.gz | example2.MetaScore.assoc.gz]]. <br />
* ''Covariance Matrix File''<br />
[[Media:example1.MetaCov.assoc.gz | example1.MetaCov.assoc.gz]]. <br />
[[Media:example2.MetaCov.assoc.gz | example2.MetaCov.assoc.gz]]. <br />
<br />
These input files are bgzip compressed. Tabix index is automatically generated when files are generated by rvtests. <br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:Example2.MetaCov.assoc.gz&diff=13525File:Example2.MetaCov.assoc.gz2015-06-17T02:17:26Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:Example1.MetaCov.assoc.gz&diff=13524File:Example1.MetaCov.assoc.gz2015-06-17T02:17:01Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:Example2.MetaScore.assoc.gz&diff=13523File:Example2.MetaScore.assoc.gz2015-06-17T02:16:13Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:Example1.MetaScore.assoc.gz&diff=13522File:Example1.MetaScore.assoc.gz2015-06-17T02:15:09Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13521RareMETALS22015-06-17T02:13:53Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
[[Media:example1.MetaScore.assoc.gz | example1.MetaScore.assoc.gz]]. <br />
[[Media:example2.MetaScore.assoc.gz | example2.MetaScore.assoc.gz]]. <br />
* ''Covariance Matrix File''<br />
[[Media:example1.MetaCov.assoc.gz | example1.MetaCov.assoc.gz]]. <br />
[[Media:example2.MetaCov.assoc.gz | example2.MetaCov.assoc.gz]]. <br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13520RareMETALS22015-06-17T02:12:52Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Exemplar Datasets ==<br />
<br />
The following exemplar datasets can be downloaded and tested with rareMETALS2 package.<br />
* ''Score Statistics File''<br />
[[example1.MetaScore.assoc.gz | example1.MetaScore.assoc.gz]]. <br />
[[example2.MetaScore.assoc.gz | example2.MetaScore.assoc.gz]]. <br />
* ''Covariance Matrix File''<br />
[[example1.MetaCov.assoc.gz | example1.MetaCov.assoc.gz]]. <br />
[[example2.MetaCov.assoc.gz | example2.MetaCov.assoc.gz]]. <br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13514RareMETALS22015-06-15T02:10:46Z<p>Dajiang Liu: /* Conditional Meta-analysis */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13513RareMETALS22015-06-15T02:10:28Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.<br />
<br />
== Conditional Meta-analysis ==<br />
<br />
conditional.rareMETALS2.single <- function(candidate.variant.vec,score.stat.file,cov.file,known.variant.vec,maf.cutoff,no.boot=10000,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,p.value.known.variant.vec=NA,anno.known.variant.vec=NA,anno.candidate.variant.vec=NA)<br />
<br />
* '''candidate.variant''' Position of candidate variant <br />
* '''score.stat.file''' Files of score statistics <br />
* '''cov.file''' Covariance matrix files <br />
* '''known.variant.vec''' Range of candidate variant, expressed in a vector, e.g. c("1:12345","1:234567"); <br />
* '''test''' test of rare variant tests <br />
* '''maf.cutoff''' Cutoffs of MAF used for determining rare variants <br />
* '''alternative''' Alternative hypothesis to be tested <br />
* '''out.digits''' The number of digits used in the output <br />
* '''callrate.cutoff''' Cutoff of call rates. Sites with callrates lower than the cutoff will be labeled as missing <br />
* '''hwe.cutoff''' Cutoff of HWE p-values. Sites with HWE pvalues lower than the cutoff will be labeled as missing</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13512RareMETALS22015-06-15T02:05:57Z<p>Dajiang Liu: /* Meta-analysis of Gene-level Association */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),<br />
ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13511RareMETALS22015-06-15T02:05:37Z<p>Dajiang Liu: /* Meta-analysis of Gene-level Association */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),ix.gold=1,out.digits=4,<br />
callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13510RareMETALS22015-06-15T02:05:02Z<p>Dajiang Liu: /* Meta-analysis of Single Variant Associations */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* '''score.stat.file''' files of score statistics <br />
* '''range tabix''' range of variants to be analyzed <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to. <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13509RareMETALS22015-06-15T02:04:19Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* ''score.stat.file'' files of score statistics <br />
* ''range tabix'' range of variants to be analyzed <br />
* ''alternative'' alternative hypothesis to be specified <br />
* ''ix.gold'' Gold standard population to align reference allele to. <br />
* ''callrate.cutoff'' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* ''hwe.cutoff'' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* ''hwe.ctrl.cutoff'' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
<br />
== Meta-analysis of Gene-level Association ==<br />
<br />
rareMETALS2.range <- function(score.stat.file,cov.file,range,range.name,test='GRANVIL',maf.cutoff=1,alternative=c('two.sided','greater','less'),ix.gold=1,out.digits=4,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0,max.VT=NULL)<br />
<br />
* '''score.stat.file''' files of score statistics <br />
* '''cov.file''' covariance matrix files <br />
* '''range''' tabix range for each gene/region <br />
* '''range.name''' The name of the range,e.g. gene names can be used <br />
* '''test''' rare variant tests to be used <br />
* '''maf.cutoff''' MAF cutoff used to analyze variants <br />
* '''alternative''' alternative hypothesis to be specified <br />
* '''ix.gold''' Gold standard population to align reference allele to <br />
* '''out.digits''' Number of digits used in the output <br />
* '''callrate.cutoff''' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* '''hwe.cutoff''' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* '''hwe.ctrl.cutoff''' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.<br />
* '''max.VT''' The maximum number of thresholds used in VT; Setting max.VT to 10 can improve the speed for calculation without affecting the power too much. The default parameter is NULL, which does not set upper limit on the number of variable frequency threhsold.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13508RareMETALS22015-06-15T01:59:17Z<p>Dajiang Liu: /* Meta-analysis of Single Variant Associations */</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
'''Relevant Parameters''':<br />
* ''score.stat.file'' files of score statistics <br />
* ''range tabix'' range of variants to be analyzed <br />
* ''alternative'' alternative hypothesis to be specified <br />
* ''ix.gold'' Gold standard population to align reference allele to. <br />
* ''callrate.cutoff'' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* ''hwe.cutoff'' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* ''hwe.ctrl.cutoff'' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13507RareMETALS22015-06-15T01:58:30Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals<br />
<br />
== Meta-analysis of Single Variant Associations ==<br />
<br />
rareMETALS2.single <- function(score.stat.file,range,alternative=c('two.sided','greater','less'),ix.gold=1,callrate.cutoff=0,hwe.cutoff=0,hwe.ctrl.cutoff=0)<br />
* ''score.stat.file'' files of score statistics <br />
* ''range tabix'' range of variants to be analyzed <br />
* ''alternative'' alternative hypothesis to be specified <br />
* ''ix.gold'' Gold standard population to align reference allele to. <br />
* ''callrate.cutoff'' Cutoffs of call rate, lower than which will NOT be analyzed (labelled as missing) <br />
* ''hwe.cutoff'' Cutoffs of HWE p-values; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; <br />
* ''hwe.ctrl.cutoff'' Cutoffs of HWE p-values using controls; Variants with HWE p-value smaller than the cutoffs are removed from subsequent analysis and labelled as missing; In case control studies, it is recommended to use hwe.ctrl.cutoff, since large effect variants may violate HWE.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13506RareMETALS22015-06-15T01:54:25Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. The package rareMETALS2 offers improved features for analyzing gene-level association tests in meta-analyses for '''binary trait'''. If you have any questions for using rareMETALS2 or rvtests, please post your questions to our '''google group''' https://groups.google.com/forum/#!forum/raremetals <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows locally efficient estimate of genetic effects. <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2<br />
<br />
== Forum to Ask Questions ==<br />
<br />
I have created a '''google group''' for discussion on the usage and for bug reports etc. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13505RareMETALS22015-06-14T23:52:12Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows approximate estimate of genetic effect using <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.<br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS2_XXX.tar.gz" command, where XXX is the version number for rareMETALS2</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS2_0.1.tar.gz&diff=13504File:RareMETALS2 0.1.tar.gz2015-06-14T23:51:09Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13503RareMETALS22015-06-14T23:50:44Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows approximate estimate of genetic effect using <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS2_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13502RareMETALS22015-06-14T23:50:28Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows approximate estimate of genetic effect using <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released<br />
<br />
== Download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS2_0.1.tar.gz | rareMETALS_0.1.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network.</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13501RareMETALS22015-06-14T23:36:06Z<p>Dajiang Liu: </p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
* 1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows approximate estimate of genetic effect using <br />
* 2.) It allows the adjustment of covariates in meta-analysis. <br />
* 3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS2&diff=13500RareMETALS22015-06-14T23:35:32Z<p>Dajiang Liu: Created page with "The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS ..."</p>
<hr />
<div>The R package rareMETALS2 was an extension of the R package rareMETALS. It was designed to meta-analyze gene-level association tests for '''binary trait''' . While rareMETALS offers a near-complete solution for meta-analysis of gene-level tests for quantitative trait, it does not offer the optimal solution for binary trait. <br />
<br />
The package '''rareMETALS2''' is under development. It takes summary association statistics generated by rvtests as input. It offers the following unique features <br />
1.) It allows the meta-analysis of samples with related individuals and samples with unrelated individuals, and allows approximate estimate of genetic effect using <br />
2.) It allows the adjustment of covariates in meta-analysis. <br />
3.) It allows conditional meta-analysis of single variant and gene-level associations. <br />
<br />
== Change Log ==<br />
June, 14, 2015 0.1 Version released</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=File:RareMETALS_6.0.tar.gz&diff=13364File:RareMETALS 6.0.tar.gz2015-05-19T18:37:55Z<p>Dajiang Liu: </p>
<hr />
<div></div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=13363RareMETALS2015-05-19T18:36:58Z<p>Dajiang Liu: /* Where to download */</p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_6.0.tar.gz | rareMETALS_6.0.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liuhttps://genome.sph.umich.edu/w/index.php?title=RareMETALS&diff=13362RareMETALS2015-05-19T18:36:36Z<p>Dajiang Liu: </p>
<hr />
<div>rareMETALS is an R-package for performing single or gene-level tests for detecting rare variant associations. For questions regarding the use of this package, please contact Dajiang Liu (dajiang.liu at outlook dot com) or Gonçalo Abecasis (goncalo at umich dot edu). The same methodology is also implemented in command line tools. Please see [http://genome.sph.umich.edu/wiki/Rare-Metal]<br />
<br />
== Change Log ==<br />
* 05/19/2015 Version 6.0 is released. Minor feature addition: rareMETALS can now output of the set of variants that are analyzed in VT (i.e. the set of variants with MAF < the threshold where the VT statistic is maximized). <br />
* 04/01/2015 Version 5.9 is released (not a April's fool joke)! A bug in calculating Cochran-Q statistic is fixed. A bug in conditional.rareMETALS.range.group is also fixed. No other analyses are affected. <br />
* 01/24/2015 Version 5.8 is released, which fixed a serious bug for single variant unconditional association tests with group file. If you happen to run the analyses using rareMETALS.single.group() in version 5.7, the results are likely to be incorrect. Please rerun using version 5.8. Please note only rareMETALS.single.group function is affected. All other functions should not be affected by this error. <br />
* 01/04/2015 Version 5.7 is released, which added metrics for heterogeneity of genetic effects, including I2 and Q for single variant association statistics<br />
* 12/09/2014 Version 5.6 is released, which added function conditional.rareMETALS.range.group, and fixed a minor issue for estimating sample sizes. <br />
* 11/19/2014 Version 5.5 is released, which fixes a few bugs on the version 5.4.<br />
* 11/09/2014 Version 5.4 is posted with the following change 1.) Allowing for performing conditional analysis for multiple candidate variants 2.) add option correctFlip to rareMETALS.single.group, rareMETALS.range.group allowing for options to discard sites with non-matching ref or alt alleles. Default is TRUE <br />
* 09/08/2014 Version 5.2 is posted. One change in version 5.0 and 5.1 is reverted, which could lead to undesirable effect. It improves on some border line cases as compared to Versions 4.7 - 4.9. But in general, version 5.2 and 4.7-4.9 should give very comparable results. Please update to the latest version. I would expect that version 5.2 should run stably for all models under all circumstances. <br />
* 08/21/2014 Version 4.9 is posted. A bug is fixed for VT test. While the p-values and statistics were correct, the number of sites and the beta estimate could sometimes be incorrect in version 4.8. Now it is fixed. Please download the newest version. Thanks! <br />
* 08/18/2014 Version 4.8 is posted. A bug for recessive model analysis is fixed. Additive and dominant models should remain unaffected. Thanks! <br />
* 08/06/2014 Version 4.7 is posted, where a few minor bugs were fixed. Thanks to Heather Highland and Xueling Sim for careful testing!! Please update. Thanks!<br />
* 07/15/2014 Fixed a bug in conditional.rareMETALS.single and conditional.rareMETALS.range; Please update. Thanks!<br />
* 06/27/2014 Updated to version 4.0: Many updates are implemented, including support for group files in both single variant and gene-level association test; checks for allele flips based upon variant frequency, the detection of possible allele flips using a novel statistic based upon variations of allele frequency between studies;<br />
<br />
== Where to download ==<br />
<br />
The R package can be downloaded from [[Media:rareMETALS_5.9.tar.gz | rareMETALS_5.9.tar.gz]]. It will be eventually released on the Comprehensive R-archive Network. If you want to perform gene-level association test using automatically generated annotations, you will also need [[Media:refFlat_hg19.txt.gz | refFlat_hg19.txt.gz]], which is the gene definition modified from refFlat.<br />
<br />
== Documentation ==<br />
<br />
An R automatically generated documentation is available here: [[Media:rareMETALS-manual.pdf | rareMETALS-manual.pdf]]. Please note that it is still rough in places. Please let us know if you see any problems. Thanks! <br />
<br />
== Forum ==<br />
<br />
I have created a google group for discussion on the usage and for bug reports etc. As you can see, there are numerous updates to the package since its release, thanks to the valuable suggestions from many users. We are committed to continue to update the package and improve its functionalities. If you find any issues to the package and think that the discussions may also benefit others, please post them to the user group. Here is the link to the discussion group https://groups.google.com/forum/#!forum/raremetals <br />
<br />
== How to install ==<br />
<br />
To install the package, please use "R CMD INSTALL rareMETALS_XXX.tar.gz" command, where XXX is the version number for rareMETALS<br />
<br />
== Supported Functionalities ==<br />
* Marginal meta-analysis of single variant or gene-level association test <br />
* Conditional analysis of single variant or gene-level association, for variants (gene) where there are covariance information available between candidate variants and known variants. <br />
* Estimates of genetic effects and locus genetic variance<br />
* Estimate measures of genetic effect heterogeneities between studies <br />
<br />
== Exemplar Dataset==<br />
<br />
Four datasets are useful to get you started on how to use rareMETALS R package for meta-analyses of gene-level association test<br />
<br />
[[Media:study1.MetaScore.assoc.gz]] [[Media:study2.MetaScore.assoc.gz]] [[Media:study1.MetaCov.assoc.gz]] [[Media:study2.MetaCov.assoc.gz]]<br />
<br />
== How to Generate Summary Association Statistics and Prepare Them for Meta-analysis ==<br />
<br />
Meta-analysis summary association statistics can be generated by both RVTESTS and RAREMETALWORKER. Please refer to their documentations for generating summary association statistics <br />
<br />
Once you have generated summary association statistics, you need to compress them with bgzip, and index them with tabix. If you use RAREMETALWORKER, the command should be like <br />
<br />
'''NOTE: Tabix 1.X does not seem to support the indexing for generic tab-delimited files. To index the file, please use tabix 0.2.5 or earlier versions. <br />
<br />
If you use RVTESTS, your command should be<br />
<br />
bgzip study1.MetaScore.assoc<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaScore.assoc.gz<br />
<br />
tabix -s 1 -b 2 -e 2 -S 1 study1.MetaCov.assoc.gz<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single function ==<br />
<br />
rareMETALS.single function allow you to perform meta-analyses for single variant association tests. The summary association statistics are combined using Mantel Haenszel test statistic. The details are described in our method paper Liu et al, Nat Genet, 2014. <br />
<br />
Assume that you have a set of single variant score statistics and their covariance matrices. <br />
<br />
Example:<br />
<br />
cov.file <- c("study1.MetaCov.assoc.gz","study2.MetaCov.assoc.gz")<br />
score.stat.file <- c("study1.MetaScore.assoc.gz","study2.MetaScore.assoc.gz")<br />
<br />
library(rareMETALS)<br />
res <- rareMETALS.single(score.stat.file,cov.file=NULL,range="19:11200093-11201275",alternative="two.sided",ix.gold=1,callrate.cutoff=0,hwe.cutoff=0)<br />
<br />
###result can be explored as below###<br />
> names(res)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "QC.by.study" "no.sample" "beta1.est" "beta1.sd" "hsq.est" <br />
[16] "nearby" "pos" <br />
> print(res$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res$p.value)<br />
[1] 0.551263675 0.056308558 0.172481571 0.734935815 0.922326732 0.053804524 0.886985353 0.903835162 0.005280228 0.266575301<br />
[11] 0.196122312 0.157114376 0.951477852 0.840523624 0.759482777 0.112743041 0.414147263 0.825877149 0.006090142 0.096474975<br />
[21] 0.096474975 0.956407850 0.038234190 0.253512486 0.550935361 0.482315038<br />
<br />
== A Simple Tutorial for Using the rareMETALS.single.group function ==<br />
<br />
Dataset used to get the refaltList [[Media:groupFile.txt.gz]]<br />
<br />
res.site<-read.table("groupFile.txt",header=T)<br />
refaltList <- list(pos=paste(res.site[,1],res.site[,2],sep=":"),ref=res.site$AF,alt=res.site$ALT,af=res.site$AF,af.diff.max=0.5,checkAF=T)<br />
res31<-rareMETALS.single.group(score.stat.file,cov.file=NULL, range="19:11200093-11201275", refaltList,<br />
alternative = c("two.sided"), callrate.cutoff = 0,<br />
hwe.cutoff = 0, correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
<br />
###result can be explored as below###<br />
> names(res31)<br />
[1] "p.value" "ref" "alt" "integratedData" "raw.data" <br />
[6] "clean.data" "statistic" "direction.by.study" "anno" "maf" <br />
[11] "maf.byStudy" "maf.maxdiff.vec" "ix.maf.maxdiff.vec" "maf.sd.vec" "no.sample.mat" <br />
[16] "no.sample" "beta1.est" "beta1.sd" "QC.by.study" "hsq.est" <br />
[21] "nearby" "cochranQ.stat" "cochranQ.df" "cochranQ.pVal" "I2" <br />
[26] "log.mat" "pos" <br />
> print(res31$pos)<br />
[1] "19:11200093" "19:11200213" "19:11200235" "19:11200272" "19:11200282" "19:11200309" "19:11200412" "19:11200419"<br />
[9] "19:11200431" "19:11200442" "19:11200475" "19:11200508" "19:11200514" "19:11200557" "19:11200579" "19:11200728"<br />
[17] "19:11200753" "19:11200754" "19:11200806" "19:11200839" "19:11200840" "19:11200896" "19:11201124" "19:11201259"<br />
[25] "19:11201274" "19:11201275"<br />
> print(res31$p.value)<br />
[1] NA NA NA NA 0.9223267 NA NA NA NA NA NA NA<br />
[13] NA NA NA NA NA NA NA NA NA NA NA NA<br />
[25] NA NA<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range function ==<br />
<br />
res <- rareMETALS.range(score.stat.file,cov.file,range="19:11200093-11201275",range.name="LDLR",test = "GRANVIL",maf.cutoff = 0.05,alternative = c("two.sided"),ix.gold = 1,out.digits = 4,callrate.cutoff = 0,hwe.cutoff = 0,max.VT = NULL)<br />
print(res$res.out)<br />
<br />
<pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out<br />
[1,] "LDLR" "0.6064" "0.2654" "25" "-0.01729"<br />
beta1.sd.out maf.cutoff.out direction.burden.by.study.out<br />
[1,] "0.03357" "0.05" "--"<br />
direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt<br />
[1,] "---++-+--+-+++++--+++++-+" "19:11200431" "C/T"<br />
top.singlevar.pval top.singlevar.af<br />
[1,] "0.004709" "0.01038"<br />
pos.ref.alt.out <br />
<br />
<br />
<br />
[1,] "19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:1120\<br />
0442/G/A,19:11200475/C/G,19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:1\<br />
1200839/T/A,19:11200840/C/A,19:11200896/C/T,19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
</pre><br />
<br />
</pre><br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos<br />
[1,] "LDLR" "0.01916" "5.487" "25" "-0.3575" "0.1526" "0.05" "--" "---++-+--+-+++++--+++++-+" "19:11200309" <br />
top.singlevar.refalt top.singlevar.pval top.singlevar.af<br />
[1,] "C/A" "0.01047" "0.01538" <br />
pos.ref.alt.out <br />
<br />
[1,]"19:11200093/T/C,19:11200213/G/A,19:11200235/G/A,19:11200272/C/A,19:11200282/G/A,19:11200309/C/A,19:11200412/C/T,19:11200419/C/T,19:11200431/C/T,19:11200442/G/A,19:11200475/C/G,<br />
19:11200508/G/A,19:11200514/C/T,19:11200557/G/A,19:11200579/C/T,19:11200728/C/T,19:11200753/T/C,19:11200754/G/A,19:11200806/C/T,19:11200839/T/A,19:11200840/C/A,19:11200896/C/T,<br />
19:11201259/G/C,19:11201274/C/T,19:11201275/A/T"<br />
<br />
</pre><br />
<br />
<br />
More detailed results can be found in a list res$res.list<br />
<br />
== A Simple Tutorial for Using the rareMETALS.range.group function ==<br />
<br />
res32<-rareMETALS.range.group(score.stat.file, cov.file, range="19:11200093-11201275", range.name="LDLR",<br />
test = "GRANVIL", refaltList, maf.cutoff = 1,<br />
alternative = c("two.sided"), out.digits = 4,<br />
callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL,<br />
correctFlip = TRUE, analyzeRefAltListOnly = TRUE)<br />
print(res32$res.out)<br />
<br />
gene.name.out N.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out<br />
[1,] "LDLR" "2504" "0.8629" "0.0298" "1" "0.1764" "1.044" "1" <br />
direction.burden.by.study.out direction.meta.single.var.out top.singlevar.pos top.singlevar.refalt top.singlevar.pval<br />
[1,] "+-" "+" "19:11200282" "3/1" "0.8629" <br />
top.singlevar.af pos.ref.alt.out <br />
[1,] "0.000599" "19:11200282/G/A"<br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.single==<br />
It is well known that, owing to linkage disequilibrium, one or more common causal variants can result in shadow association signals at other nearby common variants, use RareMETALS to perform conditional analysis for single variant tests<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.single(candidate.variant.vec=c("19:11200282","19:11200309"), score.stat.file, cov.file,<br />
known.variant.vec=c("19:11200754","19:11200806","19:11200839"), maf.cutoff=0.05, no.boot =1000,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0,<br />
p.value.known.variant.vec = NA, anno.known.variant.vec = NA,<br />
anno.candidate.variant.vec = NA)<br />
print(res$res.out)<br />
<br />
<br />
POS REF ALT PVALUE AF BETA_EST BETA_SD DIRECTION_BY_STUDY ANNO POS_REF_ALT_ANNO_KNOWN <br />
[1,] "19:11200282" "G" "A" "0.5825" "0.000599" "0.5616" "1.044" "-=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
[2,] "19:11200309" "C" "A" "0.01484" "0.01538" "-0.3615" "0.02201" "+=" "N/A" "19:11200754/G/A/NA,19:11200806/C/T/NA,19:11200839/T/A/NA"<br />
<br />
<br />
</pre><br />
<br />
== A Simple Tutorial for Using the conditional.rareMETALS.range==<br />
<br />
example:<br />
<br />
res<-conditional.rareMETALS.range(range.name = "LDLR", score.stat.file, cov.file,<br />
candidate.variant.vec=c("19:11200282","19:11200309"), known.variant.vec=c("19:11200754","19:11200806","19:11200839"), test = "GRANVIL", maf.cutoff=0.05,<br />
alternative = c("two.sided"), ix.gold = 1,<br />
out.digits = 4, callrate.cutoff = 0, hwe.cutoff = 0, max.VT = NULL)<br />
print(res$res.out)<br />
<br />
gene.name.out p.value.out statistic.out no.site.out beta1.est.out beta1.sd.out maf.cutoff.out direction.burden.by.study.out direction.meta.single.var.out<br />
[1,] "LDLR" "0.01961" "5.446" "2" "-0.3429" "0.1469" "0.05" "-?" "+-" <br />
top.singlevar.pos top.singlevar.refalt top.singlevar.pval top.singlevar.af pos.ref.alt.out pos.ref.alt.known.out <br />
[1,] "19:11200309" "C/A" "0.01484" "0.01538" "19:11200282/G/A,19:11200309/C/A" "19:11200754/G/A,19:11200806/C/T,19:11200839/T/A"<br />
<br />
More detailed results can be found in a list res$res.list</div>Dajiang Liu