flowchart LR

%%{init: {
    "themeVariables": {
      "background": "transparent",
      "fontSize": "45px" },
  "flowchart": {
    "nodeSpacing": 100,
    "rankSpacing": 100,
    "padding": 40,
    "htmlLabels": true
}}}%%

  %% High-level stages
  Raw["Raw Fastqs"]:::input
  Raw --> QC["Quality Control<br/>(Trimming, FastqScreen, FASTQC)"]:::process
  QC --> Align["Alignment & Deduplication"]:::process
  Align --> BAMs["Deduplicated BAM Files"]:::output

  BAMs --> Assessment["Quality Assessment<br/>(Preseq, PPQT)"]:::process
  BAMs --> Deeptools["Coverage Analysis<br/>(deepTools)"]:::process
  BAMs --> Norm["Spike-in Normalization<br/>(optional)"]:::process
  Norm --> Scale["Scaling Factors"]:::output
  Scale -.-> Deeptools

  Assessment --> Reports["MultiQC Report"]:::output
  Deeptools --> Reports
  Deeptools --> Bigwigs["BigWig Files"]:::output
  BAMs --> Peaks["Peak Calling<br/>(MACS2, GEM, SICER)"]:::process
  Peaks --> Consensus["Consensus Peaks"]:::output
  Consensus --> Downstream["Annotation & Analysis<br/>(DiffBind, Motifs)"]:::process

  %% Styles - FNL branding theme
  classDef input fill:#ffffff,stroke:#528230,stroke-width:2px;
  classDef process fill:#dceef7,stroke:#19424e,stroke-width:2px;
  classDef output fill:#ecba4c,stroke:none;
