# rvel37/sbgs1-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/rvel37/sbgs1-pipeline
- Repository: https://github.com/rvel37/sbgs1-pipeline

## Overview

This repository is a WDL/Cromwell paired-end sequencing pipeline: FASTQ inputs are processed into annotated VCFs and quality-control intermediates. The README documents how Cromwell runs `wf.wdl` and describes the inputs, outputs, and annotation resources. Task files indicate distinct processing capabilities, but their workflow wiring and order are not shown in the excerpts, so those links are dashed and unverified. A separate Python watcher scans Cromwell output folders, records run/report/VCF metadata, and inserts parsed variants into MySQL.

Main entry points: [`wf.wdl`](https://github.com/rvel37/sbgs1-pipeline/blob/main/wf.wdl) (Pipeline workflow), [`Database/Data_insertion.py`](https://github.com/rvel37/sbgs1-pipeline/blob/main/Database/Data_insertion.py) (Run and variant ingestion), [`inputs.json`](https://github.com/rvel37/sbgs1-pipeline/blob/main/inputs.json) (Input configuration), [`options.json`](https://github.com/rvel37/sbgs1-pipeline/blob/main/options.json) (Output options)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow entry"]
  node_inputs["Input configuration<br/>[inputs.json]"]
  node_options["Output options<br/>[options.json]"]
  node_workflow_wdl["Pipeline workflow<br/>[wf.wdl]"]
end

subgraph group_processing["Read processing"]
  node_fastqc["Initial QC<br/>[fastqc.wdl]"]
  node_trimming["Adapter trimming<br/>[trimming.wdl]"]
  node_concat["FASTQ concatenation<br/>[concat_fastqs.wdl]"]
  node_pre_multiqc["Preprocessing report<br/>[pre-multiqc.wdl]"]
end

subgraph group_analysis["Variant analysis"]
  node_aligning["Read alignment<br/>[aligning.wdl]"]
  node_markduplicates["Duplicate marking<br/>[markduplicates.wdl]"]
  node_samstats["Alignment statistics<br/>[samtools_stats.wdl]"]
  node_reference_index["Reference indexing"]
  node_calling["Variant calling"]
  node_annotation["VEP annotation<br/>[annotating.wdl]"]
  node_post_multiqc["Postprocessing report<br/>[post-multiqc.wdl]"]
end

subgraph group_persistence["Run persistence"]
  node_db_ingestion["Run and variant ingestion<br/>[Data_insertion.py]"]
end

node_user(("Pipeline operator"))
node_cromwell["Cromwell"]
node_results["VCFs and reports"]
node_mysql[("MySQL database")]

node_user -->|"starts run"| node_cromwell
node_cromwell -->|"runs workflow"| node_workflow_wdl
node_user -->|"sets inputs"| node_inputs
node_user -->|"sets output options"| node_options
node_workflow_wdl -.->|"uses inputs"| node_inputs
node_workflow_wdl -.->|"uses options"| node_options
node_workflow_wdl -.->|"dispatches"| node_fastqc
node_workflow_wdl -.->|"dispatches"| node_trimming
node_workflow_wdl -.->|"dispatches"| node_concat
node_workflow_wdl -.->|"dispatches"| node_pre_multiqc
node_workflow_wdl -.->|"dispatches"| node_aligning
node_workflow_wdl -.->|"dispatches"| node_markduplicates
node_workflow_wdl -.->|"dispatches"| node_samstats
node_workflow_wdl -.->|"dispatches"| node_reference_index
node_workflow_wdl -.->|"dispatches"| node_calling
node_workflow_wdl -.->|"dispatches"| node_annotation
node_workflow_wdl -.->|"dispatches"| node_post_multiqc
node_workflow_wdl -->|"produces"| node_results
node_db_ingestion -->|"writes records"| node_mysql
node_results -->|"scans run outputs"| node_db_ingestion

click node_inputs "https://github.com/rvel37/sbgs1-pipeline/blob/main/inputs.json"
click node_options "https://github.com/rvel37/sbgs1-pipeline/blob/main/options.json"
click node_workflow_wdl "https://github.com/rvel37/sbgs1-pipeline/blob/main/wf.wdl"
click node_fastqc "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/fastqc.wdl"
click node_trimming "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/trimming.wdl"
click node_concat "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/concat_fastqs.wdl"
click node_pre_multiqc "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/pre-multiqc.wdl"
click node_aligning "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/aligning.wdl"
click node_markduplicates "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/markduplicates.wdl"
click node_samstats "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/samtools_stats.wdl"
click node_reference_index "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/index_reference.wdl"
click node_calling "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/variant_calling.wdl"
click node_annotation "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/annotating.wdl"
click node_post_multiqc "https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/post-multiqc.wdl"
click node_db_ingestion "https://github.com/rvel37/sbgs1-pipeline/blob/main/Database/Data_insertion.py"

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_inputs,node_options,node_workflow_wdl toneBlue
class node_fastqc,node_trimming,node_concat,node_pre_multiqc,node_mysql toneAmber
class node_aligning,node_markduplicates,node_samstats,node_reference_index,node_calling,node_annotation,node_post_multiqc toneMint
class node_db_ingestion toneRose
class node_user,node_cromwell,node_results toneIndigo
```

## Components

### Workflow entry

- [Input configuration](https://github.com/rvel37/sbgs1-pipeline/blob/main/inputs.json): `inputs.json`
- [Output options](https://github.com/rvel37/sbgs1-pipeline/blob/main/options.json): `options.json`
- [Pipeline workflow](https://github.com/rvel37/sbgs1-pipeline/blob/main/wf.wdl): `wf.wdl`

### Read processing

- [Initial QC](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/fastqc.wdl): `tasks/fastqc.wdl`
- [Adapter trimming](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/trimming.wdl): `tasks/trimming.wdl`
- [FASTQ concatenation](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/concat_fastqs.wdl): `tasks/concat_fastqs.wdl`
- [Preprocessing report](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/pre-multiqc.wdl): `tasks/pre-multiqc.wdl`

### Variant analysis

- [Read alignment](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/aligning.wdl): `tasks/aligning.wdl`
- [Duplicate marking](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/markduplicates.wdl): `tasks/markduplicates.wdl`
- [Alignment statistics](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/samtools_stats.wdl): `tasks/samtools_stats.wdl`
- [Reference indexing](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/index_reference.wdl): `tasks/index_reference.wdl`
- [Variant calling](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/variant_calling.wdl): `tasks/variant_calling.wdl`
- [VEP annotation](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/annotating.wdl): `tasks/annotating.wdl`
- [Postprocessing report](https://github.com/rvel37/sbgs1-pipeline/blob/main/tasks/post-multiqc.wdl): `tasks/post-multiqc.wdl`

### Run persistence

- [Run and variant ingestion](https://github.com/rvel37/sbgs1-pipeline/blob/main/Database/Data_insertion.py): `Database/Data_insertion.py`

### Other components

- **Pipeline operator**
- **Cromwell**
- **VCFs and reports**
- **MySQL database**

## Connections

- Pipeline operator → Cromwell: starts run (evidence: `README.md`)
- Cromwell → Pipeline workflow: runs workflow (evidence: `README.md`)
- Pipeline operator → Input configuration: sets inputs (evidence: `README.md`)
- Pipeline operator → Output options: sets output options (evidence: `README.md`)
- Pipeline workflow → Input configuration: uses inputs
- Pipeline workflow → Output options: uses options
- Pipeline workflow → Initial QC: dispatches
- Pipeline workflow → Adapter trimming: dispatches
- Pipeline workflow → FASTQ concatenation: dispatches
- Pipeline workflow → Preprocessing report: dispatches
- Pipeline workflow → Read alignment: dispatches
- Pipeline workflow → Duplicate marking: dispatches
- Pipeline workflow → Alignment statistics: dispatches
- Pipeline workflow → Reference indexing: dispatches
- Pipeline workflow → Variant calling: dispatches
- Pipeline workflow → VEP annotation: dispatches
- Pipeline workflow → Postprocessing report: dispatches
- Pipeline workflow → VCFs and reports: produces (evidence: `README.md`)
- Run and variant ingestion → MySQL database: writes records (evidence: `Database/Data_insertion.py`)
- VCFs and reports → Run and variant ingestion: scans run outputs (evidence: `Database/Data_insertion.py`)
