# sbbi-unl/mir-cellmap architecture

> Architecture diagram of the GitHub repository sbbi-unl/mir-cellmap, 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/sbbi-unl/mir-cellmap
- Repository: https://github.com/sbbi-unl/mir-cellmap

## Overview

This repository is a research pipeline for inferring and evaluating single-cell microRNA–gene regulatory relationships. The documented A549 workflow aligns GEO data, converts it to sparse triplets, filters regulatory priors, constructs a heterogeneous graph, trains an HGT autoencoder, then performs cell-aware analysis, network inference, downstream modeling, validation, and benchmarking. The miR-CellMap-V2 directory contains a substantial multi-context graph/HGT and posterior-analysis branch. Its detailed runtime wiring is not established by the supplied excerpts, so only the main workflow edges documented in the root README are shown.

Main entry points: [`geo_alignment.py`](https://github.com/sbbi-unl/mir-cellmap/blob/main/geo_alignment.py) (GEO alignment), [`sparse_triplet_conversion.py`](https://github.com/sbbi-unl/mir-cellmap/blob/main/sparse_triplet_conversion.py) (Sparse triplets), [`filter_mirna_prior.py`](https://github.com/sbbi-unl/mir-cellmap/blob/main/filter_mirna_prior.py) (Prior filtering), [`htg_construction.py`](https://github.com/sbbi-unl/mir-cellmap/blob/main/htg_construction.py) (Graph construction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and preparation"]
  node_geo["GEO alignment<br/>[geo_alignment.py]"]
  node_triplets["Sparse triplets"]
  node_priors["Prior filtering"]
end

subgraph group_model["Graph modeling"]
  node_graph["Graph construction"]
  node_hgt["HGT training"]
end

subgraph group_analysis["Regulatory analysis"]
  node_cellaware["Cell-aware analysis<br/>[cell_type_aware.py]"]
  node_embeddingfig["Embedding analysis"]
  node_inference["Network inference"]
  node_advanced["Advanced modeling"]
  node_validation["Functional validation"]
  node_benchmarks["Benchmark tables"]
end

subgraph group_v2["Multi-context analysis"]
  node_buildv2["Context graph building"]
  node_trainv2["Context HGT training"]
  node_edgeemb["Node-edge embeddings"]
  node_bayesian["Edge posterior"]
  node_clash["CLASH concordance"]
  node_filterv2["Feature filtering"]
  node_feedback["Structural feedback"]
  node_convergence["Convergence stability"]
  node_interval["Interval stability"]
  node_topologyfig["Topology figures"]
  node_programfig["Program validation figures"]
end

node_actor(("Researcher"))

node_actor -->|"runs first"| node_geo
node_geo -->|"then runs"| node_triplets
node_triplets -->|"then runs"| node_priors
node_priors -->|"then runs"| node_graph
node_graph -->|"then runs"| node_hgt
node_hgt -->|"then runs"| node_cellaware
node_cellaware -->|"then runs"| node_embeddingfig
node_embeddingfig -->|"then runs"| node_inference
node_inference -->|"then runs"| node_advanced
node_advanced -->|"then runs"| node_validation
node_validation -->|"then runs"| node_benchmarks

click node_geo "https://github.com/sbbi-unl/mir-cellmap/blob/main/geo_alignment.py"
click node_triplets "https://github.com/sbbi-unl/mir-cellmap/blob/main/sparse_triplet_conversion.py"
click node_priors "https://github.com/sbbi-unl/mir-cellmap/blob/main/filter_mirna_prior.py"
click node_graph "https://github.com/sbbi-unl/mir-cellmap/blob/main/htg_construction.py"
click node_hgt "https://github.com/sbbi-unl/mir-cellmap/blob/main/hgt_autoencoder_training.py"
click node_cellaware "https://github.com/sbbi-unl/mir-cellmap/blob/main/cell_type_aware.py"
click node_embeddingfig "https://github.com/sbbi-unl/mir-cellmap/blob/main/mirna_gene_embedding_fig.py"
click node_inference "https://github.com/sbbi-unl/mir-cellmap/blob/main/network_inference.py"
click node_advanced "https://github.com/sbbi-unl/mir-cellmap/blob/main/advance_modeling.py"
click node_validation "https://github.com/sbbi-unl/mir-cellmap/blob/main/functional_validation.py"
click node_benchmarks "https://github.com/sbbi-unl/mir-cellmap/blob/main/benchmark_tables.py"
click node_buildv2 "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/0build_heterodata_all_contexts.py"
click node_trainv2 "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/train_hgt_all_contexts.py"
click node_edgeemb "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/build_node_to_edge_embeddings.py"
click node_bayesian "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/bayesian_regulatory_edge_posterior.py"
click node_clash "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/clash_regulatory_potential_concordance.py"
click node_filterv2 "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/feature_filtering.py"
click node_feedback "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/hgt_posterior_structural_feedback.py"
click node_convergence "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/evaluate_convergence_stability.py"
click node_interval "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/evaluate_long_interval_context_stability.py"
click node_topologyfig "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/figures_hgt_bayesian_topology.py"
click node_programfig "https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/figures_regulatory_programs_validation.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_geo,node_triplets,node_priors toneBlue
class node_graph,node_hgt toneAmber
class node_cellaware,node_embeddingfig,node_inference,node_advanced,node_validation,node_benchmarks toneMint
class node_buildv2,node_trainv2,node_edgeemb,node_bayesian,node_clash,node_filterv2,node_feedback,node_convergence,node_interval,node_topologyfig,node_programfig toneRose
class node_actor toneIndigo
```

## Components

### Inputs and preparation

- [GEO alignment](https://github.com/sbbi-unl/mir-cellmap/blob/main/geo_alignment.py): `geo_alignment.py`
- [Sparse triplets](https://github.com/sbbi-unl/mir-cellmap/blob/main/sparse_triplet_conversion.py): `sparse_triplet_conversion.py`
- [Prior filtering](https://github.com/sbbi-unl/mir-cellmap/blob/main/filter_mirna_prior.py): `filter_mirna_prior.py`

### Graph modeling

- [Graph construction](https://github.com/sbbi-unl/mir-cellmap/blob/main/htg_construction.py): `htg_construction.py`
- [HGT training](https://github.com/sbbi-unl/mir-cellmap/blob/main/hgt_autoencoder_training.py): `hgt_autoencoder_training.py`

### Regulatory analysis

- [Cell-aware analysis](https://github.com/sbbi-unl/mir-cellmap/blob/main/cell_type_aware.py): `cell_type_aware.py`
- [Embedding analysis](https://github.com/sbbi-unl/mir-cellmap/blob/main/mirna_gene_embedding_fig.py): `mirna_gene_embedding_fig.py`
- [Network inference](https://github.com/sbbi-unl/mir-cellmap/blob/main/network_inference.py): `network_inference.py`
- [Advanced modeling](https://github.com/sbbi-unl/mir-cellmap/blob/main/advance_modeling.py): `advance_modeling.py`
- [Functional validation](https://github.com/sbbi-unl/mir-cellmap/blob/main/functional_validation.py): `functional_validation.py`
- [Benchmark tables](https://github.com/sbbi-unl/mir-cellmap/blob/main/benchmark_tables.py): `benchmark_tables.py`

### Multi-context analysis

- [Context graph building](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/0build_heterodata_all_contexts.py): `miR-CellMap-V2/0build_heterodata_all_contexts.py`
- [Context HGT training](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/train_hgt_all_contexts.py): `miR-CellMap-V2/train_hgt_all_contexts.py`
- [Node-edge embeddings](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/build_node_to_edge_embeddings.py): `miR-CellMap-V2/build_node_to_edge_embeddings.py`
- [Edge posterior](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/bayesian_regulatory_edge_posterior.py): `miR-CellMap-V2/bayesian_regulatory_edge_posterior.py`
- [CLASH concordance](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/clash_regulatory_potential_concordance.py): `miR-CellMap-V2/clash_regulatory_potential_concordance.py`
- [Feature filtering](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/feature_filtering.py): `miR-CellMap-V2/feature_filtering.py`
- [Structural feedback](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/hgt_posterior_structural_feedback.py): `miR-CellMap-V2/hgt_posterior_structural_feedback.py`
- [Convergence stability](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/evaluate_convergence_stability.py): `miR-CellMap-V2/evaluate_convergence_stability.py`
- [Interval stability](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/evaluate_long_interval_context_stability.py): `miR-CellMap-V2/evaluate_long_interval_context_stability.py`
- [Topology figures](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/figures_hgt_bayesian_topology.py): `miR-CellMap-V2/figures_hgt_bayesian_topology.py`
- [Program validation figures](https://github.com/sbbi-unl/mir-cellmap/blob/main/miR-CellMap-V2/figures_regulatory_programs_validation.py): `miR-CellMap-V2/figures_regulatory_programs_validation.py`

### Other components

- **Researcher**

## Connections

- Researcher → GEO alignment: runs first (evidence: `README.md`)
- GEO alignment → Sparse triplets: then runs (evidence: `README.md`)
- Sparse triplets → Prior filtering: then runs (evidence: `README.md`)
- Prior filtering → Graph construction: then runs (evidence: `README.md`)
- Graph construction → HGT training: then runs (evidence: `README.md`)
- HGT training → Cell-aware analysis: then runs (evidence: `README.md`)
- Cell-aware analysis → Embedding analysis: then runs (evidence: `README.md`)
- Embedding analysis → Network inference: then runs (evidence: `README.md`)
- Network inference → Advanced modeling: then runs (evidence: `README.md`)
- Advanced modeling → Functional validation: then runs (evidence: `README.md`)
- Functional validation → Benchmark tables: then runs (evidence: `README.md`)
