Difference between revisions of "RAREMETAL Documentation"
(→Basic Usage Instructions)
|Line 87:||Line 87:|
==== Grouping ====
===== Grouping from a Group File =====
===== Grouping from a Group File =====
Revision as of 20:34, 7 August 2013
rareMETAL is a tool for gene-based meta-analysis, based upon summary statistics generated from individual data using Rare Metal Worker. Another implementation of the same methods in R-package can be found RareMetals.
If you have any questions, please contact: sfengsph at umich dot edu
- 1 Useful Wiki Pages
- 2 Key Features
- 3 Brief Description
- 4 Approach
- 5 Download and Installation
- 6 Basic Usage Instructions
- 7 Additional Analysis Options
- 7.1 Input Files
- 7.2 Output Files
- 8 Example Usage
- 9 TUTORIAL
- 10 Change Log
Useful Wiki Pages
There are a few pages in this Wiki that may be useful to rareMETAL users. Here are links to key pages:
- The rareMETAL FAQ
rareMETAL has the following features:
- rareMETAL performs gene-based or region-based meta analysis using Burden tests with the following methods: CMC_counts, Madsen-Browning, SKAT, and Variable Threshold.
- rareMETAL performs single variant metal-analysis by default.
- rareMETAL allows customized groups of variants to be tested.
- rareMETAL allows conditional analysis to be performed in both gene-level meta-analysis and single variants meta-analysis.
- rareMETAL generated QQ plots and manhattan plots by default.
rareMETAL is a tool for meta-analysis rare variants from genotype arrays and sequencing. rareMETAL can combine summary statistics of individual studies generated by rareMetalWorker. It provides a convenient approach for both single variant and gene-level meta-analysis of rare variants from various studies, when joint-analysis of raw data from these studies are restricted.
The key idea behind meta-analysis with rareMETAL is that various gene-level test statistics can be reconstructed from single variant score statistics and that, when the linkage disequilibrium relationships between variants are known, the distribution of these gene-level statistics can be derived and used to evaluate signifi-cance. Single variant statistics are calculated using the Cochran-Mantel-Haenszel method. The main formulae are tabulated in the following:
Download and Installation
- University of Michigan CSG users can go to the following:
Where to Download
- The software package for Linux and Mac (source code included) can be downloaded here: software package download
How to Compile
- Save it to your local path and decompress using the following command:
tar xvzf raremetal.0.0.1.tgz
- Go to raremetal_0.0.1/raremetal/src and type the following command to compile:
How to Execute
- Go to raremetal_0.0.1/raremetal/bin and use the following:
- For example usage, please refer to [example command lines]
Basic Usage Instructions
raeMETAL is a command line tool. It is typically run from a Linux or Unix prompt by invoking the command
raremetal. An example is included at the bottom of this page.
A detailed TUTORIAL with toy data are also available.
List of Studies
- --studyName option is crucial for Rare Metal to work. Ignoring this option will lead to FATAL ERROR and Rare Metal will stop.
- The file should contain the path and prefix of the studies you want to include.
- If there is one or more studies that you want to excluded from your list, but want to save some effort of generating a new file, you can put a "#" in front of the line of record. Rare Metal will automatically exclude that study from meta analysis.
- An example file is in the following:
- The above example study name file guides Rare Metal looking for the following files as input (note that the second study has been opt out from the meta analysis, because of the "#" in front of the line)
Grouping of Rare Variants
Grouping from a Group File
- With --groupFile option, you can specify particular set of variants to be grouped for burden tests.
- The group file must be a tab or space delimited file in the following format:
GROUP_ID MARKER1_ID MARKER2_ID MARKER3_ID ...
- MARKER_ID must be in the following format:
- An example group file is:
Grouping from an Annotated VCF File
- If --groupFile option is not specified, Rare Metal will look for an annotated vcf file as blue print for variants to group.
- The annotated VCF file should be specified using --annotatedVcf option.
Generate a VCF File to Annotate Outside of Rare Metal
- --writeVCF allows user to write a VCF file including pooled single variants from all studies. Then users can use their favorite annotation tool to annotate the VCF file. After annotating the VCF file, users can use that file as input for Rare Metal for further gene-based or region-based meta analysis.
- Rare Metal allows filtering of variants from individual studies by their HWE pvalue and call rate, which are generated as part of the output from Rare Metal Worker.
- Currently, four methods are provided in Rare Metal, CMC type burden test, Madsen-Browning burden test, Variable Threshold burden test, and SKAT.
Additional Analysis Options
- --prefix allows customized prefix for output files.
- --maf specifies the minor allele frequency cutoff when doing gene-based or group-based burden tests. The default is maf<0.05.
- --tabulateHits works with --hitsCutoff together to generate reports for genes that have p-value less than specified cutoff from burden tests or SKAT. The default cutoff of p-value for genes to be reported is 1.0e-06, which can be specified by --hitsCutoff option. For more explanations and examples, please go to [Tabulated Top Hits].
Rare Metal needs the following as input:
List of Studies
- A file with the path and name of files containing summary statistics generated by raremetalworker should be specified.
- If no such file is provided, Rare Metal will stop and report FATAL ERROR.
- Please go to [example input for study names] for detailed explanation and examples.
Groups of Variants
To perform gene-based or group-based burden test, groups of variants need to be provided. There are two options to provide such information:
From Group File
- A group file contains the list of groups or genes with the variants to be included in your burden tests.
- Please refer to the instruction of --groupFile option for formats and examples.
From Annotated VCF File
- rareMETAL allows user to use annotated VCF file as input for grouping of variants, which is optional to input a group file as described above.
- rareMETAL also has the option of generating a VCF file according to the pooled information from individuals studies. Then user can use their favorite annotation tools to annotate the VCF file into the INFO field. Currently, rareMETAL only support limited formats of annotated VCF file.
- A more flexible way, which is also a recommended way, is to generate a group file from the customized annotated VCF file and use that as input to rareMETAL.
- For formats of annotated VCF that rareMETAL currently support, please refer to the following annotated VCF:
NOTE: if no grouping method is provided, then only single variant meta analysis will be performed.
Single Variant Meta Analysis Output
- Single variant meta analysis output has the following components: header and results.
- Header line starts with "#" are column headers for results table.
- An example single variant meta analysis output is shown below:
- A detailed explanation of each column is in the following:
CHROM: Chromosome Name POS: Variant Position REF: Reference Allele Label ALT: Alternative Allele Label POOLED_ALT_AF: Pooled Alternative Allele Frequency EFFECT_SIZE: Alternative Allele Effect Size DIRECTION_BY_STUDY: Effect size direction of alternative allele from each study. The order of study is consistent with the order of studies listed in the input file for option --studyName. "?" means the variant is not observed or monomorphic from the study. "!" means the variant observed from this study has different alleles from those from the first study.
Burden Tests Meta Analysis Output
When --longOutput is specified, output includes both burden test results of genes and single variant results of the variants included in burden tests. Otherwise, single variant results of variants included in burden tests will not be included in the output.
Long Output Format
- Here is an example of output file from SKAT when --longOutput is specified.
Short Output Format
- Here is an example of output file from SKAT when --longOutput is not specified.
Tabulated Top Hits
- Tabulated top hits are saved in the file:
- The following items are tabulated in the output:
- A log file is automatically generated by Rare Metal to save the parameters in effect. An example is in the following:
The following parameters are in effect: List of Studies: ============================ --studyName [studyName.SardiNia] Grouping Methods: ============================ --groupFile  --annotatedVcf [../../groupvcf/bin/debug/nonsynonymous.vcf] --annotation  --writeVcf [OFF] QC Options: ============================ --hwe  --callRate  Association Methods: ============================ --burden [true] --MB [false] --SKAT [false] --VT [false] Other Options: ============================ --prefix [test] --maf [0.05] --longOutput [false] --tabulateHits [false] --hitsCutoff [1e-06]
- Here is an example command line to do single variant meta analysis only:
./raremetal --studyName your.studyName.file --prefix yourPrefix
- When you want to do all burden tests using a group file to specify which variants to group:
./raremetal --studyName your.studyName.file --groupFile your.groupfile --burden --MB --SKAT --VT --maf 0.01 --prefix yourPrefix (NOTE: this will generate single variant meta analysis result and the short format output for burden test results.)
./raremetal --studyName your.studyName.file --groupFile your.groupfile --SKAT --longOutput --tabulateHits --hitsCutoff 1.0e-07 --prefix yourPrefix
- Here is an example of adding QC filters to variants when doing meta analysis.
./raremetal --studyName your.studyName.file --groupFile your.groupfile --SKAT --longOutput --tabulateHits --hitsCutoff 1.0e-07 --hwe 1e-06 --callRate 0.98 --prefix yourPrefix
- Here is how to do the same thing but reading grouping information from an annotated VCF file:
./raremetal --studyName your.studyName.file --annotatedVcf your.annotated.vcf --annotation nonsyn/stop/splicing --SKAT --longOutput --tabulateHits --hitsCutoff 1.0e-07 --hwe 1e-06 --callRate 0.98 --prefix yourPrefix
- If you want to write a VCF file of pooled variants from all studies, annotate them using your favorite annotation program, and then come back to Rare Metal with the annotate VCF file to do burden tests:
First, use the following command to write the VCF file: ./raremetal --studyName your.studyName.file --writeVcf --prefix yourPrefix Second, annotate the VCF file using your favorite annotation program. (Annotated VCF file has to follow the format described here: [annotated VCF format]) Third, use the following command to do meta analysis: ./raremetal --studyName your.studyName.file --annotatedVcf your.annotated.vcf --annotation nonsyn/splicing/stop --burden --MB --SKAT --VT --maf 0.01 --prefix yourPrefix
- For a comprehensive tutorial of RareMetalWorker and RareMETAL using example data sets, please go to the following:
- Version 0.0.1 released to U of M CSG group. (2/13/2013)
- Version 0.0.1 released to public. (2/24/2013)
- Version 0.1.0 released to public after fixing a few bugs, adding conditional analysis and automatic graphing to the tool. (8/5/2013)