bactmap

A mapping-based pipeline for creating a phylogeny from bacterial whole genome sequences

https://github.com/nf-core/bactmap

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 10 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    4 of 8 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

bacteria bacterial bacterial-genome-analysis genomics mapping nextflow nf-core phylogeny pipeline tree workflow

Keywords from Contributors

pipelines workflows dsl2 nf-test bioinformatics metagenomics synapse sra geo fastq
Last synced: 4 months ago · JSON representation ·

Repository

A mapping-based pipeline for creating a phylogeny from bacterial whole genome sequences

Basic Info
  • Host: GitHub
  • Owner: nf-core
  • License: mit
  • Language: Nextflow
  • Default Branch: master
  • Homepage: https://nf-co.re/bactmap
  • Size: 73.1 MB
Statistics
  • Stars: 55
  • Watchers: 158
  • Forks: 51
  • Open Issues: 6
  • Releases: 3
Topics
bacteria bacterial bacterial-genome-analysis genomics mapping nextflow nf-core phylogeny pipeline tree workflow
Created over 6 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

nf-core/bactmap

GitHub Actions CI Status GitHub Actions Linting Status AWS CI Cite with Zenodo

Nextflow run with conda run with docker run with singularity

Get help on Slack Follow on Twitter Watch on YouTube

Introduction

nf-core/bactmap is a bioinformatics best-practice analysis pipeline for mapping short reads from bacterial WGS to a reference sequence, creating filtered VCF files, making pseudogenomes based on high quality positions in the VCF files and optionally creating a phylogeny from an alignment of the pseudogenomes.

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.

Pipeline summary

Pipeline summary schematic

The pipeline is composed of the following steps:

  1. Index reference fasta file (BWA index)
  2. Trim reads for quality and adapter sequence (Optional) (fastp)
  3. Estimate genome size (mash sketch)
  4. Downsample fastq files (Optional) (Rasusa)
  5. Variant calling
    1. Read mapping (BWA mem)
    2. Sort and index alignments (SAMtools)
    3. Call and filter variants (BCFtools)
    4. Convert filtered bcf to pseudogenome fasta (vcf2pseudogenome.py)
  6. Create alignment from pseudogenome by concatenating fasta files having first checked that the sample sequences are high quality(calculate_fraction_of_non_GATC_bases.py)
  7. Remove recombination (Optional) (Gubbins)
  8. Extract variant sites from alignment (SNP-sites)
  9. Construct phylogenetic tree (Optional)
    1. Fast/less accurate
    2. Slow/more accurate, maximum likelihood

Quick Start

  1. Install Nextflow (>=21.04.0)

  2. Install any of Docker, Singularity, Podman, Shifter or Charliecloud for full pipeline reproducibility (please only use Conda as a last resort; see docs)

  3. Download the pipeline and test it on a minimal dataset with a single command:

    console nextflow run nf-core/bactmap -profile test,<docker/singularity/podman/shifter/charliecloud/conda/institute>

    • 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 either docker or singularity and set the appropriate execution settings for your local compute environment.
    • If you are using singularity then the pipeline will auto-detect this and attempt to download the Singularity images directly as opposed to performing a conversion from Docker images. If you are persistently observing issues downloading Singularity images directly due to timeout or network issues then please use the --singularity_pull_docker_container parameter to pull and convert the Docker image instead. Alternatively, it is highly recommended to use the nf-core download command to pre-download all of the required containers before running the pipeline and to set the NXF_SINGULARITY_CACHEDIR or singularity.cacheDir Nextflow options to be able to store and re-use the images from a central location for future pipeline runs.
    • If you are using conda, it is highly recommended to use the NXF_CONDA_CACHEDIR or conda.cacheDir settings to store the environments in a central location for future pipeline runs.
  4. Start running your own analysis!

    console nextflow run nf-core/bactmap -profile <docker/singularity/podman/conda/institute> --input samplesheet.csv --reference chromosome.fasta

Documentation

The nf-core/bactmap pipeline comes with documentation about the pipeline usage, parameters and output.

Credits

nf-core/bactmap was originally written by Anthony Underwood, Andries van Tonder and Thanh Le Viet.

We thank the following people for their extensive assistance in the development of this pipeline:

Anthony Underwood's time working on the project was funded by the National Institute for Health Research (NIHR) Global Health Research Unit for the Surveillance of Antimicrobial Resistance (Grant Reference Number 16/136/111) NIHR funded

Contributions and Support

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 #bactmap channel (you can join with this invite).

Citations

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.

Owner

  • Name: nf-core
  • Login: nf-core
  • Kind: organization
  • Email: core@nf-co.re

A community effort to collect a curated set of analysis pipelines built using Nextflow.

Citation (CITATIONS.md)

# nf-core/bactmap: Citations

## [nf-core](https://pubmed.ncbi.nlm.nih.gov/32055031/)

> Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031.

## [Nextflow](https://pubmed.ncbi.nlm.nih.gov/28398311/)

> Di Tommaso P, Chatzou M, Floden EW, Barja PP, Palumbo E, Notredame C. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017 Apr 11;35(4):316-319. doi: 10.1038/nbt.3820. PubMed PMID: 28398311.

## Pipeline tools

* [bcftools](https://www.ncbi.nlm.nih.gov/pubmed/21903627/)
    > Li H. A statistical framework for SNP calling, mutation discovery, association mapping and population genetical parameter estimation from sequencing data. Bioinformatics. 2011 Nov 1;27(21):2987-93. doi: 10.1093/bioinformatics/btr509. Epub 2011 Sep 8. PubMed PMID: 21903627; PubMed Central PMCID: PMC3198575.

* [BWA](https://pubmed.ncbi.nlm.nih.gov/19451168/)
    > Li H, Durbin R. Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics. 2009 Jul 15;25(14):1754-60. doi: 10.1093/bioinformatics/btp324. Epub 2009 May 18. PMID: 19451168; PMCID: PMC2705234.

* [fastp](https://www.ncbi.nlm.nih.gov/pubmed/30423086/)
    > Chen S, Zhou Y, Chen Y, Gu J. fastp: an ultra-fast all-in-one FASTQ preprocessor. Bioinformatics. 2018 Sep 1;34(17):i884-i890. doi: 10.1093/bioinformatics/bty560. PubMed PMID: 30423086; PubMed Central PMCID: PMC6129281.

* [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)
    > Andrews, S. 2019 Babraham Institute Bioinformatics Group

* [FastTree2](https://pubmed.ncbi.nlm.nih.gov/20224823/)
    > Price MN, Dehal PS, Arkin AP. FastTree 2--approximately maximum-likelihood trees for large alignments. PLoS One. 2010 Mar 10;5(3):e9490. doi: 10.1371/journal.pone.0009490. PMID: 20224823; PMCID: PMC2835736.

* [Gubbins](https://pubmed.ncbi.nlm.nih.gov/25414349/)
    > Croucher NJ, Page AJ, Connor TR, Delaney AJ, Keane JA, Bentley SD, Parkhill J, Harris SR. Rapid phylogenetic analysis of large samples of recombinant bacterial whole genome sequences using Gubbins. Nucleic Acids Res. 2015 Feb 18;43(3):e15. doi: 10.1093/nar/gku1196. Epub 2014 Nov 20. PMID: 25414349; PMCID: PMC4330336.

* [IQ-TREE2](https://pubmed.ncbi.nlm.nih.gov/32011700/)
    > Minh BQ, Schmidt HA, Chernomor O, Schrempf D, Woodhams MD, von Haeseler A, Lanfear R. IQ-TREE 2: New Models and Efficient Methods for Phylogenetic Inference in the Genomic Era. Mol Biol Evol. 2020 May 1;37(5):1530-1534. doi: 10.1093/molbev/msaa015. Erratum in: Mol Biol Evol. 2020 Aug 1;37(8):2461. PMID: 32011700; PMCID: PMC7182206.

* [Mash](https://pubmed.ncbi.nlm.nih.gov/27323842/)
    > Ondov BD, Treangen TJ, Melsted P, Mallonee AB, Bergman NH, Koren S, Phillippy AM. Mash: fast genome and metagenome distance estimation using MinHash. Genome Biol. 2016 Jun 20;17(1):132. doi: 10.1186/s13059-016-0997-x. PMID: 27323842; PMCID: PMC4915045.

* [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)
    > Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.

* [RapidNJ](https://birc.au.dk/software/rapidnj/)
    > Simonsen M, Mailund T, Pedersen CNS. Rapid Neighbour Joining. Proceedings of the 8th Workshop in Algorithms in Bioinformatics (WABI), LNBI 5251, 113-122, Springer Verlag, October 2008. doi:10.1007/978-3-540-87361-7_10

* [RAxML-NG](https://pubmed.ncbi.nlm.nih.gov/31070718/)
    > Kozlov AM, Darriba D, Flouri T, Morel B, Stamatakis A. RAxML-NG: a fast, scalable and user-friendly tool for maximum likelihood phylogenetic inference. Bioinformatics. 2019 Nov 1;35(21):4453-4455. doi: 10.1093/bioinformatics/btz305. PMID: 31070718; PMCID: PMC6821337.

* [Rasusa](https://github.com/mbhall88/rasusa)
    > Hall MB. Rasusa: Randomly subsample sequencing reads to a specified coverage. 2019. doi:10.5281/zenodo.3731394

* [samtools](https://www.ncbi.nlm.nih.gov/pubmed/19505943/)
    > Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. doi: 10.1093/bioinformatics/btp352. Epub 2009 Jun 8. PubMed PMID: 19505943; PubMed Central PMCID: PMC2723002.

* [SNP-sites](https://pubmed.ncbi.nlm.nih.gov/28348851/)
    > Page AJ, Taylor B, Delaney AJ, Soares J, Seemann T, Keane JA, Harris SR. SNP-sites: rapid efficient extraction of SNPs from multi-FASTA alignments. Microb Genom. 2016 Apr 29;2(4):e000056. doi: 10.1099/mgen.0.000056. PMID: 28348851; PMCID: PMC5320690.

## Software packaging/containerisation tools

* [Anaconda](https://anaconda.com)
    > Anaconda Software Distribution. Computer software. Vers. 2-2.4.0. Anaconda, Nov. 2016. Web.

* [Bioconda](https://pubmed.ncbi.nlm.nih.gov/29967506/)
    > Grüning B, Dale R, Sjödin A, Chapman BA, Rowe J, Tomkins-Tinch CH, Valieris R, Köster J; Bioconda Team. Bioconda: sustainable and comprehensive software distribution for the life sciences. Nat Methods. 2018 Jul;15(7):475-476. doi: 10.1038/s41592-018-0046-7. PubMed PMID: 29967506.

* [BioContainers](https://pubmed.ncbi.nlm.nih.gov/28379341/)
    > da Veiga Leprevost F, Grüning B, Aflitos SA, Röst HL, Uszkoreit J, Barsnes H, Vaudel M, Moreno P, Gatto L, Weber J, Bai M, Jimenez RC, Sachsenberg T, Pfeuffer J, Alvarez RV, Griss J, Nesvizhskii AI, Perez-Riverol Y. BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics. 2017 Aug 15;33(16):2580-2582. doi: 10.1093/bioinformatics/btx192. PubMed PMID: 28379341; PubMed Central PMCID: PMC5870671.

* [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241)

* [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/)
    > Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675.

GitHub Events

Total
  • Issues event: 84
  • Watch event: 2
  • Delete event: 26
  • Issue comment event: 35
  • Push event: 25
  • Pull request review comment event: 21
  • Pull request review event: 38
  • Pull request event: 60
  • Fork event: 27
  • Create event: 10
Last Year
  • Issues event: 84
  • Watch event: 2
  • Delete event: 26
  • Issue comment event: 35
  • Push event: 25
  • Pull request review comment event: 21
  • Pull request review event: 38
  • Pull request event: 60
  • Fork event: 27
  • Create event: 10

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 225
  • Total Committers: 8
  • Avg Commits per committer: 28.125
  • Development Distribution Score (DDS): 0.316
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Anthony Underwood a****3@s****k 154
Harshil Patel d****h@g****m 32
avantonder a****t@s****k 20
Alexandre Gilardet a****t@c****k 6
thanhleviet t****t@q****k 5
Phil Ewels p****s@s****e 3
alexandregilardet 6****t 3
Harshil Patel d****h 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 66
  • Total pull requests: 76
  • Average time to close issues: 8 months
  • Average time to close pull requests: 29 days
  • Total issue authors: 12
  • Total pull request authors: 19
  • Average comments per issue: 0.56
  • Average comments per pull request: 0.79
  • Merged pull requests: 37
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 41
  • Pull requests: 30
  • Average time to close issues: 10 days
  • Average time to close pull requests: 3 days
  • Issue authors: 4
  • Pull request authors: 12
  • Average comments per issue: 0.56
  • Average comments per pull request: 0.27
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • avantonder (37)
  • antunderwood (18)
  • ikhanganin (2)
  • craigwindell (1)
  • jennahamlin (1)
  • JavariaAshraf (1)
  • maxulysse (1)
  • thanhleviet (1)
  • jen-reeve (1)
  • MostafaYA (1)
  • apeltzer (1)
  • creamerk (1)
Pull Request Authors
  • nf-core-bot (30)
  • antunderwood (11)
  • avantonder (7)
  • project-defiant (5)
  • thanhleviet (3)
  • sgsutcliffe (3)
  • MareikeJaniak (3)
  • sainsachiko (3)
  • alexandregilardet (3)
  • drpatelh (2)
  • QuadjoLegend (2)
  • opetryk (2)
  • surangij (1)
  • adamd3 (1)
  • CASTANYMIQUEL (1)
Top Labels
Issue Labels
enhancement (39) good first issue (21) dsl2 (9) bug (3)
Pull Request Labels

Dependencies

.github/workflows/awsfulltest.yml actions
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/awstest.yml actions
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/branch.yml actions
  • mshick/add-pr-comment v1 composite
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
.github/workflows/linting.yml actions
  • actions/checkout v2 composite
  • actions/checkout v1 composite
  • actions/setup-node v1 composite
  • actions/setup-python v1 composite
  • actions/upload-artifact v2 composite
  • mshick/add-pr-comment v1 composite
.github/workflows/linting_comment.yml actions
  • dawidd6/action-download-artifact v2 composite
  • marocchino/sticky-pull-request-comment v2 composite
modules/nf-core/software/bcftools/filter/meta.yml cpan
modules/nf-core/software/bcftools/mpileup/meta.yml cpan
modules/nf-core/software/bwa/index/meta.yml cpan
modules/nf-core/software/bwa/mem/meta.yml cpan
modules/nf-core/software/fastp/meta.yml cpan
modules/nf-core/software/fastqc/meta.yml cpan
modules/nf-core/software/fasttree/meta.yml cpan
modules/nf-core/software/gubbins/meta.yml cpan
modules/nf-core/software/iqtree/meta.yml cpan
modules/nf-core/software/mash/sketch/meta.yml cpan
modules/nf-core/software/multiqc/meta.yml cpan
modules/nf-core/software/rapidnj/meta.yml cpan
modules/nf-core/software/rasusa/meta.yml cpan
modules/nf-core/software/raxmlng/meta.yml cpan
modules/nf-core/software/samtools/flagstat/meta.yml cpan
modules/nf-core/software/samtools/idxstats/meta.yml cpan
modules/nf-core/software/samtools/index/meta.yml cpan
modules/nf-core/software/samtools/sort/meta.yml cpan
modules/nf-core/software/samtools/stats/meta.yml cpan
modules/nf-core/software/snpsites/meta.yml cpan