# fallerlab/arf architecture

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

## Overview

ARF is an R package for analyzing ribosomal RNA fragments from ribosome-profiling experiments. Users align reads to the supplied rRNA references, provide sample metadata and alignment coverage, then run dripARF for ribosomal-protein incorporation predictions or dricARF for those predictions plus collision analysis. The documented analysis includes normalized differential counts, enrichment and positional-bias controls, and sample-level weighting; results can be simplified and plotted. README documents the workflow and capabilities, but no source excerpts were provided, so internal call ownership beyond the documented method relationships is not asserted.

Main entry points: [`R/dricARF.R`](https://github.com/fallerlab/arf/blob/main/R/dricARF.R) (dricARF), [`R/dripARF.R`](https://github.com/fallerlab/arf/blob/main/R/dripARF.R) (dripARF), [`R/ARF_platform.R`](https://github.com/fallerlab/arf/blob/main/R/ARF_platform.R) (Structure utilities), [`R/ssRPSEA.R`](https://github.com/fallerlab/arf/blob/main/R/ssRPSEA.R) (ssRPSEA weighting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and references"]
  node_coverage["rRNA coverage"]
  node_samplefile["Sample metadata"]
  node_references["rRNA references"]
end

subgraph group_analysis["Prediction methods"]
  node_drip["dripARF<br/>[dripARF.R]"]
  node_dric["dricARF<br/>[dricARF.R]"]
  node_collision["Collision sets<br/>[dricARF.R]"]
end

subgraph group_enrichment["Enrichment analysis"]
  node_normalization["DESeq2 normalization<br/>[dripARF.R]"]
  node_rpsea["RPSEA and ORA<br/>[dripARF.R]"]
  node_randomization["Shifted controls<br/>[dripARF.R]"]
  node_ssrpsea["ssRPSEA weighting<br/>[ssRPSEA.R]"]
  node_deseq["DESeq2"]
  node_gsea["GSEA and ORA tools"]
  node_limma["limma"]
end

subgraph group_structure["Structural preparation"]
  node_structureprep["Structure utilities<br/>[ARF_platform.R]"]
end

subgraph group_results["Results and visualization"]
  node_predictions["Prediction results<br/>[dripARF.R]"]
  node_simplify["Result filtering<br/>[dripARF.R]"]
  node_plots["Plots and reports<br/>[dripARF.R]"]
end

node_researcher(("Analyst"))
node_aligner["Read aligner"]

node_researcher -->|"aligns reads"| node_aligner
node_aligner -->|"creates coverage"| node_coverage
node_researcher -->|"runs"| node_drip
node_researcher -->|"runs"| node_dric
node_drip -->|"accepts metadata"| node_samplefile
node_dric -->|"accepts metadata"| node_samplefile
node_drip -->|"uses coordinates"| node_references
node_dric -->|"uses coordinates"| node_references
node_drip -->|"normalizes counts"| node_normalization
node_dric -->|"normalizes counts"| node_normalization
node_normalization -->|"uses"| node_deseq
node_drip -->|"tests enrichment"| node_rpsea
node_dric -->|"tests enrichment"| node_rpsea
node_rpsea -->|"uses"| node_gsea
node_rpsea -->|"z-scores against"| node_randomization
node_drip -->|"adds weighting"| node_ssrpsea
node_dric -->|"adds weighting"| node_ssrpsea
node_ssrpsea -->|"models scores"| node_limma
node_dric -->|"integrates"| node_collision
node_drip -->|"returns predictions"| node_predictions
node_dric -->|"returns predictions"| node_predictions
node_researcher -->|"prepares custom data"| node_structureprep
node_structureprep -->|"supplies proximity data"| node_drip
node_structureprep -->|"supplies proximity data"| node_dric
node_predictions -->|"filters"| node_simplify
node_predictions -->|"generates reports"| node_plots

click node_coverage "https://github.com/fallerlab/arf/tree/main/rRNAs"
click node_references "https://github.com/fallerlab/arf/tree/main/rRNAs"
click node_drip "https://github.com/fallerlab/arf/blob/main/R/dripARF.R"
click node_dric "https://github.com/fallerlab/arf/blob/main/R/dricARF.R"
click node_normalization "https://github.com/fallerlab/arf/blob/main/R/dripARF.R"
click node_rpsea "https://github.com/fallerlab/arf/blob/main/R/dripARF.R"
click node_randomization "https://github.com/fallerlab/arf/blob/main/R/dripARF.R"
click node_ssrpsea "https://github.com/fallerlab/arf/blob/main/R/ssRPSEA.R"
click node_collision "https://github.com/fallerlab/arf/blob/main/R/dricARF.R"
click node_structureprep "https://github.com/fallerlab/arf/blob/main/R/ARF_platform.R"
click node_predictions "https://github.com/fallerlab/arf/blob/main/R/dripARF.R"
click node_simplify "https://github.com/fallerlab/arf/blob/main/R/dripARF.R"
click node_plots "https://github.com/fallerlab/arf/blob/main/R/dripARF.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_coverage,node_samplefile,node_references toneBlue
class node_drip,node_dric,node_collision toneAmber
class node_normalization,node_rpsea,node_randomization,node_ssrpsea,node_deseq,node_gsea,node_limma toneMint
class node_structureprep toneRose
class node_predictions,node_simplify,node_plots,node_researcher,node_aligner toneIndigo
```

## Components

### Inputs and references

- [rRNA coverage](https://github.com/fallerlab/arf/tree/main/rRNAs): `rRNAs`
- **Sample metadata**
- [rRNA references](https://github.com/fallerlab/arf/tree/main/rRNAs): `rRNAs`

### Prediction methods

- [dripARF](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`
- [dricARF](https://github.com/fallerlab/arf/blob/main/R/dricARF.R): `R/dricARF.R`
- [Collision sets](https://github.com/fallerlab/arf/blob/main/R/dricARF.R): `R/dricARF.R`

### Enrichment analysis

- [DESeq2 normalization](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`
- [RPSEA and ORA](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`
- [Shifted controls](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`
- [ssRPSEA weighting](https://github.com/fallerlab/arf/blob/main/R/ssRPSEA.R): `R/ssRPSEA.R`
- **DESeq2**
- **GSEA and ORA tools**
- **limma**

### Structural preparation

- [Structure utilities](https://github.com/fallerlab/arf/blob/main/R/ARF_platform.R): `R/ARF_platform.R`

### Results and visualization

- [Prediction results](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`
- [Result filtering](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`
- [Plots and reports](https://github.com/fallerlab/arf/blob/main/R/dripARF.R): `R/dripARF.R`

### Other components

- **Analyst**
- **Read aligner**

## Connections

- Analyst → Read aligner: aligns reads (evidence: `README.md`)
- Read aligner → rRNA coverage: creates coverage (evidence: `README.md`)
- Analyst → dripARF: runs (evidence: `README.md`)
- Analyst → dricARF: runs (evidence: `README.md`)
- dripARF → Sample metadata: accepts metadata (evidence: `README.md`)
- dricARF → Sample metadata: accepts metadata (evidence: `README.md`)
- dripARF → rRNA references: uses coordinates (evidence: `README.md`)
- dricARF → rRNA references: uses coordinates (evidence: `README.md`)
- dripARF → DESeq2 normalization: normalizes counts (evidence: `README.md`)
- dricARF → DESeq2 normalization: normalizes counts (evidence: `README.md`)
- DESeq2 normalization → DESeq2: uses (evidence: `README.md`)
- dripARF → RPSEA and ORA: tests enrichment (evidence: `README.md`)
- dricARF → RPSEA and ORA: tests enrichment (evidence: `README.md`)
- RPSEA and ORA → GSEA and ORA tools: uses (evidence: `README.md`)
- RPSEA and ORA → Shifted controls: z-scores against (evidence: `README.md`)
- dripARF → ssRPSEA weighting: adds weighting (evidence: `README.md`)
- dricARF → ssRPSEA weighting: adds weighting (evidence: `README.md`)
- ssRPSEA weighting → limma: models scores (evidence: `README.md`)
- dricARF → Collision sets: integrates (evidence: `README.md`)
- dripARF → Prediction results: returns predictions (evidence: `README.md`)
- dricARF → Prediction results: returns predictions (evidence: `README.md`)
- Analyst → Structure utilities: prepares custom data (evidence: `README.md`)
- Structure utilities → dripARF: supplies proximity data (evidence: `README.md`)
- Structure utilities → dricARF: supplies proximity data (evidence: `README.md`)
- Prediction results → Result filtering: filters (evidence: `README.md`)
- Prediction results → Plots and reports: generates reports (evidence: `README.md`)
