SkillAgentSearch skills...

Rvtests

Rare variant test software for next generation sequencing data

Install / Use

/learn @zhanxw/Rvtests

README

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->

Table of Contents

<!-- markdown-toc end -->

Build Status

(Updated: October 2017)

Introduction

Rvtests, which stands for Rare Variant tests, is a flexible software package for genetic association analysis for sequence datasets. Since its inception, rvtests was developed as a comprehensive tool to support genetic association analysis and meta-analysis. It can analyze both unrelated individual and related (family-based) individuals for both quantitative and binary outcomes. It includes a variety of association tests (e.g. single variant score test, burden test, variable threshold test, SKAT test, fast linear mixed model score test). It takes VCF/BGEN/PLINK format as genotype input file and takes PLINK format phenotype file and covariate file.

With new implementation of the BOLT-LMM/MINQUE algorithm as well as a series of software engineering optimizations, our software package is capable of analyzing datasets of up to 1,000,000 individuals in linear mixed models on a computer workstation, which makes our tool one of the very few options for analyzing large biobank scale datasets, such as UK Biobank. RVTESTS supports both single variant and gene-level tests. It also allows for highly effcient generation of covariance matrices between score statistics in RAREMETAL format, which can be used to support the next wave of meta-analysis that incorporates large biobank datasets.

A (much) larger sample size can be handled using linear regression or logistic regression models.

Citation

Xiaowei Zhan, Youna Hu, Bingshan Li, Goncalo R. Abecasis, and Dajiang J. Liu

RVTESTS: An Efficient and Comprehensive Tool for Rare Variant Association Analysis Using Sequence Data

Bioinformatics 2016 32: 1423-1426. doi:10.1093/bioinformatics/btw079 (PDF)

Download

Source codes can be downloaded from github or github page. In Linux, you can use

git clone https://github.com/zhanxw/rvtests

to retrieve the latest distribution for rvtests. To install, go to the rvtests folder and type make. When compilation succeed, the executable is under the executable folder. Simply type executable/rvtests can get you started.

Alternatively, binary executable files (for Linux 64-bit platform) can be downloaded from here.

Quick tutorial

Here is a quick example of how to use rvtests software in typical use cases.

Single variant tests

rvtest --inVcf input.vcf --pheno phenotype.ped --out output --single wald,score

This specifies single variant Wald and score test for association tests for every variant in the input.vcf file. The 6th column of the phenotype file, phenotype.ped, which is in PLINK format, is used. Rvtests will automatically check whether the phenotype is binary trait or quantitative trait. For binary trait, the recommended way of coding is to code controls as 1, cases as 2, missing phenotypes as -9 or 0.

For other types of association tests, you can refer to Models.

Groupwise tests

Groupwise tests includes three major kinds of tests.

  • Burden tests: group variants, which are usually less than 1% or 5% rare variants, for association tests. The category includes: CMC test, Zeggini test, Madsen-Browning test, CMAT test, and rare-cover test.
  • Variable threshold tests: group variants under different frequency thresholds.
  • Kernel methods: suitable to tests rare variants having different directions of effects. These includes SKAT test and KBAC test.

All above tests requires to group variants into a unit. The simplest case is to use gene as grouping unit. For different grouping method, see Grouping.

To perform rare variant tests by gene, you need to use --geneFile to specify the gene range in a refFlat format. We provided different gene definitions in the Resources section. You can use --gene to specify which gene(s) to test. For example, specify --gene CFH,ARMS2 will perform association tests on CFH and ARMS2 genes. If there is no providing --gene option, all genes will be tests.

The following command line demonstrate how to use CMC method, variable threshold method(proposed by Price) and kernel based method (SKAT by Shawn Lee and KBAC by Dajiang Liu) to test every gene listed in refFlat_hg19.txt.gz.

rvtest --inVcf input.vcf --pheno phenotype.ped --out output --geneFile refFlat_hg19.txt.gz --burden cmc --vt price --kernel skat,kbac

Related individual tests

To test related individuals, you will need to first create a kinship matrix:

vcf2kinship --inVcf input.vcf --bn --out output

The option --bn means calculating empirical kinship using Balding-Nicols method. You can specify --ibs to obtain IBS kinship or use --pedigree input.ped to calculate kinship from known pedigree information.

Then you can use linear mixed model based association tests such as Fast-LMM score test, Fast-LMM LRT test and Grammar-gamma tests. An exemplar command is shown:

rvtest --inVcf input.vcf --pheno phenotype.ped --out output --kinship output.kinship --single famScore,famLRT,famGrammarGamma

Meta-analysis tests

The meta-analysis models outputs association test results and genotype covariance matrix. These calculated summary statistics can be used in rare variant association analysis (details). We provide single variant score test and generate a genotype covariance matrix. You can use this command:

rvtest --inVcf input.vcf --pheno phenotype.ped --meta score,cov --out output

In a more realistic scenario, you may want to adjust for covariates and want to inverse normalized residuals obtained in null model (link to our methodology paper), then this command will work:

rvtest --inVcf input.vcf --pheno phenotype.ped --covar example.covar --covar-name age,bmi --inverseNormal --useResidualAsPhenotype  --meta score,cov --out output

Here the --covar specify a covariate file, and --covar-name specify which covariates can used in the analysis. Covariate file format can be found [here](#Covariate file). --inverseNormal --useResidualAsPhenotype specifies trait transformation method. That means first fit a regression model of the phenotype on covariates (intercept automatically added), then the residuals are inverse normalized. Trait transformation details can be found [here](#Trait transformation).

We support both unrelated individuals and related individuals (e.g. family data). You need to append --kinship input.kinship to the command line:

rvtest --inVcf input.vcf --pheno phenotype.ped --meta score,cov --out output --kinship input.kinship

The file input.kinship is calculated by vcf2kinship program, and usage to this program is described in Related individual tests.

NOTE: by default, the covariance matrix are calculated in a sliding-window of 1 million base pairs. You can change this setting via the option windowSize. For example, --meta cov[windowSize=500000] specify a 500k-bp sliding window.

Dominant models and recessive models

Dominant and recessive disease models are supported by appending "dominant" and/or "recessive" after "--meta" option. For example, use "--meta dominant,recessive" will generate two sets of files. For dominant model, they are "prefix.MetaDominant.assoc" and "prefix.MetaDominantCov.assoc.gz"; for recessive model, they are "prefix.MetaRecessive.assoc" and "prefix.MetaRecessiveCov.assoc.gz". Internally, in dominant models, genotypes 0/1/2 are coded as 0/1/1; in recessive models, genotypes 0/1/2 are coded as 0/0/1. Missing genotypes will be imputed to the mean.

Input files

Genotype files (VCF, BCF, BGEN, KGG)

Rvtests supports VCF (Variant Call Format) files. Files in both plai

View on GitHub
GitHub Stars141
CategoryDevelopment
Updated4mo ago
Forks42

Languages

C++

Security Score

82/100

Audited on Nov 13, 2025

No findings