# lcalviell/orfquant architecture

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

- Interactive diagram: https://gitdiagram.com/lcalviell/orfquant
- Repository: https://github.com/lcalviell/orfquant

## Overview

ORFquant is an R package for splice-aware, ORF-level translation analysis of Ribo-seq data. The documented workflow prepares annotation files and analysis inputs, then uses `run_ORFquant` to perform transcript filtering, de-novo ORF finding, quantification, and annotation. Annotation covers transcript and genomic contexts, including alternative splice sites, uORFs, and NMD candidates. The source excerpts were unavailable, so relationships below rely on README statements; implementation paths point to the listed R source file without implying its internals were inspected.

Main entry points: [`R/orfquant.R`](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R) (ORF annotation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Input preparation"]
  node_gtf["GTF annotation"]
  node_genome["2bit genome"]
  node_annotation_prep["Annotation preparation<br/>[orfquant.R]"]
  node_bam["Ribo-seq BAM"]
  node_riboseqc["Ribo-se-qc"]
  node_input_prep["Analysis input preparation<br/>[orfquant.R]"]
end

subgraph group_analysis["ORF analysis"]
  node_runner["Workflow runner<br/>[orfquant.R]"]
  node_transcript_filter["Transcript filtering<br/>[orfquant.R]"]
  node_orf_finding["De-novo ORF finding<br/>[orfquant.R]"]
  node_quantification["ORF quantification<br/>[orfquant.R]"]
end

subgraph group_annotation["ORF annotation"]
  node_orf_annotation["ORF annotation<br/>[orfquant.R]"]
  node_transcript_context["Transcript context<br/>[orfquant.R]"]
  node_genomic_context["Genomic context<br/>[orfquant.R]"]
  node_splice_sites["Alternative splice sites<br/>[orfquant.R]"]
  node_uorf["uORF translation<br/>[orfquant.R]"]
  node_nmd["NMD candidates<br/>[orfquant.R]"]
end

node_user(("Analyst"))

node_user -->|"prepares annotation"| node_annotation_prep
node_gtf -->|"parses"| node_annotation_prep
node_genome -->|"parses"| node_annotation_prep
node_user -->|"prepares inputs"| node_input_prep
node_bam -.->|"provides reads"| node_riboseqc
node_riboseqc -.->|"creates inputs"| node_input_prep
node_user -->|"runs analysis"| node_runner
node_runner -->|"filters transcripts"| node_transcript_filter
node_runner -->|"finds ORFs"| node_orf_finding
node_runner -->|"quantifies ORFs"| node_quantification
node_runner -->|"annotates ORFs"| node_orf_annotation
node_orf_annotation -->|"annotates in transcript space"| node_transcript_context
node_orf_annotation -->|"annotates in genomic space"| node_genomic_context
node_orf_annotation -->|"assesses splice usage"| node_splice_sites
node_orf_annotation -->|"assesses translation"| node_uorf
node_orf_annotation -->|"annotates candidates"| node_nmd

click node_annotation_prep "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_input_prep "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_runner "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_transcript_filter "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_orf_finding "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_quantification "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_orf_annotation "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_transcript_context "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_genomic_context "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_splice_sites "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_uorf "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R"
click node_nmd "https://github.com/lcalviell/orfquant/blob/master/R/orfquant.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_gtf,node_genome,node_annotation_prep,node_bam,node_riboseqc,node_input_prep toneBlue
class node_runner,node_transcript_filter,node_orf_finding,node_quantification toneAmber
class node_orf_annotation,node_transcript_context,node_genomic_context,node_splice_sites,node_uorf,node_nmd toneMint
class node_user toneIndigo
```

## Components

### Input preparation

- **GTF annotation**
- **2bit genome**
- [Annotation preparation](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- **Ribo-seq BAM**
- **Ribo-se-qc**
- [Analysis input preparation](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`

### ORF analysis

- [Workflow runner](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [Transcript filtering](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [De-novo ORF finding](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [ORF quantification](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`

### ORF annotation

- [ORF annotation](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [Transcript context](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [Genomic context](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [Alternative splice sites](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [uORF translation](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`
- [NMD candidates](https://github.com/lcalviell/orfquant/blob/master/R/orfquant.R): `R/orfquant.R`

### Other components

- **Analyst**

## Connections

- Analyst → Annotation preparation: prepares annotation (evidence: `README.md`)
- GTF annotation → Annotation preparation: parses (evidence: `README.md`)
- 2bit genome → Annotation preparation: parses (evidence: `README.md`)
- Analyst → Analysis input preparation: prepares inputs (evidence: `README.md`)
- Ribo-seq BAM → Ribo-se-qc: provides reads (evidence: `README.md`)
- Ribo-se-qc → Analysis input preparation: creates inputs (evidence: `README.md`)
- Analyst → Workflow runner: runs analysis (evidence: `README.md`)
- Workflow runner → Transcript filtering: filters transcripts (evidence: `README.md`)
- Workflow runner → De-novo ORF finding: finds ORFs (evidence: `README.md`)
- Workflow runner → ORF quantification: quantifies ORFs (evidence: `README.md`)
- Workflow runner → ORF annotation: annotates ORFs (evidence: `README.md`)
- ORF annotation → Transcript context: annotates in transcript space (evidence: `README.md`)
- ORF annotation → Genomic context: annotates in genomic space (evidence: `README.md`)
- ORF annotation → Alternative splice sites: assesses splice usage (evidence: `README.md`)
- ORF annotation → uORF translation: assesses translation (evidence: `README.md`)
- ORF annotation → NMD candidates: annotates candidates (evidence: `README.md`)
