How openvar/nextflow_rd_genomic_vqr works
Project type and purpose
• This is a domain-specific workflow/pipeline built on the Nextflow engine for Rare Disease & Germline variant calling.
• It orchestrates a series of bioinformatics “processes” (QC, alignment, recalibration, variant calling, filtering, analysis) to test down-sampling effects.
File structure
• Top-level:
• main.nf: Nextflow entrypoint
• nextflow.config & nextflow_schema.json: parameter definitions & defaults
• conf/base.config: environment/profiles for Docker, Singularity, DNAnexus
• modules/*.nf: one file per pipeline step
• dockerfiles/*: custom container definitions for FASTQC, GATK, etc.
• data/: genome FASTA, indexes, reference VCFs
• samplesheet.tsv: sample metadata
• Key patterns:
• Modular pipeline (each tool in its own .nf)
• Containerized tool execution (Docker/Singularity images)
• Declarative config driving parameterization & profiles
README for additional insights
• Confirms toolchain (Nextflow + Docker/Singularity + optional DNAnexus)
• Lists required inputs (FASTQ, reference genome, VQSR resources)
• Describes run profiles (–profile docker | singularity | dx)
Main components
a. Workflow Orchestrator
• Nextflow Engine (main.nf + modules + config + schema)
b. Modules (Processes)
1. FASTQC
2. Adapter Trimming / mapDamage
3. BWA-aln & BWA-mem alignment
4. sortBam / markDuplicates / indexBam
5. BQSR (Base Recalibration)
6. HaplotypeCaller & processGVCFs
7. VariantRecalibrator / filterVCF
8. identityAnalysis
9. indexGenome (one‐time prep)
c. Execution Environments
• Local or HPC cluster
• Docker daemon or Singularity runtime
• (Optional) DNAnexus applet via dx-toolkit
d. Data Stores & Inputs
• FASTQ inputs (samplesheet)
• Reference genome & indexes (data/genome)
• VQSR resource VCFs & indices
e. Outputs
• QC reports, recalibrated BAMs, VCFs, summary metrics
Relationships & interactions
• Nextflow reads config + samplesheet → instantiates channels of input files
• Each module receives one or more channels (FASTQ → QC → trimmed FASTQ → aligner → BAM → post-processing → VCF)
• Nextflow launches each process inside its respective Docker/Singularity image
• Artifacts flow via the file system (or remote storage) between processes
• Final reporting/analysis (identityAnalysis) aggregates metrics
Architectural patterns & principles
• Modular decomposition: each .nf file is a self-contained process
• Containerization: isolating dependencies per tool
• Declarative configuration: profiles for environment portability
• Dataflow paradigm: channels → processes → outputs
• Reproducibility & portability (local, cloud, DNAnexus)
• Clear labels for components (e.g., “Nextflow Engine,” “FASTQC Container,” “Reference Genome Store”)
• FASTQ → FASTQC → trimmed FASTQ → BWA → BAM → … → VCF
• Rectangles for modules/processes
Final advice
• How Nextflow channels connect modules.
• Container boundaries to highlight reproducibility.
• Config profiles to indicate environment choices.