nf-core/mashwrapper is a wrapper around the program Mash and the NCBI Datasets command line tools. Ultimately, the tool identifies the most likely species from a pair of gzipped fastq reads. The database that the reads are tested against can either be generated via the tool from a text file (--get_database) or an already built database supplied to the tool (--use_database). The output is a text file of the top five hits associated with the input reads along with standard Mash output and a best species match is determined by a cutoff based on the Mash Dist output. For Legionella, we conservatively estimated this value to be < 0.05. If you use this tool with another species, you should adjust this value to what is best for your organism.
The pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity 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. Where possible, these processes have been submitted to and installed from nf-core/modules in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!
On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the nf-core website.
- Confirm input sample sheet
- OPTIONAL (--get_database): Confirm input organism sheet
- OPTIONAL (--get_database): Download genomes from NCBI using NCBI datasets command line tool
- OPTIONAL (--get_database): Format donwloaded genomes to be Genus_Species_GenebankIdentifier.fna using NCBI dataformat command line tool
- OPTIONAL (--get_database): Build individual Mash sketches for all genomes downloaded
- OPTIONAL (--get_database): Build Mash database for all mash sketches
- Test fastq.gz reads against either an optionally built Mash database or one provided by the user
- Collate results from each isolate of interest tested against the Mash database
-
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) -
Clone the pipeline and test it on a minimal dataset:
A test dataset is available once you git clone this repo and includes five files:
- inputDB.txt - text file of species to download when using the test profile testGet (-profile testGet). Does not include a header
- inputReads.csv - csv file with single pair of reads listed and includes the header: sample,fastq_1,fastq_2
- myMashDatabase.msh - prebuilt Mash database using the same isolates listed in the inputDB.txt file. Will be used if test profile is set to testUse (-profile testUse)
- subERR125190_(1,2).fastq.gz - subset reads of Legionella fallonii to only 45000 reads
For CDC users, you need to include the flag --custom_config_base and point to the conf subdirectory to supply the certificate information for singularity use, via this custom config file (e.g., --custom_config_base /scicomp/home-pure/ptx4/mashwrapper/conf)
## test out download of database
nextflow run mashwrapper -profile testGet,YOURPROFILE
## test out using pre-built database
nextflow run mashwrapper -profile testUse,YOURPROFILE
- Start running your own analysis!
## Use your already built database
nextflow run nf-core/mashwrapper -profile <docker/singularity/podman/shifter/charliecloud/conda/institute> --input samplesheet.csv --use_database myMashDatabase.msh --custom_config_base /scicomp/home-pure/ptx4/mashwrapper/conf
## Download and built your database for organism(s) of interest
nextflow run nf-core/mashwrapper -profile <docker/singularity/podman/shifter/charliecloud/conda/institute> --input samplesheet.csv --get_database organismsheet.txt --custom_config_base /scicomp/home-pure/ptx4/mashwrapper/conf
The nf-core/mashwrapper pipeline comes with documentation about the pipeline usage, parameters and output.
nf-core/mashwrapper was originally written by Jenna Hamlin.
We thank the following people for their extensive assistance in the development of this pipeline:
- Sateeshe Peri
- Micheal Cipriano
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 #mashwrapper
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.