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:
-
trim and repair tags of input modBam
- trim and repair workflow:
- sort modBam -
samtools sort
- convert modBam to fastq -
samtools fastq
- trim barcode and adapters -
porechop
- convert trimmed modfastq to modBam -
samtools import
- repair MM/ML tags of trimmed modBam -
modkit repair
- sort modBam -
- trim and repair workflow:
-
align to reference (plus sorting and indexing) -
dorado aligner
( default) /minimap2
- include alignment summary -
samtools flagstat
- include alignment summary -
-
create bedMethyl -
modkit pileup
, 5x base coverage minimum. -
create bedgraphs (optional)
PacBio workflow:
-
align to reference -
pbmm2
(default) orminimap2
-
minimap workflow:
- convert modBam to fastq -
samtools convert
- alignment -
minimap2
- sort and index -
samtools sort
- alignment summary -
samtools flagstat
- convert modBam to fastq -
-
pbmm2 workflow:
- alignment and sorting -
pbmm2
- index -
samtools index
- alignment summary -
samtools flagstat
- alignment and sorting -
-
-
create bedMethyl -
pb-CpG-tools
(default) ormodkit pileup
- notes about using
pb-CpG-tools
pileup:- 5x base coverage minimum.
- 2 pile up methods available from
pb-CpG-tools
:- default using
model
- or
count
(differences described here: https://github.com/PacificBiosciences/pb-CpG-tools)
- default using
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.
- notes about using
-
create bedgraph (optional)
Usage
Currently no support of dorado
and pb-CpG-tools
through conda.
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)
- 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
- for ONT R10.4.1 reads: basecall with
- reference genome
First, prepare a samplesheet with your input data that looks as follows:
sample,modbam,ref,method
Col_0,ont_modbam.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:
nextflow run nf-core/methylong \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--outdir <OUTDIR>
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:
βββ ont/sampleName
β β
β βββ fastqc
β β
β βββ trim
β β βββ trimmed.fastq.gz
β β βββ trimmed.bam
β β βββ trimmed.log
β β
β βββ repair
β β βββ repaired.bam
β β βββ repaired.log
β β
β βββ alignment
β β βββ aligned.bam
β β βββ aligned.bai
β β βββ summary.txt
β β βββ aligned.flagstat
β β
β βββ pileup/modkit
β β βββ pileup.bed
β β βββ pileup.log
β β
β βββ bedgraph
β βββ bedgraphs
β
β
βββ pacbio/sampleName
β β
β βββ fastqc
β β
β βββ aligned_minimap2/ aligned_pbmm2
β β βββ aligned.bam
β β βββ aligned.bai/csi
β β βββ aligned.flagstat
β β
β βββ pileup: modkit/pb_cpg_tools
β β βββ pileup.bed
β β βββ pileup.log
β β βββ pileup.bw (only pb_cpg_tools)
β β
β βββ bedgraph
β βββ bedgraphs
β
βββ multiqc
β
βββ fastqc
βββ flagstat
bedgraph outputs all have min. 5x base coverage.
Credits
nf-core/methylong was originally written by Jin Yan Khoo.
We 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
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.