# broadinstitute/g2p-bis architecture

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

- Interactive diagram: https://gitdiagram.com/broadinstitute/g2p-bis
- Repository: https://github.com/broadinstitute/g2p-bis

## Overview

G2P-BIS is a small bioinformatics toolkit within the broader Genomics 2 Proteins portal. Its shown runtime covers two separate tasks: pairwise protein-sequence alignment with formatted alignment output, and salt-bridge detection from a PDB file with results written to an .sb2 file. The alignment module uses BLASTP scores to annotate conservation in formatted output. The README also describes portal APIs, other protein interactions, and pocket annotations, but this tree contains no implementation for those capabilities; they are therefore not mapped as runtime components.

Main entry points: [`src/core/alignment.js`](https://github.com/broadinstitute/g2p-bis/blob/main/src/core/alignment.js) (Isoform aligner), [`src/PPI_salt_bridges.py`](https://github.com/broadinstitute/g2p-bis/blob/main/src/PPI_salt_bridges.py) (Salt-bridge calculator), [`src/constants/blastp.js`](https://github.com/broadinstitute/g2p-bis/blob/main/src/constants/blastp.js) (BLASTP scores)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_alignment["Sequence alignment"]
  node_aligner["Isoform aligner<br/>[alignment.js]"]
  node_blastp["BLASTP scores<br/>[blastp.js]"]
  node_alignment_result["Alignment output<br/>[alignment.js]"]
end

subgraph group_interactions["Protein interactions"]
  node_salt_bridges["Salt-bridge calculator"]
  node_pdb_parser["Bio.PDB parser"]
  node_sb2_output["Salt-bridge file"]
end

node_sequence_user(("Sequence caller"))
node_pdb_user(("PDB file caller"))

node_sequence_user -->|"provides sequences"| node_aligner
node_aligner -->|"reads scores"| node_blastp
node_aligner -->|"returns alignment"| node_alignment_result
node_pdb_user -->|"provides PDB ID"| node_salt_bridges
node_salt_bridges -->|"parses structure"| node_pdb_parser
node_salt_bridges -->|"writes results"| node_sb2_output

click node_aligner "https://github.com/broadinstitute/g2p-bis/blob/main/src/core/alignment.js"
click node_blastp "https://github.com/broadinstitute/g2p-bis/blob/main/src/constants/blastp.js"
click node_alignment_result "https://github.com/broadinstitute/g2p-bis/blob/main/src/core/alignment.js"
click node_salt_bridges "https://github.com/broadinstitute/g2p-bis/blob/main/src/PPI_salt_bridges.py"
click node_sb2_output "https://github.com/broadinstitute/g2p-bis/blob/main/src/PPI_salt_bridges.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_aligner,node_blastp,node_alignment_result toneBlue
class node_salt_bridges,node_pdb_parser,node_sb2_output toneAmber
class node_sequence_user,node_pdb_user toneIndigo
```

## Components

### Sequence alignment

- [Isoform aligner](https://github.com/broadinstitute/g2p-bis/blob/main/src/core/alignment.js): `src/core/alignment.js`
- [BLASTP scores](https://github.com/broadinstitute/g2p-bis/blob/main/src/constants/blastp.js): `src/constants/blastp.js`
- [Alignment output](https://github.com/broadinstitute/g2p-bis/blob/main/src/core/alignment.js): `src/core/alignment.js`

### Protein interactions

- [Salt-bridge calculator](https://github.com/broadinstitute/g2p-bis/blob/main/src/PPI_salt_bridges.py): `src/PPI_salt_bridges.py`
- **Bio.PDB parser**
- [Salt-bridge file](https://github.com/broadinstitute/g2p-bis/blob/main/src/PPI_salt_bridges.py): `src/PPI_salt_bridges.py`

### Other components

- **Sequence caller**
- **PDB file caller**

## Connections

- Sequence caller → Isoform aligner: provides sequences (evidence: `README.md`)
- Isoform aligner → BLASTP scores: reads scores (evidence: `src/core/alignment.js`)
- Isoform aligner → Alignment output: returns alignment (evidence: `src/core/alignment.js`)
- PDB file caller → Salt-bridge calculator: provides PDB ID (evidence: `src/PPI_salt_bridges.py`)
- Salt-bridge calculator → Bio.PDB parser: parses structure (evidence: `src/PPI_salt_bridges.py`)
- Salt-bridge calculator → Salt-bridge file: writes results (evidence: `src/PPI_salt_bridges.py`)
