Nanopore DNA modification analysis pipeline
ShadowBase is a Nextflow DSL2 pipeline for analyzing DNA modifications from Nanopore sequencing data. It supports both single-sample and multi-sample analysis, where each sample can use a different reference sequence.
- mod_mapping — Remaps MM/ML modification tags from BAM to reference via minimap2
- modkit pileup — Generates pileup BED with modification frequencies
- modkit find-motifs — Identifies enriched sequence motifs
- modkit call-mods — Produces modification-called BAM
- modkit extract — Extracts modification calls to TSV
- MicrobeMod (optional) — Motif calling and RM gene annotation
- MethylomeMiner (optional) — Methylome analysis with GFF annotations
- Java 8+ (OpenJDK / default-jre)
- Nextflow 20.10.0+
- Container engine — either Docker or Singularity
# Install Java
sudo apt install -y default-jre
# Install Nextflow
curl -s https://get.nextflow.io | bash
sudo mv nextflow /bin && sudo chmod 770 /bin/nextflownextflow run main.nf \
--fasta_ref ref.fasta \
--bam sample.bam \
--output results \
-profile local,dockerCreate a CSV:
SampleA,/path/to/sampleA.bam,/path/to/refA.fasta
SampleB,/path/to/sampleB.bam,/path/to/refB.fastaThen run:
nextflow run main.nf \
--samples samples.csv \
--output results \
-profile local,dockerSampleA,/path/to/sampleA.bam,/path/to/refA.fasta,/path/to/annotationA.gff
SampleB,/path/to/sampleB.bam,/path/to/refB.fastaAnnotations enable the MethylomeMiner step.
nextflow run main.nf \
--fasta_ref test_data/fastas/A_conjugant_0.5h_polished.fasta \
--bam test_data/subsampled_bam/A_conjugant_0.5h_10percent.bam \
--output test_output \
-profile local,docker| Param | Default | Description |
|---|---|---|
--fasta_ref |
— | Reference FASTA (single sample mode) |
--bam |
— | BAM with MM/ML modification tags (single sample mode) |
--samples |
— | CSV file (name,bam,fasta[,annotation_gff]) |
--output |
results |
Output directory |
--cores |
max_cores/4 |
CPUs per process |
--max_cores |
all CPUs | Machine-wide CPU limit |
--gff_annotation |
— | Global GFF annotation for MethylomeMiner |
--no_microbemod |
false |
Skip MicrobeMod (motif calling + RM genes) |
--filter_threshold_modkit |
— | modkit pileup filter threshold |
Always use a two-part profile: -profile <Executor>,<Engine>
| Executor | Engine |
|---|---|
local |
docker |
slurm |
singularity |
lsf |
|
ukj_cloud |
nextflow run main.nf ... -profile local,docker
nextflow run main.nf ... -profile slurm,singularityresults/
├── Pipeline-runinfo/
│ ├── execution_timeline.html
│ └── execution_report.html
├── <sample_name>/
│ ├── 1.Modmapped_bam/
│ │ ├── <sample>.modmapped.bam
│ │ └── <sample>.modmapped.bam.bai
│ ├── 2.Microbemod_motifs/ (if --no_microbemod is not set)
│ │ ├── <sample>_motifs.tsv
│ │ ├── <sample>_methylated_sites.tsv
│ │ └── RM_genes/
│ ├── 3.Modkit/
│ │ ├── <sample>_pileup.bed
│ │ ├── find_motifs/
│ │ │ ├── <sample>_motifs.tsv
│ │ │ └── <sample>_modkit_find_motifs_log.txt
│ │ ├── call-mods-bam/
│ │ │ └── <sample>_call-mods.bam
│ │ └── extract/
│ │ └── <sample>_extract.tsv
│ └── 4.MethylomeMiner/ (if GFF annotation provided)
│ └── <sample>_MethylomeMiner_output/
Developed by Mike Marquet — @mult1fractal
- modkit — Nanopore modified base analysis toolkit
- MicrobeMod — Microbial methylation analysis
- Nextflow — Workflow orchestration
GPL-3.0