# jarninggau/projectsvr architecture

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

- Interactive diagram: https://gitdiagram.com/jarninggau/projectsvr
- Repository: https://github.com/jarninggau/projectsvr

## Overview

ProjectSVR is an R package for mapping single-cell RNA-seq query cells onto reference atlases. The documented workflow is to prepare a reference/model, project query data, and inspect or further analyze the projection. The README also describes feature selection, signature scoring, pseudotime prediction, and cell-type classification. Source excerpts were unavailable, so links are limited to documented relationships; the listed R paths identify existing source files but do not establish internal call wiring.

Main entry points: [`R/wrappers.R`](https://github.com/jarninggau/projectsvr/blob/main/R/wrappers.R) (Map query), [`R/objects.R`](https://github.com/jarninggau/projectsvr/blob/main/R/objects.R) (Create reference), [`R/cnmf.R`](https://github.com/jarninggau/projectsvr/blob/main/R/cnmf.R) (Feature selection), [`R/projection.R`](https://github.com/jarninggau/projectsvr/blob/main/R/projection.R) (Project query)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reference["Reference modeling"]
  node_create_reference["Create reference<br/>[objects.R]"]
  node_model_object[("Reference model<br/>[objects.R]")]
  node_feature_selection["Feature selection<br/>[cnmf.R]"]
end

subgraph group_mapping["Query mapping"]
  node_project_query["Project query<br/>[projection.R]"]
  node_map_query["Map query<br/>[wrappers.R]"]
  node_refine_projection["Refine projection<br/>[projection.R]"]
  node_projection_result[("Cell projection<br/>[objects.R]")]
end

subgraph group_analysis["Cell analysis"]
  node_label_transfer["Label transfer<br/>[label_transfer.R]"]
  node_signature_score["Signature scoring<br/>[signature_score.R]"]
  node_classifier["Cell-type classifier<br/>[wrappers.R]"]
  node_pseudotime["Pseudotime prediction<br/>[projection.R]"]
  node_projection_quality["Projection quality<br/>[projection.R]"]
end

subgraph group_presentation["Results and plots"]
  node_visualization["Projection plots<br/>[visualization.R]"]
end

node_analyst(("Analyst"))
node_reference_atlas[("Reference atlas")]
node_query_data[("Query data")]
node_cnmf_service["Python cNMF"]

node_analyst -->|"builds"| node_create_reference
node_reference_atlas -->|"provides data"| node_create_reference
node_create_reference -->|"creates"| node_model_object
node_analyst -->|"selects features"| node_feature_selection
node_feature_selection -.->|"optionally invokes"| node_cnmf_service
node_analyst -->|"maps query"| node_map_query
node_map_query -->|"projects with"| node_project_query
node_map_query -->|"uses model"| node_model_object
node_map_query -->|"uses query"| node_query_data
node_project_query -->|"produces"| node_projection_result
node_analyst -->|"refines"| node_refine_projection
node_analyst -->|"transfers labels"| node_label_transfer
node_analyst -->|"scores signatures"| node_signature_score
node_analyst -->|"predicts types"| node_classifier
node_analyst -->|"predicts pseudotime"| node_pseudotime
node_analyst -->|"assesses quality"| node_projection_quality
node_analyst -->|"plots results"| node_visualization
node_projection_result -->|"visualizes"| node_visualization

click node_create_reference "https://github.com/jarninggau/projectsvr/blob/main/R/objects.R"
click node_model_object "https://github.com/jarninggau/projectsvr/blob/main/R/objects.R"
click node_feature_selection "https://github.com/jarninggau/projectsvr/blob/main/R/cnmf.R"
click node_project_query "https://github.com/jarninggau/projectsvr/blob/main/R/projection.R"
click node_map_query "https://github.com/jarninggau/projectsvr/blob/main/R/wrappers.R"
click node_refine_projection "https://github.com/jarninggau/projectsvr/blob/main/R/projection.R"
click node_projection_result "https://github.com/jarninggau/projectsvr/blob/main/R/objects.R"
click node_label_transfer "https://github.com/jarninggau/projectsvr/blob/main/R/label_transfer.R"
click node_signature_score "https://github.com/jarninggau/projectsvr/blob/main/R/signature_score.R"
click node_classifier "https://github.com/jarninggau/projectsvr/blob/main/R/wrappers.R"
click node_pseudotime "https://github.com/jarninggau/projectsvr/blob/main/R/projection.R"
click node_projection_quality "https://github.com/jarninggau/projectsvr/blob/main/R/projection.R"
click node_visualization "https://github.com/jarninggau/projectsvr/blob/main/R/visualization.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_create_reference,node_model_object,node_feature_selection toneBlue
class node_project_query,node_map_query,node_refine_projection,node_projection_result,node_reference_atlas,node_query_data toneAmber
class node_label_transfer,node_signature_score,node_classifier,node_pseudotime,node_projection_quality toneMint
class node_visualization toneRose
class node_analyst,node_cnmf_service toneIndigo
```

## Components

### Reference modeling

- [Create reference](https://github.com/jarninggau/projectsvr/blob/main/R/objects.R): `R/objects.R`
- [Reference model](https://github.com/jarninggau/projectsvr/blob/main/R/objects.R): `R/objects.R`
- [Feature selection](https://github.com/jarninggau/projectsvr/blob/main/R/cnmf.R): `R/cnmf.R`

### Query mapping

- [Project query](https://github.com/jarninggau/projectsvr/blob/main/R/projection.R): `R/projection.R`
- [Map query](https://github.com/jarninggau/projectsvr/blob/main/R/wrappers.R): `R/wrappers.R`
- [Refine projection](https://github.com/jarninggau/projectsvr/blob/main/R/projection.R): `R/projection.R`
- [Cell projection](https://github.com/jarninggau/projectsvr/blob/main/R/objects.R): `R/objects.R`

### Cell analysis

- [Label transfer](https://github.com/jarninggau/projectsvr/blob/main/R/label_transfer.R): `R/label_transfer.R`
- [Signature scoring](https://github.com/jarninggau/projectsvr/blob/main/R/signature_score.R): `R/signature_score.R`
- [Cell-type classifier](https://github.com/jarninggau/projectsvr/blob/main/R/wrappers.R): `R/wrappers.R`
- [Pseudotime prediction](https://github.com/jarninggau/projectsvr/blob/main/R/projection.R): `R/projection.R`
- [Projection quality](https://github.com/jarninggau/projectsvr/blob/main/R/projection.R): `R/projection.R`

### Results and plots

- [Projection plots](https://github.com/jarninggau/projectsvr/blob/main/R/visualization.R): `R/visualization.R`

### Other components

- **Analyst**
- **Reference atlas**
- **Query data**
- **Python cNMF**

## Connections

- Analyst → Create reference: builds
- Reference atlas → Create reference: provides data
- Create reference → Reference model: creates
- Analyst → Feature selection: selects features
- Feature selection → Python cNMF: optionally invokes
- Analyst → Map query: maps query
- Map query → Project query: projects with
- Map query → Reference model: uses model
- Map query → Query data: uses query
- Project query → Cell projection: produces
- Analyst → Refine projection: refines
- Analyst → Label transfer: transfers labels
- Analyst → Signature scoring: scores signatures
- Analyst → Cell-type classifier: predicts types
- Analyst → Pseudotime prediction: predicts pseudotime
- Analyst → Projection quality: assesses quality
- Analyst → Projection plots: plots results
- Cell projection → Projection plots: visualizes
