C-WAP is a bash-based bioinformatics pipeline for the analysis of either long-read (ONT or PacBio) or short-read (Illumina) whole genome sequencing data of DNA extracted from wastewater. It was developed for SARS-CoV2 and its variants.
C-WAP was developed by the United States Food and Drug Administration, Center for Food Safety and Applied Nutrition.
The CFSAN Wastewater Analysis Pipeline uses a reference-based alignment to create a matrix of SNPs for a given set of samples and estimate the perentage of SC2 variants in the sample
The process includes the following:
- Designating a reference and NGS data in fastq format
- Alignment of reads to the reference via Bowtie2
- Taxonomy check via kraken2
- Processing of alignment results via samtools
- Detection of variant positions with ivar
- Determine composition of variants via kallisto, linear regression, kraken2/bracken and freyja
- Generate an html and pdf formatted summary of results
User provided:
Auto-fetched by C-WAP:
- ghostscript
- kraken2 v2.1.2
- bracken
- samtools v1.13
- bcftools
- ivar
- bowtie2
- minimap2 v2.22
- entrez-direct
- pangolin
- Freyja
- kallisto
- wkhtmltopdf
./startWorkflow.nf assumes that conda, nextflow and gs executables are available in the search path. All other dependencies are imported via conda. To trigger this installation, execute c-wap/prepare_envs.sh
(no root privileges needed). The series of acquisition of the dependencies and creating of the env's might take a substantially long time (potentially hours). Analysis calls to C-WAP will make use of the cached env's stored under the c-wap/conda subdirectory and are expected to finish substantially faster. To update the dependencies (more often required for tools with a biological DB) delete the respective environement folder c-wap/conda/env-<toolName>
and re-execute c-wap/prepare_envs.sh
.
Install nextflow and conda. Afterwards, download c-wap repository and save. In addition, also obtain a copy of the kraken2 standard DB (~50GB). You can either download a copy from here: https://benlangmead.github.io/aws-indexes/k2 or you can compile your own version following the instructions under the "Standard Kraken2 Database" section here: https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown
Afterwards, set $K2_STD_DB_PATH to your download location.
The driver script is startWorkflow.nf
and a standard execution with paired end illumina reads would be:
startWorkflow.nf --platform i --primers path/to/bed --in path/to/fastq/ --out path/to/outputDir
Note that the input files need to be compressed fastq.gz formats only and .sam, .bam or uncompressed .fastq files result in a fatal runtime error.
C-WAP produces a number of files from the various processing steps.
sorted.stats
- Samtools stats output from aligned but untrimmed reads
kallisto.out
- Python-parsed summary of the kallisto lineage abundance estimates
deconvolution.output
- Output of linear deconvolution method for estimating variant composition
linearDeconvolution_abundance.csv
- Linear deconvolution estimates of variant composition
freyja.demix
- Lineage abundance estimate generated by Freyja
kallisto_abundance.tsv
- Kallisto estimates of variant composition
k2-majorCovid.out
- Covid-specific kraken2 output with major lineages identified, against majorCovid DB
k2-majorCovid_bracken.out
- Bracken lineage abundance estimates, against majorCovid DB
k2-allCovid.out
- Covid-specific kraken2 output, against allcovid DB
k2-allCovid_bracken.out
- Bracken lineage abundance estimates, against allCovid DB
pangolin_lineage_report.csv
- Pangolin lineage prediction for the consensus sequence
consensus.fa
- consensus fasta file generated by ivar
calls.vcf.gz
- Variant call file generated by bcftools
pos-coverage-quality.tsv
- QC metrics on coverage and quality obtained from the pileup file
rawVarCalls.tsv
- Variant calls generated by iVar, vcg equivalent of samtools
k2-std.out
- kraken2 output with standard database
report
- standalone directory containing html and pdf summary report
Variant composition analyses should be interpreted with caution where they should be treated as suspect if there are substantial gaps in coverage across the reference genome and/or a lack of sequencing depth. The linear deconvolution and kraken2/bracken covid method are internally developed methods and under testing and validation.
We gratefully acknowledge all data contributors, i.e., the Authors and their Originating laboratories responsible for obtaining the specimens, and their Submitting laboratories for generating the genetic sequence and metadata and sharing via the GISAID Initiative, some of which this research utlizes.
Khare, S., et al (2021) GISAID’s Role in Pandemic Response. China CDC Weekly, 3(49): 1049-1051. doi: 10.46234/ccdcw2021.255 PMCID: 8668406
This work is currently unpublished. If you are making use of this package, we would appreciate if you gave credit to our repository.
See the LICENSE.txt file included in the C-WAP Pipeline distribution.