# 3biocompbio/rsalor architecture

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

- Interactive diagram: https://gitdiagram.com/3biocompbio/rsalor
- Repository: https://github.com/3biocompbio/rsalor

## Overview

RSALOR is a protein missense-effect scoring package: users provide an MSA and optionally a structure, and receive per-mutation RSA/LOR-based scores, commonly as CSV. The main runtime coordinator is MSA; the CLI is another entry point. The README also describes a Colab workflow for obtaining inputs and viewing predictions, but notebook internals were not sampled, so those links are documented capabilities rather than inspected implementation. Source excerpts and the index support the core module relationships; other unverified links are omitted.

Main entry points: [`rsalor/msa.py`](https://github.com/3biocompbio/rsalor/blob/main/rsalor/msa.py) (MSA coordinator), [`colab_notebook_RSALOR.ipynb`](https://github.com/3biocompbio/rsalor/blob/main/colab_notebook_RSALOR.ipynb) (Colab workflow), [`rsalor/sequence/sequence.py`](https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/sequence.py) (Protein sequence), [`rsalor/cli.py`](https://github.com/3biocompbio/rsalor/blob/main/rsalor/cli.py) (Command line)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["Command line<br/>[cli.py]"]
  node_colab["Colab workflow"]
  node_msa["MSA coordinator<br/>[msa.py]"]
end

subgraph group_evolution["Evolutionary scoring"]
  node_weights["Sequence weighting<br/>[compute_weights.py]"]
  node_cpp["Weighting backend"]
end

subgraph group_structure["Structure analysis"]
  node_structure_model["Structure parser and RSA<br/>[structure.py]"]
  node_residue["Residue data<br/>[residue.py]"]
end

subgraph group_sequence["Sequence domain"]
  node_fasta["FASTA reader<br/>[fasta_reader.py]"]
  node_sequence_obj["Protein sequence<br/>[sequence.py]"]
  node_amino["Amino-acid model<br/>[amino_acid.py]"]
  node_mutation["Mutation model<br/>[mutation.py]"]
  node_alignment["Pairwise alignment"]
end

subgraph group_output["Results and display"]
  node_csv["Score CSV<br/>[CSV.py]"]
  node_viewer["Prediction visualization"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_cli
node_user -->|"opens"| node_colab
node_cli -->|"invokes"| node_msa
node_colab -.->|"uses"| node_msa
node_msa -->|"reads alignment"| node_fasta
node_msa -->|"computes weights"| node_weights
node_weights -->|"calls backend"| node_cpp
node_msa -->|"loads structure"| node_structure_model
node_msa -->|"aligns sequences"| node_alignment
node_msa -->|"scores mutations"| node_mutation
node_msa -->|"writes scores"| node_csv
node_structure_model -->|"creates residues"| node_residue
node_alignment -->|"aligns"| node_sequence_obj
node_fasta -->|"parses sequences"| node_sequence_obj
node_sequence_obj -->|"uses amino acids"| node_amino
node_colab -->|"visualizes predictions"| node_viewer

click node_cli "https://github.com/3biocompbio/rsalor/blob/main/rsalor/cli.py"
click node_colab "https://github.com/3biocompbio/rsalor/blob/main/colab_notebook_RSALOR.ipynb"
click node_msa "https://github.com/3biocompbio/rsalor/blob/main/rsalor/msa.py"
click node_fasta "https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/fasta_reader.py"
click node_sequence_obj "https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/sequence.py"
click node_amino "https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/amino_acid.py"
click node_mutation "https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/mutation.py"
click node_alignment "https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/pairwise_alignment.py"
click node_weights "https://github.com/3biocompbio/rsalor/blob/main/rsalor/weights/compute_weights.py"
click node_cpp "https://github.com/3biocompbio/rsalor/blob/main/rsalor/weights/computeWeightsBackend.cpp"
click node_structure_model "https://github.com/3biocompbio/rsalor/blob/main/rsalor/structure/structure.py"
click node_residue "https://github.com/3biocompbio/rsalor/blob/main/rsalor/structure/residue.py"
click node_csv "https://github.com/3biocompbio/rsalor/blob/main/rsalor/utils/CSV.py"
click node_viewer "https://github.com/3biocompbio/rsalor/blob/main/colab_notebook_RSALOR.ipynb"

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_cli,node_colab,node_msa toneBlue
class node_weights,node_cpp toneAmber
class node_structure_model,node_residue toneMint
class node_fasta,node_sequence_obj,node_amino,node_mutation,node_alignment toneRose
class node_csv,node_viewer,node_user toneIndigo
```

## Components

### User entry points

- [Command line](https://github.com/3biocompbio/rsalor/blob/main/rsalor/cli.py): `rsalor/cli.py`
- [Colab workflow](https://github.com/3biocompbio/rsalor/blob/main/colab_notebook_RSALOR.ipynb): `colab_notebook_RSALOR.ipynb`
- [MSA coordinator](https://github.com/3biocompbio/rsalor/blob/main/rsalor/msa.py): `rsalor/msa.py`

### Evolutionary scoring

- [Sequence weighting](https://github.com/3biocompbio/rsalor/blob/main/rsalor/weights/compute_weights.py): `rsalor/weights/compute_weights.py`
- [Weighting backend](https://github.com/3biocompbio/rsalor/blob/main/rsalor/weights/computeWeightsBackend.cpp): `rsalor/weights/computeWeightsBackend.cpp`

### Structure analysis

- [Structure parser and RSA](https://github.com/3biocompbio/rsalor/blob/main/rsalor/structure/structure.py): `rsalor/structure/structure.py`
- [Residue data](https://github.com/3biocompbio/rsalor/blob/main/rsalor/structure/residue.py): `rsalor/structure/residue.py`

### Sequence domain

- [FASTA reader](https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/fasta_reader.py): `rsalor/sequence/fasta_reader.py`
- [Protein sequence](https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/sequence.py): `rsalor/sequence/sequence.py`
- [Amino-acid model](https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/amino_acid.py): `rsalor/sequence/amino_acid.py`
- [Mutation model](https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/mutation.py): `rsalor/sequence/mutation.py`
- [Pairwise alignment](https://github.com/3biocompbio/rsalor/blob/main/rsalor/sequence/pairwise_alignment.py): `rsalor/sequence/pairwise_alignment.py`

### Results and display

- [Score CSV](https://github.com/3biocompbio/rsalor/blob/main/rsalor/utils/CSV.py): `rsalor/utils/CSV.py`
- [Prediction visualization](https://github.com/3biocompbio/rsalor/blob/main/colab_notebook_RSALOR.ipynb): `colab_notebook_RSALOR.ipynb`

### Other components

- **Researcher**

## Connections

- Researcher → Command line: runs (evidence: `README.md`)
- Researcher → Colab workflow: opens (evidence: `README.md`)
- Command line → MSA coordinator: invokes (evidence: `rsalor/cli.py`)
- Colab workflow → MSA coordinator: uses (evidence: `README.md`)
- MSA coordinator → FASTA reader: reads alignment (evidence: `rsalor/msa.py`)
- MSA coordinator → Sequence weighting: computes weights (evidence: `rsalor/msa.py`)
- Sequence weighting → Weighting backend: calls backend (evidence: `README.md`)
- MSA coordinator → Structure parser and RSA: loads structure (evidence: `rsalor/msa.py`)
- MSA coordinator → Pairwise alignment: aligns sequences (evidence: `rsalor/msa.py`)
- MSA coordinator → Mutation model: scores mutations (evidence: `rsalor/msa.py`)
- MSA coordinator → Score CSV: writes scores (evidence: `rsalor/msa.py`)
- Structure parser and RSA → Residue data: creates residues (evidence: `rsalor/structure/structure.py`)
- Pairwise alignment → Protein sequence: aligns (evidence: `rsalor/sequence/pairwise_alignment.py`)
- FASTA reader → Protein sequence: parses sequences (evidence: `rsalor/sequence/fasta_reader.py`)
- Protein sequence → Amino-acid model: uses amino acids (evidence: `rsalor/sequence/sequence.py`)
- Colab workflow → Prediction visualization: visualizes predictions (evidence: `README.md`)
