bamtofastq

Converts bam or cram files to fastq format and does quality control.

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

Science Score: 67.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
  • Committers with academic emails
    4 of 12 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary

Keywords

bamtofastq conversion cramtofastq nextflow nf-core pipeline workflow

Keywords from Contributors

dsl2 nf-test pipelines workflows illumina chromatin-accessibiity atac-seq taxonomic-profiling taxonomic-classification rrna
Last synced: 6 months ago · JSON representation ·

Repository

Converts bam or cram files to fastq format and does quality control.

Basic Info
  • Host: GitHub
  • Owner: nf-core
  • License: mit
  • Language: Nextflow
  • Default Branch: master
  • Homepage: https://nf-co.re/bamtofastq
  • Size: 156 MB
Statistics
  • Stars: 27
  • Watchers: 170
  • Forks: 18
  • Open Issues: 5
  • Releases: 7
Topics
bamtofastq conversion cramtofastq nextflow nf-core pipeline workflow
Created over 5 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Codeowners

README.md

nf-core/bamtofastq

GitHub Actions CI Status GitHub Actions Linting StatusAWS CICite with Zenodo nf-test

Nextflow nf-core template version run with conda run with docker run with singularity Launch on Seqera Platform

Get help on SlackFollow on BlueskyFollow on MastodonWatch on YouTube

Introduction

nf-core/bamtofastq is a bioinformatics best-practice analysis pipeline that converts (un)mapped .bam or .cram files into fq.gz files. Initially, it auto-detects, whether the input file contains single-end or paired-end reads. Following this step, the reads are sorted using samtools collate and extracted with samtools fastq. Furthermore, for mapped bam/cram files it is possible to only convert reads mapping to a specific region or chromosome. The obtained FastQ files can then be used to further process with other pipelines.

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

By default, the pipeline currently performs the following steps:

  1. Quality control (QC) of input (bam/cram) files (FastQC).
  2. Check if input files are single- or paired-end (Samtools).
  3. Compute statistics on input files (Samtools).
  4. Convert to fastq reads (Samtools).
  5. QC of converted fastq reads (FastQC).
  6. Checking whether the produced fastq files are valid (fastq_utils).
  7. Summarize QC and statistics before and after format conversion (MultiQC).

Usage

[!NOTE] If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.

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

bash nextflow run nf-core/bamtofastq -profile test,<docker/singularity/.../institute> --outdir './results'

To run your own analysis, start by preparing a samplesheet with your input data that looks as follows:

samplesheet.csv:

csv sample_id,mapped,index,file_type test,test1.bam,test1.bam.bai,bam test2,test2.bam,test2.bam.bai,bam

Each row represents a bam/cram file with or without indices.

Now, you can run the pipeline using:

bash nextflow run nf-core/bamtofastq \ -profile <docker/singularity/.../institute> \ --input samplesheet.csv \ --outdir <OUTDIR>

[!WARNING] Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

For more details and further functionality, please refer to the usage documentation and the parameter documentation.

Pipeline output

To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the output documentation.

Credits

nf-core/bamtofastq was originally written by Friederike Hanssen. It was ported to DSL2 by Susanne Jodoin.

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

Resources

The individual steps of this pipeline are based of on the following tutorials and resources:

  1. Extracting paired FASTQ read data from a BAM mapping file
  2. Check if BAM is derived from pair-end or single-end reads

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

Citations

If you use nf-core/bamtofastq for your analysis, please cite it using the following doi: 10.5281/zenodo.4710628

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/bamtofastq: 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

- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)

  > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online].

- [fastq_utils](https://github.com/nunofonseca/fastq_utils)

  > Nuno Fonseca, & Jonathan Manning. (2023). nunofonseca/fastq_utils: 0.25.2 (0.25.2). Zenodo. https://doi.org/10.5281/zenodo.7755574

- [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.

- [SAMtools](https://doi.org/10.1093/gigascience/giab008)

  > Danecek, P., Bonfield, J. K., Liddle, J., Marshall, J., Ohan, V., Pollard, M. O., Whitwham, A., Keane, T., McCarthy, S. A., Davies, R. D., Li, H., (2021) Twelve years of SAMtools and BCFtools, GigaScience, Volume 10, Issue 2, giab008. doi: 10.1093/gigascience/giab008

  > 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.

## 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)

  > Merkel, D. (2014). Docker: lightweight linux containers for consistent development and deployment. Linux Journal, 2014(239), 2. 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
  • Create event: 9
  • Release event: 1
  • Issues event: 13
  • Watch event: 5
  • Delete event: 14
  • Issue comment event: 45
  • Push event: 35
  • Pull request review comment event: 33
  • Pull request review event: 55
  • Pull request event: 42
  • Fork event: 7
Last Year
  • Create event: 9
  • Release event: 1
  • Issues event: 13
  • Watch event: 5
  • Delete event: 14
  • Issue comment event: 45
  • Push event: 35
  • Pull request review comment event: 33
  • Pull request review event: 55
  • Pull request event: 42
  • Fork event: 7

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 390
  • Total Committers: 12
  • Avg Commits per committer: 32.5
  • Development Distribution Score (DDS): 0.533
Past Year
  • Commits: 112
  • Committers: 7
  • Avg Commits per committer: 16.0
  • Development Distribution Score (DDS): 0.134
Top Committers
Name Email Commits
FriederikeHanssen f****n@q****e 182
SusiJo s****n@g****e 123
SusiJo 4****o 30
Gisela Gabernet g****t@g****m 14
FriederikeHanssen F****n@q****e 14
matrulda m****n@m****e 7
Bruno Grande b****e@s****g 6
ggabernet g****t@q****e 4
maxulysse m****a@g****m 3
nf-core-bot c****e@n****e 3
susanne.jodoin@gmx.de a****1@r****e 3
Maxime U Garcia m****a@s****o 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 20
  • Total pull requests: 79
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 14 days
  • Total issue authors: 11
  • Total pull request authors: 11
  • Average comments per issue: 1.15
  • Average comments per pull request: 1.34
  • Merged pull requests: 67
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 22
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 6 days
  • Issue authors: 5
  • Pull request authors: 5
  • Average comments per issue: 0.17
  • Average comments per pull request: 1.09
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • FriederikeHanssen (8)
  • asp8200 (2)
  • mvheetve (2)
  • SumeetTiwari07 (1)
  • pmoris (1)
  • famosab (1)
  • nmendozam (1)
  • adolfmukama (1)
  • nvnieuwk (1)
  • allaway (1)
  • maxulysse (1)
  • BrunoGrandePhD (1)
  • SusiJo (1)
Pull Request Authors
  • SusiJo (21)
  • FriederikeHanssen (21)
  • nf-core-bot (18)
  • famosab (12)
  • asp8200 (12)
  • maxulysse (5)
  • matrulda (3)
  • BrunoGrandePhD (3)
  • ggabernet (2)
  • edmundmiller (1)
  • adolfmukama (1)
  • allaway (1)
Top Labels
Issue Labels
bug (8) enhancement (3) good first issue (1)
Pull Request Labels

Dependencies

.github/workflows/branch.yml actions
  • mshick/add-pr-comment v1 composite
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • technote-space/get-diff-action v4 composite
.github/workflows/linting.yml actions
  • actions/checkout v2 composite
  • actions/checkout v1 composite
  • actions/setup-node v1 composite
.github/workflows/awsfulltest.yml actions
  • actions/upload-artifact v3 composite
  • seqeralabs/action-tower-launch v1 composite
.github/workflows/awstest.yml actions
  • actions/upload-artifact v3 composite
  • seqeralabs/action-tower-launch v1 composite
.github/workflows/clean-up.yml actions
  • actions/stale v7 composite
.github/workflows/fix-linting.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
.github/workflows/linting_comment.yml actions
  • dawidd6/action-download-artifact v2 composite
  • marocchino/sticky-pull-request-comment v2 composite
modules/nf-core/cat/fastq/meta.yml cpan
modules/nf-core/custom/dumpsoftwareversions/meta.yml cpan
modules/nf-core/fastqc/meta.yml cpan
modules/nf-core/multiqc/meta.yml cpan
modules/nf-core/samtools/collatefastq/meta.yml cpan
modules/nf-core/samtools/faidx/meta.yml cpan
modules/nf-core/samtools/flagstat/meta.yml cpan
modules/nf-core/samtools/idxstats/meta.yml cpan
modules/nf-core/samtools/index/meta.yml cpan
modules/nf-core/samtools/merge/meta.yml cpan
modules/nf-core/samtools/stats/meta.yml cpan
modules/nf-core/samtools/view/meta.yml cpan
pyproject.toml pypi
.github/workflows/release-announcments.yml actions
  • actions/setup-python v4 composite
  • rzr/fediverse-action master composite
  • zentered/bluesky-post-action v0.0.2 composite