ruth
is a software to perform robust unified Hardy-Weinberg Equilbrium (HWE) tests for sequence-based genotypes under population structure.
Inputs:
Outputs:
'ruth' (Robust Unified Test for HWE) uses information from genotypes and principal components to perform either a likelihood ratio test or a score test to estimate variants' deviation from HWE after adjusting for population structure.
$ mkdir build $ cd build $ cmake ..
In case any required libraries is missing, you may specify customized installing path by replacing "cmake .." with:
For libhts: - $ cmake -DHTS_INCLUDE_DIRS=/hts_absolute_path/ -DHTS_LIBRARIES=/hts_absolute_path/libhts.a .. For bzip2: - $ cmake -DBZIP2_INCLUDE_DIRS=/bzip2_absolute_path/include/ -DBZIP2_LIBRARIES=/bzip2_absolute_path/lib/libbz2.a .. For lzma: - $ cmake -DLZMA_INCLUDE_DIRS=/lzma_absolute_path/include/ -DLZMA_LIBRARIES=/lzma_absolute_path/lib/liblzma.a ..
Finally, to build the binary, run
$ make
All software use a self-documentation utility. You can run each utility with -man or -help option to see the command line usages. Also, we offer some general practice with a tutorial example (data available here: [TBA])
$(RUTH_HOME)/bin/ruth --vcf [Input VCF file] --evec [Input EigenVector] --out [Output]
The detailed usage is also pasted below.
Input Options --evec [STR: ] : (REQUIRED) Name of eigenvector file, where each line contains [SAMPLE_ID] [PC1] [PC2] ..... The number of PCs could be larger than parameters specified by --num-PC --vcf [STR: ] : (REQUIRED) Input VCF/BCF file --thin [FLT: 1.00] : Probability to randomly sample variants from BCF --seed [INT: 0] : Random seed to set (default is to use the clock time) --num-pc [INT: 4] : Number of principal componentds to be used from the file specified by --evec --field [STR: ] : FORMAT field in VCF to extract the genotype likelihood or genotypes from. Only PL, GL, GT are allowed currently --gt-error [FLT: 5.0e-03] : Error rates for GT field when --field GT option is used. Ignored for other fields --lambda [FLT: 1.00] : Max lambda parameter Output Options --out [STR: ] : (REQUIRED) Output VCF file to write with ISHWEZ and ISIBC statistics and IF format field --skip-if [FLG: OFF] : Skip writing individual-specific allele frequency for each sample in output VCF/BCF --skip-info [FLG: OFF] : Skip updating INFO field for each sample in output VCF/BCF --site-only [FLG: OFF] : Do not write genotype information, and writes only site information (up to INFO field) in output VCF/BCF --nelder-mead [FLG: OFF] : Use Nelder-Mead algorithm (instead of EM) when estimating individual-specific allele frequencies --lrt-test [FLG: OFF] : Use Likelihood-ratio test with Nelder-Mead algorithm (instead of score test) for performing HWE test --lrt-em [FLG: OFF] : Use Likelihood-ratio test with EM algorithm (instead of score test) for performing HWE test Samples to focus on --sm-list [STR: ] : A file containg the list of sample IDs to subset Parameters for sex chromosomes --sex-map [STR: ] : Sex map file in PED format or tsv file with [ID,SEX in X ploidy] --x-label [STR: X] : Label for X chromosome --y-label [STR: Y] : Label for Y chromosome --mt-label [STR: MT] : Label for MT chromosome --x-start [INT: 2699520] : Start coordinate of non-PAR X region --x-stop [INT: 154931044] : Stop coordinate of non-PAR X region Options to specify when chunking is used --ref [STR: ] : Reference FASTA file name (required only when chunking is used) --unit [INT: 2147483647] : Chunking unit in bp (specify only with --ref together --interval [STR: ] : Interval file name used for chunking (specify only when chunking is used without --ref --region [STR: ] : Target region to focus on
If you want to cite RUTH for your publication, please use the following information:
Kwong AM, Blackwell TW, LeFaive J, de Andrade M, Barnard J, Barnes KC, Blangero J, Boerwinkle E, Burchard EG, Cade BE, Chasman DI, Chen H, Conomos MP, Cupples LA, Ellinor PT, Eng C, Gao Y, Guo X, Irvin MR, Kelly TN, Kim W, Kooperberg C, Lubitz SA, Mak ACY, Manichaikul AW, Mathias RA, Montasser ME, Montgomery CG, Musani S, Palmer ND, Peloso GM, Qiao D, Reiner AP, Roden DM, Shoemaker MB, Smith JA, Smith NL, Su JL, Tiwari HK, Weeks DE, Weiss ST; NHLBI Trans-Omics for Precision Medicine (TOPMed) Consortium; TOPMed Analysis Working Group; Scott LJ, Smith AV, Abecasis GR, Boehnke M, Kang HM. Robust, flexible, and scalable tests for Hardy-Weinberg equilibrium across diverse ancestries. Genetics. 2021 May 17;218(1):iyab044. doi: 10.1093/genetics/iyab044. PMID: 33720349; PMCID: PMC8128395