A comprehensive Nextflow pipeline for mammalian whole genome sequencing (WGS) analysis using Oxford Nanopore long-read data. This pipeline can run locally or on Google Cloud Batch for scalable compute.
MamPipe performs end-to-end genome assembly and quality assessment:
- Quality Control - NanoPlot visualization of read quality
- Read Filtering - Chopper for quality and length filtering
- Assembly - Flye for de novo genome assembly
- Polishing - Medaka for consensus polishing
- Quality Assessment - BUSCO for completeness evaluation
- Duplicate Purging - Purge_dups (conditional, based on BUSCO duplication score)
- Scaffolding - RagTag for reference-guided scaffolding
- Final QC - BUSCO assessment of final assembly
- Variant Calling (
vcf.nf) - BWA alignment, GATK variant calling, and filtering
- Nextflow (≥22.04)
- Conda or Mamba
- 16+ GB RAM recommended
- Multi-core CPU (4+ cores recommended)
- Google Cloud Project with Batch API enabled
- Google Cloud Storage bucket
- Docker image (provided Dockerfile)
- Clone the repository:
git clone https://github.com/genecodAlan/mampipe.git
cd mampipe- Install Nextflow:
curl -s https://get.nextflow.io | bash- Ensure Conda/Mamba is installed for environment management
nextflow run main.nf \
--reads 'data/*.fastq' \
--ref 'refSeq/*.fna' \
--outdir 'results' \
--busco_threshold 6.0 \
--lineage 'mammalia_odb10'- Build and push the Docker image:
cd Github_Upload
docker build -t gcr.io/YOUR_PROJECT/mampipe:latest .
docker push gcr.io/YOUR_PROJECT/mampipe:latest- Configure your Google Cloud settings in
nextflow.config:
process {
executor = 'google-batch'
container = 'gcr.io/YOUR_PROJECT/mampipe:latest'
workDir = 'gs://YOUR_BUCKET/work'
}
google {
project = 'YOUR_PROJECT_ID'
region = 'us-central1'
batch {
spot = true
bootDiskSize = '50 GB'
}
}- Run the pipeline:
nextflow run batch_main.nf -c nextflow.config| Parameter | Default | Description |
|---|---|---|
--reads |
data/*.fastq |
Path to input FASTQ files |
--ref |
refSeq/*.fna |
Path to reference genome |
--outdir |
WGS_results |
Output directory |
--busco_threshold |
6.0 |
BUSCO duplication threshold (%) |
--lineage |
mammalia_odb10 |
BUSCO lineage dataset |
--threads |
8 |
Number of threads for most processes |
--threads_assembly |
4 |
Threads for Flye assembly |
--threads_polish |
4 |
Threads for Medaka polishing |
--medaka_model |
r1041_e82_400bps_fast_g632 |
Medaka model for your sequencing chemistry |
--assembly_input |
results/polished/... |
Path to existing assembly (Post_Assembly.nf only) |
Complete genome assembly from raw reads to scaffolded assembly
BUSCO assessment, conditional purging, and scaffolding for existing assemblies
SNP/indel calling from aligned reads
results/
├── read_plots/ # NanoPlot QC reports
├── chopped/ # Filtered reads
├── assembly/ # Flye assembly output
├── polished/ # Medaka polished assembly
├── busco_precheck/ # Initial BUSCO results
├── purged_output/ # Purge_dups output (if triggered)
├── scaffolded/ # RagTag scaffolded assembly
└── FINAL_BUSCO/ # Final quality assessment
- NanoPlot - Read quality visualization
- Chopper - Read filtering
- Flye - Genome assembly
- Medaka - Assembly polishing
- BUSCO - Completeness assessment
- Purge_dups - Haplotig purging
- RagTag - Reference-guided scaffolding
- minimap2 - Read alignment
- GATK4 - Variant calling (optional)
If you use this pipeline, please cite the individual tools used in your analysis.
MIT License
For issues and questions, please open an issue on GitHub.