# liveanddeadcat/yuchen-s-little-spectral-flow- architecture

> Architecture diagram of the GitHub repository liveanddeadcat/yuchen-s-little-spectral-flow-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/liveanddeadcat/yuchen-s-little-spectral-flow-
- Repository: https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-

## Overview

Little Spec is a collection of R workflows for spectral-flow cytometry, taking researchers from gated reference controls through signature assessment and unmixing to downstream analysis. The README documents this overall workflow and its capabilities, but no source excerpts were provided, so edges below reflect documented relationships only; implementation details and unsampled integrations are not inferred.

Main entry points: [`ref controls`](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/tree/main/ref%20controls) (Gated controls), [`gating_reference_controls_example/gating_ref_control.R`](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/gating_reference_controls_example/gating_ref_control.R) (Control gating), [`ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd`](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd) (Signature metrics), [`spectral_profile_comparisor.qmd`](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/spectral_profile_comparisor.qmd) (Profile comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Controls and setup"]
  node_controls[("Gated controls")]
  node_gate_example["Control gating"]
end

subgraph group_signatures["Signature assessment"]
  node_profile["Profile comparison"]
  node_signature_metrics["Signature metrics"]
end

subgraph group_unmixing["Unmixing"]
  node_ols["OLS with AF"]
  node_wls["Weighted least squares<br/>[wls_unmixing.qmd]"]
  node_nnls["NNLS exploration"]
end

subgraph group_analysis["Data analysis"]
  node_eda["Raw and unmixed EDA<br/>[EDA.Rmd]"]
  node_residuals["Residual analysis"]
  node_gating["Unmixed-data gating"]
  node_downstream["Downstream analysis<br/>[index.qmd]"]
end

node_scientist(("Flow researcher"))

node_scientist -->|"gates controls"| node_gate_example
node_gate_example -->|"exports controls"| node_controls
node_controls -->|"compare signatures"| node_profile
node_controls -->|"evaluate signatures"| node_signature_metrics
node_signature_metrics -->|"assess for unmixing"| node_ols
node_scientist -->|"run unmixing"| node_ols
node_scientist -->|"explore weighting"| node_wls
node_scientist -->|"explore method"| node_nnls
node_scientist -->|"inspect data"| node_eda
node_scientist -->|"inspect residuals"| node_residuals
node_scientist -->|"gate unmixed data"| node_gating
node_scientist -->|"analyze unmixed data"| node_downstream

click node_controls "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/tree/main/ref%20controls"
click node_gate_example "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/gating_reference_controls_example/gating_ref_control.R"
click node_profile "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/spectral_profile_comparisor.qmd"
click node_signature_metrics "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd"
click node_ols "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd"
click node_wls "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/wls_unmixing.qmd"
click node_nnls "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd"
click node_eda "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/EDA.Rmd"
click node_residuals "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/residual_analysis.qmd"
click node_gating "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/gating_unmixed_example.R"
click node_downstream "https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/index.qmd"

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_controls,node_gate_example toneBlue
class node_profile,node_signature_metrics toneAmber
class node_ols,node_wls,node_nnls toneMint
class node_eda,node_residuals,node_gating,node_downstream toneRose
class node_scientist toneIndigo
```

## Components

### Controls and setup

- [Gated controls](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/tree/main/ref%20controls): `ref controls`
- [Control gating](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/gating_reference_controls_example/gating_ref_control.R): `gating_reference_controls_example/gating_ref_control.R`

### Signature assessment

- [Profile comparison](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/spectral_profile_comparisor.qmd): `spectral_profile_comparisor.qmd`
- [Signature metrics](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd): `ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd`

### Unmixing

- [OLS with AF](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd): `ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd`
- [Weighted least squares](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/wls_unmixing.qmd): `wls_unmixing.qmd`
- [NNLS exploration](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd): `ols_unmixing_wAF_covarianceMatrxi_CosMatrix.Rmd`

### Data analysis

- [Raw and unmixed EDA](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/EDA.Rmd): `EDA.Rmd`
- [Residual analysis](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/residual_analysis.qmd): `residual_analysis.qmd`
- [Unmixed-data gating](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/gating_unmixed_example.R): `gating_unmixed_example.R`
- [Downstream analysis](https://github.com/liveanddeadcat/yuchen-s-little-spectral-flow-/blob/main/index.qmd): `index.qmd`

### Other components

- **Flow researcher**

## Connections

- Flow researcher → Control gating: gates controls (evidence: `README.md`)
- Control gating → Gated controls: exports controls (evidence: `README.md`)
- Gated controls → Profile comparison: compare signatures (evidence: `README.md`)
- Gated controls → Signature metrics: evaluate signatures (evidence: `README.md`)
- Signature metrics → OLS with AF: assess for unmixing (evidence: `README.md`)
- Flow researcher → OLS with AF: run unmixing (evidence: `README.md`)
- Flow researcher → Weighted least squares: explore weighting (evidence: `README.md`)
- Flow researcher → NNLS exploration: explore method (evidence: `README.md`)
- Flow researcher → Raw and unmixed EDA: inspect data (evidence: `README.md`)
- Flow researcher → Residual analysis: inspect residuals (evidence: `README.md`)
- Flow researcher → Unmixed-data gating: gate unmixed data (evidence: `README.md`)
- Flow researcher → Downstream analysis: analyze unmixed data (evidence: `README.md`)
