We have provided multiple toy datasets for testing the pipeline and
ensuring all paths and dependencies are properly setup. To set the toy
data paths to your local directory, run the following script.
$ cd nf-gwas-pipeline
$ python utils/paths.py
Download Nextflow Executable
Nextflow requires a POSIX compatible system (Linux, OS X, etc.) and Java
8 (or later, up to 11) to be installed. Once downloaded, optionally make
the nextflow file accessible by your $PATH variable so you do not have
to specify the full path to nextflow each time.
$ curl -s https://get.nextflow.io | bash
Quick Start with Docker
We have created a pre-built Docker image with all of the dependencies
installed. To get started, first make sure Docker is
installed. Then pull down the
image onto your local machine.
$ docker pull montilab/gwas:latest
or
Optionally you could build this image yourself from the Dockerfile which
specifies all of the dependencies required. Note: This might take a
while!
N E X T F L O W ~ version 19.04.1
Launching `gwas.nf` [jolly_fermi] - revision: 46311ebd05
-
G W A S ~ P I P E L I N E
================================
indir :<YOUR PATH>/data/
outdir :<YOUR PATH>/results
vcf :<YOUR PATH>/data/toy_vcf.csv
pheno :<YOUR PATH>/data/pheno_file_logistic.csv
snpset :<YOUR PATH>/data/snpset.txt
phenotype : outcome
covars : age,sex,PC1,PC2,PC3,PC4
model : logistic
test: Score
ref : hg19
-
[warm up] executor >local
executor >local (141)
[60/b5b95e] process > qc_miss [100%] 22 of 22 <e2><9c><94>
[11/fa0fbd] process > annovar_ref [100%] 1 of 1 <e2><9c><94>
[8f/25f8fa] process > qc_mono [100%] 22 of 22 <e2><9c><94>
[82/069a6d] process > vcf_to_gds [100%] 22 of 22 <e2><9c><94>
[3e/819e86] process > merge_gds [100%] 1 of 1 <e2><9c><94>
[c3/f23390] process > nullmod_skip_pca_grm [100%] 1 of 1 <e2><9c><94>
[ed/91344b] process > gwas_skip_pca_grm [100%] 22 of 22 <e2><9c><94>
[b4/3aea3e] process > caf_by_group_skip_pca_grm [100%] 22 of 22 <e2><9c><94>
[e2/3c778d] process > merge_by_chr [100%] 22 of 22 <e2><9c><94>
[fe/33ebd4] process > combine_results [100%] 1 of 1 <e2><9c><94>
[8b/2020d3] process > annovar_input [100%] 1 of 1 <e2><9c><94>
[61/3a373f] process > plot [100%] 1 of 1 <e2><9c><94>
[66/6f4246] process > annovar [100%] 1 of 1 <e2><9c><94>
[85/d4266b] process > add_annovar [100%] 1 of 1 <e2><9c><94>
[9e/4fc2fe] process > report [100%] 1 of 1 <e2><9c><94>
Completed at: 15-Oct-2020 17:30:28
Duration : 44.1s
CPU hours : 0.1
Succeeded : 141
Alternative to Docker
If you are running the pipeline on a HPC that does not support docker
(BU’s Shared Computing Cluster), you can load the dependencies and run
the pipeline as follows. (In addition, you need to install following R
packages: SeqArray, GENESIS, Biobase, SeqVarTools, dplyr, SNPRelate,
ggplot2, data.table, reshape2, latex2exp, knitr, EBImage, GenomicRanges,
TxDb.Hsapiens.UCSC.hg19.knownGene, GMMAT)
run with .config file:
nextflow run gwas.nf -c $PWD/configs/gene_1KG_linear.config
run with equivalent command:
nextflow run gwas.nf --vcf_list $PWD/data/1KG_vcf.csv --pheno $PWD/data/1KG_pheno_linear.csv --phenotype outcome --covars PC1,PC2,PC3,PC4 --pca_grm --model linear --test Score --gene_based --group Population --max_pval 0.01 --ref_genome hg19