Wiki

Clone wiki

FAST / Quickstart

Sample scripts for running FAST with typical options

With Summary Data

All methods using Case-Control (i.e. dichotomous) phenotype with logistic regression, LD computed on the fly for each chromosome.

#!/bin/bash
# This script will run FAST in mode=summary with LD computed on the fly and basic set of inputs.
# The input is from files in DATA.summary
# The output is stored in OUT

time ./FAST \
       --summary-file ./DATA.summary/chr1.simple \
       --hap-file ./DATA.summary/chr1.hap \
       --pos-file ./DATA.summary/chr1.hap.ra \
       --out-file ./OUT/output6 \
       --gene-set ./DATA.summary/genes.txt \
       --chr 1 \
       --mode summary \
       --n-sample 2000 \
       --logistic-minsnp-perm \
       --logistic-minsnp-gene-perm \
       --logistic-vegas-perm \
       --logistic-gates \
       --logistic-gwis-perm \
       --logistic-bf-perm

All methods using Summary data with pre-computed LD files for each chromosome, quantitative phenotype

#!/bin/bash
# This script will run FAST in mode=summary with pre-computed ld files.
# The input is from files in DATA.summary
# The output is stored in OUT

for CHR in {1..22}
do
time ./FAST \
       --summary-file ./DATA.summary/chr$CHR.summary \
       --multipos-file ./DATA.summary/chr$CHR.multiPos.txt \
       --ld-file ./DATA.summary/chr$CHR.ld \
       --allele-file ./DATA.summary/chr$CHR.allele.info \
       --out-file ./OUT/output \
       --gene-set ./DATA.summary/genes_list.txt \
       --chr $CHR \
       --pheno-var 0.1875 \
       --n-sample 2000 \
       --mode summary \
       --maf-cutoff 0.01 \
       --max-perm 1000000\
       --linear-minsnp-perm \
       --linear-minsnp-gene-perm \
       --linear-vegas-perm \
       --linear-gates \
       --linear-gwis-perm \
       --linear-bf-perm 
done

With Genotype data

All methods using linear regression model

#!/bin/bash
# This script will run FAST in mode=genotype with linear model on all 22 chromosomes.
# The input is FAST format files located in DATA.geno directory
# The output is stored in OUT directory

for CHR in {1..22}
do
  time ./FAST \
       --tped-file ./DATA.geno/chr$CHR.tped \
       --snpinfo-file ./DATA.geno/chr$CHR.snp.info \
       --mlinfo-file ./DATA.geno/chr$CHR.mlinfo \
       --indiv-file ./DATA.geno/id.txt \
       --out-file ./OUT/output\
       --trait-file ./DATA.geno/Phenotype.tfam \
       --gene-set ./DATA.geno/genes_list.txt \
       --chr $CHR \
       --mode genotype \
       --linear-bf-perm \
       --linear-minsnp-perm \
       --linear-minsnp-gene-perm \
       --linear-vegas-perm \
       --linear-gwis-perm \
       --linear-gates \

done  

All methods using linear regression model, data format is IMPUTE2 output

#!/bin/bash
# This script will run FAST in mode=genotype with linear model on all 22 chromosomes.
# The input is IMPUTE2 format files located in DATA.geno directory
# The output is stored in OUT directory

for CHR in {1..22}
do
  time ./FAST \
       --impute2-geno-file ./DATA.geno/chr$CHR.impute2.geno \
       --impute2-info-file ./DATA.geno/chr$CHR.impute2.info \
       --indiv-file ./DATA.geno/id.txt \
       --out-file ./OUT/output\
       --trait-file ./DATA.geno/Phenotype.tfam \
       --gene-set ./DATA.geno/genes_list.txt \
       --chr $CHR \
       --maf-cutoff 0.01 \
       --mode genotype \
       --max-perm 1000000 \
       --linear-bf-perm \
       --linear-minsnp-perm \
       --linear-minsnp-gene-perm \
       --linear-vegas-perm \
       --linear-gwis-perm \
       --linear-gates \
       --flank 20000 \
       --n-threads 1
done  

All methods using logistic regression model

#!/bin/bash
# This script will run FAST in mode=genotype with logistic model on all 22 chromosomes.
# The input is FAST format files located in DATA.geno directory
# The output is stored in OUT directory

for CHR in {1..22}
do
  time ./FAST \
       --tped-file ./DATA.geno/chr$CHR.tped \
       --snpinfo-file ./DATA.geno/chr$CHR.snp.info \
       --mlinfo-file ./DATA.geno/chr$CHR.mlinfo \
       --indiv-file ./DATA.geno/id.txt \
       --out-file ./OUT/output\
       --trait-file ./DATA.geno/Phenotype_binary.tfam \
       --gene-set ./DATA.geno/genes_list.txt \
       --chr $CHR \
       --maf-cutoff 0.01 \
       --mode genotype \
       --max-perm 1000 \
       --logistic-bf-perm \
       --logistic-minsnp-perm \
       --logistic-minsnp-gene-perm \
       --logistic-vegas-perm \
       --logistic-gwis-perm \
       --logistic-gates \
       --flank 20000 \
       --n-threads 1
done

With New methods in FAST.2.4

Single SNP Cox-PH regression

#!/bin/bash                                                                     
# This script will run FAST in mode=genotype with single SNP Cox-PH model.                 
# The input is from files in DATA.geno                                          
# The output is stored in OUT                                                   

time ../FAST \
       --impute2-geno-file ./DATA.geno/chr1.impute2.geno.gz \
       --impute2-info-file ./DATA.geno/chr1.impute2.info.gz \
       --indiv-file ./DATA.geno/id.txt.gz \
       --out-file ./OUT/output.COX.impute2 \
       --trait-file ./DATA.geno/Cox.Pheno \
       --chr 1 \
       --maf-cutoff 0.01 \
       --mode genotype \
       --cox-cov 3 \
       --cox-strata 0 \
       --cox-snp

Gene-based Cox-PH regression

#!/bin/bash                                                                                                            
# This script will run FAST in mode=genotype with gene-based Cox-PH model.                                                        
# The input is from files in DATA.geno                                                                                 
# The output is stored in OUT                                                                                          

time ../FAST \
       --impute2-geno-file ./DATA.geno/chr1.impute2.geno.gz \
       --impute2-info-file ./DATA.geno/chr1.impute2.info.gz \
       --indiv-file ./DATA.geno/id.txt.gz \
       --out-file ./OUT/output.COX.impute2 \
       --trait-file ./DATA.geno/Cox.Pheno \
       --gene-set ./DATA.geno/genes1.txt.gz\
       --chr 1 \
       --maf-cutoff 0.01 \
       --mode genotype \
       --cox-cov 3 \
       --cox-strata 0 \
       --cox-gene\
       --flank 0

SAPPHOI in genotype mode

#!/bin/bash                                                                                                            
# This script will run FAST in mode=genotype with SAPPHOI model. To run SAPPHOC, simply change the --SAPPHOI option to --SAPPHOC.                                                        
# Format of the trait file please refer to the InputFile page
# Have to specify --num-phenotypes, namely how many phenotypes SAPPHO is running on.
# All other options, including the genotype inputs and run options, are exactly same as for single phenotype methods.                                                                                                                                                                    

time ../FAST \
       --impute2-geno-file ./DATA.geno/chr1.impute2.geno.gz \
       --impute2-info-file ./DATA.geno/chr1.impute2.info.gz \
       --indiv-file ./DATA.geno/id.txt.gz \
       --out-file ./OUT/output.PL.impute2 \
       --trait-file ./DATA.geno/PL.Pheno \
       --maf-cutoff 0.01 \
       --mode genotype \
       --num-phenotypes 4\
       --sapphoI

SAPPHOI in summary mode

#!/bin/bash                                                                                                            
# This script will run FAST in mode=summary with SAPPHOI model. SAPPHOC could not be run in summary mode.              
# Format of the summary file please refer to the InputFile page
# Have to specify --num-phenotypes, namely how many phenotypes SAPPHO is running on.
# All other options, including the --ld-file, --allele-file, --hap-file, are exactly same as for single phenotype methods.                                                                                                                                                                    

time ../FAST \
       --summary-file no example\ #Format of summary file please refer to InputFile page
       --ld-file ./DATA.summary/chr$CHR.ld\
       --allele-file ./DATA.summary/chr$CHR.allele.info \
       --pheno-varcov-file no example\ #Format of pheno-varcov-file please refer to InputFile page
       --out-file ./OUT/\
       --maf-cutoff 0.01 \
       --mode summary \
       --num-phenotypes 4\
       --sappho-alpha 0.2\
       --sapphoI

Updated