How pypcoder/mutantscope works
MutantScope lets a researcher submit a UniProt mutation, then fetches the protein sequence and structure metadata, validates and constructs the mutant sequence, predicts secondary structure for both sequences, and requests a biological explanation. The web client displays the returned sequence, structure predictions, composition, and explanation. The main request orchestration and prediction path are supported by sampled source; the separate protein-info endpoint is documented but no client call to it is shown.
Main entry points: main.py FastAPI routes · page.tsx Web app · alphafold.py AlphaFold client · LeftPanel.tsx Mutation form
Components 12
Web client
- Mutation form
client/components/LeftPanel.tsx - Web app
client/app/page.tsx - Structure view
client/components/Viewer.tsx - Result drawer
client/components/Drawer.tsx
API orchestration
- FastAPI routes
server/main.py - AlphaFold client
server/services/alphafold.py
Mutation analysis
- SERAPH predictor
server/models/seraph.py - Explanation service
server/services/gemini.py
External services
- AlphaFold DB
- ESM2 model
- Gemini API
Other components
- Researcher
Connections 13
- Researcher → Mutation form: enters mutation
- Mutation form → Web app: submits inputs
- Web app → FastAPI routes: POST /mutate
- FastAPI routes → AlphaFold client: fetches sequence and structure
- AlphaFold client → AlphaFold DB: requests protein data
- AlphaFold DB → AlphaFold client: returns protein data
- FastAPI routes → SERAPH predictor: predicts both sequences
- SERAPH predictor → ESM2 model: loads pretrained backbone
- FastAPI routes → Explanation service: requests explanation
- Explanation service → Gemini API: generates explanation
- FastAPI routes → Web app: returns analysis
- Web app → Structure view: passes predictions
- Web app → Result drawer: passes result