From 43e82c66c45a61c8187da3778fe0fced4a16d9e0 Mon Sep 17 00:00:00 2001 From: zhanxw Date: Fri, 28 Feb 2014 12:11:55 -0500 Subject: [PATCH] improve example --- example/README | 50 -------------------------------------------- example/README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++ example/cmd.sh | 8 ++++++- 3 files changed, 60 insertions(+), 51 deletions(-) delete mode 100644 example/README create mode 100644 example/README.md diff --git a/example/README b/example/README deleted file mode 100644 index b2fbbf0..0000000 --- a/example/README +++ /dev/null @@ -1,50 +0,0 @@ -README -====== - -Here we present several exemplar command lines to use rvtests. -A complete manual can be found: -https://github.com/zhanxw/rvtests - -= run single variant test perform wald test - -../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --out out1 - - -= using the second column of phenotype - -../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --mpheno 2 --out out2 - - -= using the phenotype y2 - -../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --pheno-name y2 --out out3 - - -= use covariate c1,c2 - -../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --covar covar --covar-name c1,c2 --out out4 - -= use covariate file with missing data - -../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --covar covar.missing --covar-name c1,c2 --out out5 - -= produce meta-analysis statistics for unrelated individuals, using covariates, regress covariates on pheontpye, then inverse normalize residuals, perform score test and generate covariance matrices - -../executable/rvtest --pheno pheno --inVcf example.vcf --meta score,cov --covar covar --covar-name c1,c2 --useResidualAsPhenotype --inverseNormal --out out6 - -= generate kinship matrix from pedigree - -../executable/vcf2kinship --ped pheno --bn --out output - -= generate empirical kinship matrix from VCF file using Balding-Nicols method - -../executable/vcf2kinship --inVcf example.vcf --bn --out output - -= produce meta-analysis statistics for related individuals, using covariates, regress covariates on pheontpye, then inverse normalize residuals, perform score test and generate covariance matrices - -need to use a kinship matrix (see previous steps) output.kinship -then, use: - -../executable/rvtest --pheno pheno --inVcf example.vcf --meta score,cov --covar covar --covar-name c1,c2 --useResidualAsPhenotype --inverseNormal --kinship output.kinship --out out7 - - diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..cee8b88 --- /dev/null +++ b/example/README.md @@ -0,0 +1,53 @@ +README +====== + +Here we present several exemplar command lines to use rvtests. +A complete manual can be found: +[https://zhanxw.github.io/rvtests/](https://zhanxw.github.io/rvtests/) + += run single variant test perform wald test + + ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --out out1 + + += using the second column of phenotype + + ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --mpheno 2 --out out2 + + += using the phenotype y2 + + ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --pheno-name y2 --out out3 + + += use covariate c1,c2 + + ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --covar covar --covar-name c1,c2 --out out4 + += use covariate file with missing data + + ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --covar covar.missing --covar-name c1,c2 --out out5 + += produce meta-analysis statistics for unrelated individuals, using covariates, regress covariates on pheontpye, then inverse normalize residuals, perform score test and generate covariance matrices + + ../executable/rvtest --pheno pheno --inVcf example.vcf --meta score,cov --covar covar --covar-name c1,c2 --useResidualAsPhenotype --inverseNormal --out out6 + += generate kinship matrix from pedigree + + ../executable/vcf2kinship --ped pheno --bn --out output + += generate empirical kinship matrix from VCF file using Balding-Nicols method + + ../executable/vcf2kinship --inVcf example.vcf --bn --out output + += produce meta-analysis statistics for related individuals, using covariates, regress covariates on pheontpye, then inverse normalize residuals, perform score test and generate covariance matrices + +need to use a kinship matrix (see previous steps) output.kinship +then, use: + + ../executable/rvtest --pheno pheno --inVcf example.vcf --meta score,cov --covar covar --covar-name c1,c2 --useResidualAsPhenotype --inverseNormal --kinship output.kinship --out out7 + + += produce meta-analysis statistics under dominant and recessive model for unrelated individuals, using covariates (c1, c2 columns in covar) and phenotype (y4 column in pheno) + + ../executable/rvtest --pheno pheno --inVcf example.vcf --meta score,cov,dominant,recessive --covar covar --covar-name c1,c2 --out out8 --pheno-name y4 diff --git a/example/cmd.sh b/example/cmd.sh index d3d70da..e60bbe2 100644 --- a/example/cmd.sh +++ b/example/cmd.sh @@ -1,5 +1,11 @@ +#!/bin/bash # each command here is an example of how to use rvtests -# see README for more information +# see README.md for more information + +if [ ! -e ../executable/rvtest ]; then + (cd ../; make) +fi + ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --out out1 ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --mpheno 2 --out out2 ../executable/rvtest --pheno pheno --inVcf example.vcf --single wald --pheno-name y2 --out out3