Skip to content

Delizald/Unfold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unfold

A computational toolkit for exploring HLA-B27 misfolding and drug discovery in Ankylosing Spondylitis.

Unfold uses AlphaFold 3's protein-ligand interaction predictions to investigate why HLA-B27 misfolds and screen small molecules that might stabilize it. Built by a developer with AS who got tired of waiting for someone else to do it.

The Science in 60 Seconds

Ankylosing Spondylitis (AS) is strongly linked to the HLA-B27 protein. The leading hypothesis: HLA-B27 misfolds in the endoplasmic reticulum, triggering an unfolded protein response (UPR) that causes chronic inflammation which attacks your joints and spine.

If we can find molecules that stabilize HLA-B27's folding, we might prevent the cascade that causes AS. That's what Unfold explores.

What It Does

  1. Fetch — Pulls HLA-B27 structure, sequences, and annotations from AlphaFold DB, UniProt, and PDB
  2. Analyze — Identifies misfolding-prone regions via pLDDT confidence scoring and SASA analysis
  3. Compare — Compares HLA-B27:05 (AS-associated) vs B27:06 (protective) to find what makes one dangerous
  4. Screen — Prepares protein-ligand inputs for AlphaFold 3 Server and parses interaction predictions
  5. Visualize — Generates publication-quality charts, confidence heatmaps, and 3D structure views

Architecture

unfold/
├── main.py              # Pipeline orchestrator
├── config.py            # Constants, paths, API endpoints
├── fetch/
│   ├── alphafold.py     # AlphaFold DB structure + confidence data
│   ├── uniprot.py       # Sequence, variants, annotations
│   └── chembl.py        # Known AS-related compounds from ChEMBL
├── analyze/
│   ├── structure.py     # PDB parsing, SASA, secondary structure
│   ├── confidence.py    # pLDDT analysis, unstable region detection
│   └── pockets.py       # Binding pocket identification
├── compare/
│   └── subtypes.py      # B*27:05 vs B*27:06 structural comparison
├── screen/
│   ├── candidates.py    # Curated small molecule library
│   ├── af3_input.py     # Generate AlphaFold 3 Server JSON inputs
│   └── af3_output.py    # Parse AF3 prediction results
├── visualize/
│   ├── confidence.py    # pLDDT heatmaps
│   ├── docking.py       # Screening result charts
│   ├── comparison.py    # Subtype comparison plots
│   └── structure_3d.py  # py3Dmol interactive viewer
├── data/
│   ├── cache/           # Downloaded structures & sequences
│   ├── af3_inputs/      # Generated AF3 Server input JSONs
│   ├── af3_outputs/     # AF3 Server result files
│   └── figures/         # Generated visualizations
├── requirements.txt
└── README.md

Setup

Windows (cmd):

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

Windows (PowerShell):

python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt

PowerShell note: if you get an execution policy error, run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser first.

Linux / macOS:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage

Commands are the same on all platforms once the venv is activated:

# Full analysis pipeline (no GPU needed)
python main.py

# Analysis only, skip screening prep
python main.py --skip-screening

# Custom pLDDT threshold for unstable regions
python main.py --threshold 60

# Generate AF3 Server inputs for screening
python main.py --prepare-af3

# Parse AF3 Server results after running predictions
python main.py --parse-af3 data/af3_outputs/

AlphaFold 3 Integration

Unfold doesn't require a local GPU. The workflow is:

  1. Unfold generates input JSONs for the AlphaFold Server
  2. You submit them to the server (free, non-commercial use)
  3. Unfold parses the results and scores binding interactions

For local AF3 inference (requires GPU + model weights):

Key Research Angles

  • Subtype comparison: B27:05 causes AS, B27:06 protects against it. They differ by only 1 residue (position 116: Asp→His). Understanding why this single change affects folding is a major clue.
  • Chemical chaperones: Compounds like 4-PBA and TUDCA stabilize protein folding in the ER. Could they work for HLA-B27?
  • Peptide groove binding: Abacavir (an HIV drug) binds inside HLA-B*57:01's groove and changes peptide presentation. Could a similar approach work for B27?

License

MIT — go unfold something.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages