methylong

Extract methylation calls from long reads (ONT/ PacBio)

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

Science Score: 57.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
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary

Keywords

nextflow nf-core pipeline workflow
Last synced: 6 months ago · JSON representation ·

Repository

Extract methylation calls from long reads (ONT/ PacBio)

Basic Info
  • Host: GitHub
  • Owner: nf-core
  • License: mit
  • Language: Nextflow
  • Default Branch: master
  • Homepage: https://nf-co.re/methylong
  • Size: 154 MB
Statistics
  • Stars: 14
  • Watchers: 194
  • Forks: 3
  • Open Issues: 5
  • Releases: 1
Topics
nextflow nf-core pipeline workflow
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

nf-core/methylong

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

Nextflow run with conda run with docker run with singularity Launch on Seqera Platform

Get help on Slack

Introduction

nf-core/methylong is a bioinformatics pipeline that is tailored for long-read methylation calling. This pipeline require only modification-basecalled ONT reads or PacBio HiFi reads (modBam) and a genome reference as input. The ONT workflow including preprocessing (trim and repair) of reads, genome alignment and methylation calling. The PacBio HiFi workflow includes genome alignment and methylation calling. Methylation calls are extracted into BED/BEDGRAPH format, readily for direct downstream analysis.

ONT workflow:

  1. trim and repair tags of input modBam
  • trim and repair workflow:
    1. sort modBam - samtools sort
    2. convert modBam to fastq - samtools fastq
    3. trim barcode and adapters - porechop
    4. convert trimmed modfastq to modBam - samtools import
    5. repair MM/ML tags of trimmed modBam - modkit repair
  1. align to reference (plus sorting and indexing) - dorado aligner( default) / minimap2
  • optional: remove previous alignment information before running dorado aligner using samtools reset
  • include alignment summary - samtools flagstat
  1. create bedMethyl - modkit pileup, 5x base coverage minimum.
  2. create bedgraphs (optional)

PacBio workflow:

  1. align to reference - pbmm2 (default) or minimap2
  • minimap workflow:
 1. convert modBam to fastq - `samtools convert`
 2. alignment - `minimap2`
 3. sort and index - `samtools sort`
 4. alignment summary - `samtools flagstat`
  • pbmm2 workflow:
    1. alignment and sorting - pbmm2
    2. index - samtools index
    3. alignment summary - samtools flagstat
  1. create bedMethyl - pb-CpG-tools (default) or modkit pileup
  • notes about using pb-CpG-tools pileup:
    • 5x base coverage minimum.
    • 2 pile up methods available from pb-CpG-tools:
      1. default using model
      2. or count (differences described here: https://github.com/PacificBiosciences/pb-CpG-tools)
    • pb-CpG-tools by default merge mC signals on CpG into forward strand. To 'force' strand specific signal output, I followed the suggestion mentioned in this issue (PacificBiosciences/pb-CpG-tools#37) which uses HP tags to tag forward and reverse reads, so they were output separately.
  1. create bedgraph (optional)

Usage

[!NOTE] Currently no support of dorado and pb-CpG-tools through conda.

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

Required input:

  • unaligned modification basecalled bam (modBam)
    • if input modBam was aligned, remove previous alignment information using --reset
    • for ONT R10.4.1 reads: basecall with dorado basecaller > dorado basecaller hac,5mCG_5hmCG,6mA pod5s/ > calls.bam
    • for PacBio Revio HiFi reads: basecall with Jasmine
  • reference genome

First, prepare a samplesheet with your input data that looks as follows:

```csv title="samplesheet.csv" sample,modbam,ref,method Col0,ontmodbam.bam,Col_0.fasta,ont

```

| Column | Content | | -------- | ------------------------------ | | sample | Name of the sample | | modBam | Path to basecalled modBam file | | ref | Path to assembly fasta/fa file | | method | specify ont / pacbio |

Now, you can run the pipeline using:

bash nextflow run nf-core/methylong \ -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.

Folder stuctures of the outputs:

```tree

├── ont/sampleName │ │ │ ├── fastqc │ │ │ ├── trim │ │ ├── trimmed.fastq.gz │ │ └── trimmed.log │ │ │ ├── repair │ │ ├── repaired.bam │ │ └── repaired.log │ │ │ ├── alignment │ │ ├── aligned.bam │ │ ├── aligned.bai │ │ └── aligned.flagstat │ │ │ ├── pileup/modkit │ │ ├── pileup.bed.gz │ │ └── pileup.log │ │ │ └── bedgraph │ └── bedgraphs │ │ ├── pacbio/sampleName │ │ │ ├── fastqc │ │ │ ├── alignedminimap2/ alignedpbmm2 │ │ ├── aligned.bam │ │ ├── aligned.bai/csi │ │ └── aligned.flagstat │ │ │ ├── pileup: modkit/pbcpgtools │ │ ├── pileup.bed.gz │ │ ├── pileup.log │ │ └── pileup.bw (only pbcpgtools) │ │ │ └── bedgraph │ └── bedgraphs │ └── multiqc │ ├── fastqc └── flagstat

```

bedgraph outputs all have min. 5x base coverage.

Credits

nf-core/methylong was originally written by Jin Yan Khoo, from the Faculty of Biology of the Ludwig-Maximilians University (LMU) in Munich, Germany

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

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

Citations

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

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/methylong: 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].

- [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://github.com/samtools/samtools)

> Petr Danecek, James K Bonfield, Jennifer Liddle, John Marshall, Valeriu Ohan, Martin O Pollard, Andrew Whitwham, Thomas Keane, Shane A McCarthy, Robert M Davies, Heng Li (2021) Twelve years of SAMtools and BCFtools. GigaScience, Volume 10, Issue 2, February 2021, giab008, https://doi.org/10.1093/gigascience/giab008

- [gunzip](https://www.gnu.org/software/gzip/manual/gzip.html)

- [pigz](https://zlib.net/pigz/)

- [minimap2](https://github.com/lh3/minimap2)

> Li, H. (2018). Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics, 34:3094-3100. doi:10.1093/bioinformatics/bty191

> Li, H. (2021). New strategies to improve minimap2 alignment accuracy. Bioinformatics, 37:4572-4574. doi:10.1093/bioinformatics/btab705

- [pbmm2](https://github.com/PacificBiosciences/pbmm2)

- [dorado](https://github.com/nanoporetech/dorado)

> licence under: Oxford Nanopore Technologies Plc.

- [porechop](https://github.com/rrwick/Porechop)

> Wick RR, Judd LM, Gorrie CL, Holt KE. Completing bacterial genome assemblies with multiplex MinION sequencing. Microb Genom. 2017;3(10):e000132. Published 2017 Sep 14. doi:10.1099/mgen.0.000132

- [modkit](https://github.com/nanoporetech/modkit)

> licence under: Oxford Nanopore Technologies Plc.

- [pb-CpG-tools](https://github.com/PacificBiosciences/pb-CpG-tools)

> licence under: Pacific Biosciences Software License Agreement

- [Clair3](https://github.com/HKU-BAL/Clair3)

- [WhatsHap](https://github.com/whatshap/whatshap)

> Marcel Martin, Murray Patterson, Shilpa Garg, Sarah O. Fischer, Nadia Pisanti, Gunnar W. Klau, Alexander Schoenhuth, Tobias Marschall. _WhatsHap: fast and accurate read-based phasing_. bioRxiv 085050; doi: https://doi.org/10.1101/085050

- [gawk](https://www.gnu.org/software/gawk)

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

- [charliecloud](https://hpc.github.io/charliecloud/)

  > Reid Priedhorsky and Tim Randles. “Charliecloud: Unprivileged containers for user-defined software stacks in HPC”, 2017. In Proc. Supercomputing. DOI: 10.1145/3126908.3126925.

GitHub Events

Total
  • Create event: 9
  • Release event: 1
  • Issues event: 1
  • Watch event: 10
  • Delete event: 6
  • Issue comment event: 26
  • Push event: 127
  • Pull request review comment event: 137
  • Pull request review event: 114
  • Pull request event: 101
  • Fork event: 2
Last Year
  • Create event: 9
  • Release event: 1
  • Issues event: 1
  • Watch event: 10
  • Delete event: 6
  • Issue comment event: 26
  • Push event: 127
  • Pull request review comment event: 137
  • Pull request review event: 114
  • Pull request event: 101
  • Fork event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 54
  • Average time to close issues: about 2 hours
  • Average time to close pull requests: 4 days
  • Total issue authors: 1
  • Total pull request authors: 5
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.35
  • Merged pull requests: 40
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 54
  • Average time to close issues: about 2 hours
  • Average time to close pull requests: 4 days
  • Issue authors: 1
  • Pull request authors: 5
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.35
  • Merged pull requests: 40
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jkh00 (1)
Pull Request Authors
  • jkh00 (42)
  • YiJin-Xiong (8)
  • nf-core-bot (2)
  • jfy133 (1)
  • maxulysse (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels