# chusj-pigu/nf-core-oncoseq architecture

> Architecture diagram of the GitHub repository chusj-pigu/nf-core-oncoseq, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chusj-pigu/nf-core-oncoseq
- Repository: https://github.com/chusj-pigu/nf-core-oncoseq

## Overview

nf-core/oncoseq is a Nextflow bioinformatics pipeline that turns sequencing inputs into oncology variant calls and reports. The documented path runs from optional basecalling through read and alignment processing, classification and variant analyses, then annotation, phasing, and reporting. The README also describes time-series and cfDNA-specific behavior. No source excerpts were supplied, so links reflect documented workflow order and capabilities only; component paths identify matching workflow areas from the tree, not inspected call sites.

Main entry points: [`main.nf`](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/main.nf) (Pipeline entry), [`subworkflows/local/report/final_report.nf`](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/final_report.nf) (Final reports), [`subworkflows/local/time_series_evaluation/split_bams_fastq.nf`](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/time_series_evaluation/split_bams_fastq.nf) (Time-series sampling), [`subworkflows/local/mapping/mapping.nf`](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/mapping/mapping.nf) (Alignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input processing"]
  node_pipeline["Pipeline entry<br/>[main.nf]"]
  node_basecall["Basecalling"]
  node_readqc["Read QC<br/>[reads_filter.nf]"]
  node_mapping["Alignment<br/>[mapping.nf]"]
  node_timepoints["Time-series sampling"]
end

subgraph group_analysis["Analysis workflows"]
  node_classification["Tumor classification<br/>[classy.nf]"]
  node_alignmentqc["Alignment QC<br/>[mapping.nf]"]
  node_cfdna["cfDNA analysis"]
  node_adaptive["Adaptive coverage"]
end

subgraph group_variants["Variant analysis"]
  node_cnv["CNV and cnLOH<br/>[cnv_calling.nf]"]
  node_smallvariants["Small variants<br/>[clair3_calling.nf]"]
  node_structural["Structural variants<br/>[sv_calling.nf]"]
  node_annotation["VCF annotation<br/>[variant_process.nf]"]
  node_phasing["Phasing<br/>[phasing.nf]"]
end

subgraph group_reporting["Reporting"]
  node_reports["Final reports<br/>[final_report.nf]"]
  node_reportvariants["Variant report<br/>[variants.nf]"]
  node_reportmethylation["Methylation report<br/>[methylation.nf]"]
  node_timeevaluation["Time-point evaluation<br/>[pertime_graph.nf]"]
end

node_researcher(("Pipeline user"))

node_researcher -->|"provides inputs"| node_pipeline
node_pipeline -.->|"optionally basecalls"| node_basecall
node_pipeline -->|"runs read QC"| node_readqc
node_pipeline -->|"aligns reads"| node_mapping
node_pipeline -->|"runs classifiers"| node_classification
node_pipeline -->|"runs alignment QC"| node_alignmentqc
node_pipeline -->|"calls CNV"| node_cnv
node_pipeline -->|"calls variants"| node_smallvariants
node_pipeline -->|"calls structural variants"| node_structural
node_pipeline -->|"annotates VCFs"| node_annotation
node_pipeline -->|"phases variants"| node_phasing
node_pipeline -.->|"optionally downsamples"| node_timepoints
node_mapping -->|"provides aligned reads"| node_timepoints
node_pipeline -->|"supports cfDNA mode"| node_cfdna
node_pipeline -->|"supports adaptive mode"| node_adaptive
node_pipeline -->|"generates reports"| node_reports
node_reports -->|"summarizes variants"| node_reportvariants
node_reports -->|"summarizes classification"| node_reportmethylation
node_timepoints -.->|"evaluates timepoints"| node_timeevaluation

click node_pipeline "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/main.nf"
click node_basecall "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/basecalling/basecall_multiplex.nf"
click node_readqc "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/read_processing/reads_filter.nf"
click node_mapping "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/mapping/mapping.nf"
click node_timepoints "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/time_series_evaluation/split_bams_fastq.nf"
click node_classification "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/methylation_analysis/classy.nf"
click node_alignmentqc "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/mapping/mapping.nf"
click node_cnv "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/cnv_calling.nf"
click node_smallvariants "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/clair3_calling.nf"
click node_structural "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/sv_calling.nf"
click node_annotation "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/variant_process.nf"
click node_phasing "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/phasing.nf"
click node_adaptive "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/adaptive_specific/coverage_separate.nf"
click node_reports "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/final_report.nf"
click node_reportvariants "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/variants.nf"
click node_reportmethylation "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/methylation.nf"
click node_timeevaluation "https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/time_series_evaluation/pertime_graph.nf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline,node_basecall,node_readqc,node_mapping,node_timepoints,node_researcher toneBlue
class node_classification,node_alignmentqc,node_cfdna,node_adaptive toneAmber
class node_cnv,node_smallvariants,node_structural,node_annotation,node_phasing toneMint
class node_reports,node_reportvariants,node_reportmethylation,node_timeevaluation toneRose
```

## Components

### Input processing

- [Pipeline entry](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/main.nf): `main.nf`
- [Basecalling](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/basecalling/basecall_multiplex.nf): `subworkflows/local/basecalling/basecall_multiplex.nf`
- [Read QC](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/read_processing/reads_filter.nf): `subworkflows/local/read_processing/reads_filter.nf`
- [Alignment](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/mapping/mapping.nf): `subworkflows/local/mapping/mapping.nf`
- [Time-series sampling](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/time_series_evaluation/split_bams_fastq.nf): `subworkflows/local/time_series_evaluation/split_bams_fastq.nf`

### Analysis workflows

- [Tumor classification](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/methylation_analysis/classy.nf): `subworkflows/local/methylation_analysis/classy.nf`
- [Alignment QC](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/mapping/mapping.nf): `subworkflows/local/mapping/mapping.nf`
- **cfDNA analysis**
- [Adaptive coverage](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/adaptive_specific/coverage_separate.nf): `subworkflows/local/adaptive_specific/coverage_separate.nf`

### Variant analysis

- [CNV and cnLOH](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/cnv_calling.nf): `subworkflows/local/variant_calling/cnv_calling.nf`
- [Small variants](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/clair3_calling.nf): `subworkflows/local/variant_calling/clair3_calling.nf`
- [Structural variants](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/sv_calling.nf): `subworkflows/local/variant_calling/sv_calling.nf`
- [VCF annotation](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/variant_process.nf): `subworkflows/local/variant_calling/variant_process.nf`
- [Phasing](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/variant_calling/phasing.nf): `subworkflows/local/variant_calling/phasing.nf`

### Reporting

- [Final reports](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/final_report.nf): `subworkflows/local/report/final_report.nf`
- [Variant report](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/variants.nf): `subworkflows/local/report/variants.nf`
- [Methylation report](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/report/methylation.nf): `subworkflows/local/report/methylation.nf`
- [Time-point evaluation](https://github.com/chusj-pigu/nf-core-oncoseq/blob/main/subworkflows/local/time_series_evaluation/pertime_graph.nf): `subworkflows/local/time_series_evaluation/pertime_graph.nf`

### Other components

- **Pipeline user**

## Connections

- Pipeline user → Pipeline entry: provides inputs (evidence: `README.md`)
- Pipeline entry → Basecalling: optionally basecalls (evidence: `README.md`)
- Pipeline entry → Read QC: runs read QC (evidence: `README.md`)
- Pipeline entry → Alignment: aligns reads (evidence: `README.md`)
- Pipeline entry → Tumor classification: runs classifiers (evidence: `README.md`)
- Pipeline entry → Alignment QC: runs alignment QC (evidence: `README.md`)
- Pipeline entry → CNV and cnLOH: calls CNV (evidence: `README.md`)
- Pipeline entry → Small variants: calls variants (evidence: `README.md`)
- Pipeline entry → Structural variants: calls structural variants (evidence: `README.md`)
- Pipeline entry → VCF annotation: annotates VCFs (evidence: `README.md`)
- Pipeline entry → Phasing: phases variants (evidence: `README.md`)
- Pipeline entry → Time-series sampling: optionally downsamples (evidence: `README.md`)
- Alignment → Time-series sampling: provides aligned reads (evidence: `README.md`)
- Pipeline entry → cfDNA analysis: supports cfDNA mode (evidence: `README.md`)
- Pipeline entry → Adaptive coverage: supports adaptive mode (evidence: `README.md`)
- Pipeline entry → Final reports: generates reports (evidence: `README.md`)
- Final reports → Variant report: summarizes variants (evidence: `README.md`)
- Final reports → Methylation report: summarizes classification (evidence: `README.md`)
- Time-series sampling → Time-point evaluation: evaluates timepoints (evidence: `README.md`)
