MycoSNP is a bioinformatics pipeline for performing whole genome sequencing analysis of fungal organisms (e.g. Candida auris) from Illumina paired-end reads. It is built with the nf-core template.
This repository contains two workflows that are run independently:
- Pre-MycoSNP workflow: A first-pass workflow for quick answers
- Fungal taxonomic classification and Candida auris clade typing, using de novo assemblies
- Main MycoSNP workflow (default workflow):
- Reference-based SNP calling
- Tree building
- Identification of antifungal-resistance mutations
- Usage: An overview of how MycoSNP works, how to run it and a description of all of the different command-line flags.
- Parameters: Options, flags, and inputs.
- Output: An overview of the different results produced by MycoSNP and how to interpret them.
-
Install
Nextflow
(>=21.10.3
) -
Install any of
Docker
,Singularity
,Podman
,Shifter
orCharliecloud
for full pipeline reproducibility (please only useConda
as a last resort; see docs). More info on using containers with Nextflow here.
Tip
Using Apptainer/Singularity with Nextflow version >=23 can result in failures in Linux server environments due to peculiarities with container directory mounting. If you are experiencing No such file or directory
errors, try running with an earlier version of Nextflow (we've had success with 22.10.6).
- Test the main MycoSNP workflow on pre-defined minimal test samples with a single command:
nextflow run CDCgov/mycosnp-nf -profile test,YOURPROFILE
Note
The samples for the test run are bacterial (N. gonorrhoeae), not fungal. This is intentional so the test finishes in a few minutes (as opposed to longer for fungal samples with much larger genomes).
Tip
Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (YOURPROFILE
in the example command above). You can chain multiple config profiles in a comma-separated string.
- The pipeline comes with config profiles called
docker
,singularity
,podman
,shifter
,charliecloud
andconda
which instruct the pipeline to use the named tool for software management. For example,-profile test,docker
. - Please check nf-core/configs to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use
-profile <institute>
in your command. This will enable eitherdocker
orsingularity
and set the appropriate execution settings for your local compute environment. - If you are using
singularity
and are persistently observing issues downloading Singularity images directly due to timeout or network issues, then you can use the--singularity_pull_docker_container
parameter to pull and convert the Docker image instead. Alternatively, you can use thenf-core download
command to download images first, before running the pipeline. Setting theNXF_SINGULARITY_CACHEDIR
orsingularity.cacheDir
Nextflow options enables you to store and re-use the images from a central location for future pipeline runs. - If you are using
conda
(not recommended), it is highly recommended to use theNXF_CONDA_CACHEDIR
orconda.cacheDir
settings to store the environments in a central location for future pipeline runs.
- Start running your own analysis!
Note
The --workflow
option specifies which workflow to run (Pre-MycoSNP workflow or main MycoSNP workflow). By default (when no workflow
is specified), the main MycoSNP workflow is executed. See summaries of each workflow in the next section, or more detailed documentation in the Full Documentation.
- Pre-MycoSNP workflow:
nextflow run CDCgov/mycosnp-nf --workflow PRE_MYCOSNP -profile <docker/singularity/other/institute> --input samplesheet.csv
- Main MycoSNP workflow (default workflow):
nextflow run CDCgov/mycosnp-nf -profile <docker/singularity/other/institute> --input samplesheet.csv --fasta reference_genome.fasta
- It is advisable to delete large temporary or log files after the successful completion of the run. It takes a lot of space and may cause issues in future runs.
- Sequencing reads quality metrics (
FastQC
) - Remove unpaired reads (
seqkit pair
) - Trim/filter reads (
FaQCs
) - De novo assembly (
Shovill
) - Taxonomic classification (
GAMBIT
)- Classifies isolate to genus/species level, if possible
- Uses GAMBIT's fungal database v0.2.0. See GAMBIT'S documentation for a list of taxa included in the database.
- Subtyping (
sourmash
)- Compares sourmash sketch of sample against sourmash signature file provided in
assets/sourmash_db/
. - By default, for C. auris, Pre-MycoSNP performs clade typing (Clades I-VI).
- Compares sourmash sketch of sample against sourmash signature file provided in
- Summary report containing genus/species classification, subtype, and read and assembly quality metrics.
Prepares a reference FASTA file for BWA alignment and GATK variant calling by masking repeats in the reference and generating the BWA index.
- Genome repeat identification and masking (
nucmer
) - BWA index generation (
bwa
) - FAI and DICT file creation (
Picard
,Samtools
)
Prepares samples (paired-end FASTQ files) for GATK variant calling by aligning the samples to a BWA reference index and ensuring that the BAM files are correctly formatted. This step also provides different quality reports for sample evaluation.
- Combine FASTQ file lanes if they were provided with multiple lanes.
- Filter unpaired reads from FASTQ files (
SeqKit
). - Down sample FASTQ files to a desired coverage or sampling rate (
SeqTK
). - Trim reads and assess quality (
FaQCs
). - Generate a QC report by extracting data from FaQCs report data.
- Align FASTQ reads to a reference (
BWA
). - Sort BAM files (
SAMTools
). - Mark and remove duplicates in the BAM file (
Picard
). - Clean the BAM file (
Picard "CleanSam"
). - Fix mate information in the BAM file (
Picard "FixMateInformation"
). - Add read groups to the BAM file (
Picard "AddOrReplaceReadGroups"
). - Index the BAM file (
SAMTools
). - FastQC - Filtered reads QC.
- Qualimap mapping quality report.
- MultiQC - Aggregate report describing results and QC from the whole pipeline
Calls variants and generates a multi-FASTA file and phylogeny.
- Call variants (
GATK HaplotypeCaller
). - Combine gVCF files from the HaplotypeCaller into a single VCF (
GATK CombineGVCFs
). - Call genotypes using the (
GATK GenotypeGVCFs
). - Filter the variants (
GATK VariantFiltration
) [default (but customizable) filter: 'QD < 2.0 || FS > 60.0 || MQ < 40.0 || DP < 10']. - Run a customized VCF filtering script (Broad Institute).
- Split the filtered VCF file by sample.
- Select only SNPs from the VCF files (
GATK SelectVariants
). - Split the VCF file with SNPs by sample.
- Create a multi-fasta file from the VCF SNP positions using a custom script (Broad Institute).
- Create a distance matrix file using multi-fasta file(
SNPdists
). - Create phylogeny from multi-fasta file (
rapidNJ
,FastTree2
,quicksnp
,RaxML(optional)
,IQTree(optional)
)
- annotated VCF file (
snpEff
) snpeffr
report. Non-synonymous variants in FKS1 hotspot regions are included in the report.
Once the pod launches, it will present a VS-Code interface and comes with Nextflow, Conda and Docker pre-installed
nf-core/mycosnp was originally developed at CDC (with contributions from many others in the public health bioinformatics community), and is currently maintained by CDC's Mycotic Diseases Branch.
We thank the following people (alphabetical order by last name) for their code contributions or assistance in the development of this pipeline:
- John Arnn @jwarnn
- Ujwal Bagal @urbagal
- Arun Boddapati @arunbodd
- Michael Cipriano @mjcipriano
- Lynn Dotrang @leuthrasp
- Jared Johnson @DOH-JDJ0303
- Christopher Jossart @cjjossart
- Elizabeth Misas @AspTryGlu
- Drewry Morris @drewry
- Zack Mudge @zmudge3
- Harshil Patel @drpatelh
- Sateesh Peri @sateeshperi
- Robert A. Petit III @rpetit3
- Malavika Rajeev @mrajeev08
- Charlotte Royer @royercj
- Chris Sandlin @cssandlin
- Hunter Seabolt @hseabolt
Special thanks to StaPH-B for open-source collaborations and discussions.
Special thanks to CDC's Office of Advanced Molecular Detection (OAMD) and the Scientific Computing and Bioinformatics Support (SciComp) team for supporting development and computing infrastructure.
If you would like to contribute to this pipeline, please see the contributing guidelines.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md
file.
You can cite the MycoSNP
and nf-core
publications as follows:
Bagal UR, Phan J, Welsh RM, Misas E, Wagner D, Gade L, Litvintseva AP, Cuomo CA, Chow NA.
MycoSNP: A Portable Workflow for Performing Whole-Genome Sequencing Analysis of Candida auris.
Methods Mol Biol. 2022; 2517:215-228. doi: 10.1007/978-1-0716-2417-3_17
The nf-core framework for community-curated bioinformatics pipelines.
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.
General disclaimer This repository was created for use by CDC programs to collaborate on public health related projects in support of the CDC mission. GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.
- Open Practices
- Rules of Behavior
- Thanks and Acknowledgements
- Disclaimer
- Contribution Notice
- Code of Conduct
This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.
The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.
This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.
This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.
You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html
The source code forked from other open source projects will inherit its license.
This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Disclaimer and Code of Conduct. For more information about CDC's privacy policy, please visit http://www.cdc.gov/other/privacy.html.
Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.
All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.
This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.
Please refer to CDC's Template Repository for more information about contributing to this repository, public domain notices and disclaimers, and code of conduct.