🔥🌿🐦🔥 PhyloPHoeNIx is meant to be run in tandem with 🔥🐦🔥 PHoeNIx to aid in outbreak investigations by estimating relatedness between samples. Both pipelines were built and are maintained by bioinformatians in the CDC's Division of Healthcare Quality Promotion (DHQP) to standardize surveillance of antibiotic resistance threats, identification of novel resistance threats and support public health laboratories in their genomic analysis of healthcare-associated infection organisms. PhyloPHoeNIx is a comprehensive pipeline that performs:
- Automation of DHQP's iterative outbreak analysis (runs analysis on all samples and when --by_st is passed also separates isolates by ST and runs each group through the analysis)
- SNV (single-nucleotide variant) matrix creation
- Phylogenetic tree building
- Reports the % core genome used in the SNV determination
cdcgov/phylophoenix is a bioinformatics best-practice analysis pipeline for relatedness determination using PHoeNIx output.
The pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses containers making installation trivial and results highly reproducible. The Nextflow DSL2 implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies.
-
Install
Nextflow
(>=22.10.1
) -
Install any of
Docker
orSingularity
(you can follow this tutorial) for full pipeline reproducibility. -
Download the pipeline and test it on a minimal dataset with a single command:
nextflow run cdcgov/phylophoenix -profile test,singularity --outdir <OUTDIR>
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
andsingularity
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
, please use thenf-core download
command to download images first, before running the pipeline. Setting theNXF_SINGULARITY_CACHEDIR
orsingularity.cacheDir
Nextflow options enable you to store and re-use the images from a central location for future pipeline runs.
- The pipeline comes with config profiles called
-
Start running your own analysis!
PhyloPHoeNIx | SNVPhyl |
---|---|
You can either input samples using a typical nextflow samples sheet. This samplesheet should have the columns sample,directory
. Here the directory would be to a sample's directory within a larger PHoeNIx output directory. For example, your samplesheet should look like this:
sample,directory
2023BB-00546,/PATH/PHX_output_dir/2023BB-00546
2023BB-00847,/PATH/PHX_output_dir/2023BB-00847
This method is useful for combining samples from different PHoeNIx directories and the full command would look like this:
nextflow run cdcgov/phylophoenix -profile singularity --outdir <OUTDIR> --input Directory_samplesheet.csv
Alternatively, if you want to analyze all samples in one PHoeNIx output directory you can pass the path to --input_dir
and a samplesheet as described above will be created from all samples in this directory. Using this method the full command would look like this:
nextflow run cdcgov/phylophoenix -profile singularity --outdir <OUTDIR> --indir <PATH TO PHOENIX DIR>
By default PhyloPHoeNIx creates a SNV matrix and phylogenetic tree from all samples that pass QC in the directory. If you want to also group samples by MLST and create additional SNV matrices and phylogenetic trees for each MLST pass the --by_st
argument.
nextflow run cdcgov/phylophoenix -profile singularity --outdir <OUTDIR> --input Directory_samplesheet.csv --by_st
If you want to skip running all samples together and just want to run in --by_st
mode add the --no_all
parameter.
nextflow run cdcgov/phylophoenix -profile singularity --outdir <OUTDIR> --input Directory_samplesheet.csv --by_st --no_all
A minimum of 3 samples of the same MLST are required to create a SNV matrix and phylogenetic tree.
Here is an example output file tree that is reduced for space (3 samples are the min for creating a phylogenetic tree).
📦phylophoenix_output
┣ 📂<ST>
┃ ┣ 📂<sample_id>
┃ ┃ ┣ 📜<sample_id>.bam
┃ ┃ ┣ 📜<sample_id>_sorted.bam
┃ ┃ ┣ 📜<sample_id>_filtered_density.txt
┃ ┃ ┣ 📜<sample_id>_freebayes_filtered.vcf.gz
┃ ┃ ┣ 📜<sample_id>_freebayes.vcf
┃ ┃ ┗ 📜<sample_id>_mpileup.vcf.gz
┃ ┣ 📜<ST>_centroid_info.txt
┃ ┣ 📜<ST>_cleaned_metadata.tsv --> upload to Microreact
┃ ┣ 📜<ST>_SNVPhyl.newick --> upload to Microreact/iTol or another visualisation program
┃ ┣ 📜<ST>_snvAlignment.phy
┃ ┣ 📜<ST>_snvMatrix.tsv --> upload to Microreact
┃ ┣ 📜<ST>_vcf2core.tsv
┃ ┣ 📜filtered_density_all.txt
┃ ┣ 📜filterStats.txt
┃ ┣ 📜mappingQuality.txt
┃ ┣ 📜new_invalid_positions.bed
┃ ┗ 📜TreeStats_SNVPhyl.txt
┣ 📂ST_SampleSheets
┃ ┗ <ST>_samplesheet.csv
┣ 📂pipeline_info
┃ ┣ 📜execution_report_.html
┃ ┣ 📜execution_timeline_.html
┃ ┣ 📜execution_trace_.txt
┃ ┣ 📜pipeline_dag_.html
┃ ┣ 📜samplesheet.valid.csv
┃ ┗ 📜software_versions.yml
┣ 📜Directory_samplesheet.csv
┣ 📜SNVPhyl_GRiPHin_Summary.xlsx
┗ 📜GRiPHin_Summary.xlsx
The core of PhyloPHoeNIx is a pipleline originally developed by @apetkau (Aaron Petkau), called SNVPhyl. There are standalone Nextflow, Galaxy, and [WDL] versions of SNVPhyl if you prefer to use those. For documentation on SNVPhyl see the following links.
We thank the following people for their extensive assistance and test in the development of this pipeline:
- Nick Vlachos @nvlachos
- Thao Masters @masters-thao
- Alyssa Kent @Alyssa-Kent
Add beta testers here....
If you would like to contribute to this pipeline, please see the contributing guidelines.
For further information or help, don't hesitate to get in touch on the Slack #phylophoenix
channel (you can join with this invite).
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md
file.
You can cite the nf-core
publication as follows:
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.
- CDC GitHub Open Project Request Form [Requires a CDC Office365 login, if you do not have a CDC Office365 please ask a friend who does to submit the request on your behalf. If you're looking for access to the CDCEnt private organization, please use the GitHub Enterprise Cloud Access Request form.]
- Open Practices
- Rules of Behavior
- Thanks and Acknowledgements
- Disclaimer
- Contribution Notice
- Code of Conduct
Describe the purpose of your project. Add additional sections as necessary to help collaborators and potential collaborators understand and use your project.
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.