# liveanddeadcat/lilspecunmixr architecture

> Architecture diagram of the GitHub repository liveanddeadcat/lilspecunmixr, 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/lilspecunmixr
- Repository: https://github.com/liveanddeadcat/lilspecunmixr

## Overview

LilSpecUnmixR is an R package for spectral unmixing and analysis. Its README identifies OLS and WLS unmixing and panel diagnostics as available capabilities; these are the clearest user-facing functions. The tree also names reference-loading, generation, and FCS-writing modules, which are represented as additional package components. No source excerpts were provided, so the graph does not infer call sequences or data flow among modules.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_unmixing["Unmixing"]
  node_ols["OLS unmixing<br/>[unmix_OLS.R]"]
  node_ols_svd["OLS SVD<br/>[unmix_OLS_SVD.R]"]
  node_ols_list["OLS lists<br/>[unmix_OLS_list.R]"]
  node_wls["WLS unmixing<br/>[unmix_WLS.R]"]
  node_wls_list["WLS lists<br/>[unmix_WLS_list.R]"]
end

subgraph group_analysis["Analysis"]
  node_panel["Panel diagnostics<br/>[panel_diagnose.R]"]
  node_generate["Generate data<br/>[M_generate.R]"]
  node_utils["Utilities<br/>[utils.R]"]
end

subgraph group_io["Data I/O"]
  node_reference["Load reference<br/>[load_reference.R]"]
  node_fcs_save["Write FCS<br/>[fcs_write_save.R]"]
  node_fcs_save_list["Write FCS lists"]
end

node_user(("Package user"))

click node_ols "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_OLS.R"
click node_ols_svd "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_OLS_SVD.R"
click node_ols_list "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_OLS_list.R"
click node_wls "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_WLS.R"
click node_wls_list "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_WLS_list.R"
click node_panel "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/panel_diagnose.R"
click node_generate "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/M_generate.R"
click node_reference "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/load_reference.R"
click node_fcs_save "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/fcs_write_save.R"
click node_fcs_save_list "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/fcs_write_save_list.R"
click node_utils "https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/utils.R"

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_ols,node_ols_svd,node_ols_list,node_wls,node_wls_list,node_user toneBlue
class node_panel,node_generate,node_utils toneAmber
class node_reference,node_fcs_save,node_fcs_save_list toneMint
```

## Components

### Unmixing

- [OLS unmixing](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_OLS.R): `R/unmix_OLS.R`
- [OLS SVD](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_OLS_SVD.R): `R/unmix_OLS_SVD.R`
- [OLS lists](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_OLS_list.R): `R/unmix_OLS_list.R`
- [WLS unmixing](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_WLS.R): `R/unmix_WLS.R`
- [WLS lists](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/unmix_WLS_list.R): `R/unmix_WLS_list.R`

### Analysis

- [Panel diagnostics](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/panel_diagnose.R): `R/panel_diagnose.R`
- [Generate data](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/M_generate.R): `R/M_generate.R`
- [Utilities](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/utils.R): `R/utils.R`

### Data I/O

- [Load reference](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/load_reference.R): `R/load_reference.R`
- [Write FCS](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/fcs_write_save.R): `R/fcs_write_save.R`
- [Write FCS lists](https://github.com/liveanddeadcat/lilspecunmixr/blob/main/R/fcs_write_save_list.R): `R/fcs_write_save_list.R`

### Other components

- **Package user**
