How regeneron-mpds/propermab works
Project type and purpose
• This is an open‑source Python package (library + CLI scripts) named propermab.
• It provides an integrative in silico pipeline to calculate and predict molecular features of monoclonal antibodies (mAbs), combining sequence‑ and structure‑based featurization, external tools (APBS, NanoShaper, HMMER, PDB2PQR, ABodyBuilder2), and a machine‑learning “model_trainer” component.
File structure
• Top‑level items:
• default_config.json – JSON template for external tool paths
• conda_env.yml – Python & dependency specification
• propermab/ – main Python package subdivided into:
– defaults.py – system configuration loader
– features/ – sequence & structural feature calculators
– io/ – I/O code for geometry & structure files
– models/ – ML model training & persistence
– plot/ – plotting utilities
– sequence/ – sequence numbering & utilities
– structure/ – structure pipelines (MD, SASA, prediction)
– utils/ – wrappers around APBS, NanoShaper, transforms
• scripts/ – CLI entry points:
– pdb_to_xyzr.py, create_surface_voxels.py, etc.
• tests/ – unit tests and fixture data
README for additional insights
• Highlights two API entry points:
• calculate_features_from_pdb(pdb_path)
• get_all_mol_features(heavy_seq, light_seq, ...) calling ABodyBuilder2
• Emphasizes external dependencies: APBS, NanoShaper, hmmer, pdb2pqr, multivalue.
1. User/API Layer
– Python API / CLI scripts (under scripts/)
2. Configuration
– defaults.system_config reading default_config.json and environment variables
3. Sequence Pipeline (propermab/sequence + features/seq_*)
– HMMER → sequence embedding & featurization
4. Structure Pipeline (propermab/structure, features/struct_*)
– ABodyBuilder2 → PDB file → io/struct_io → NanoShaper & APBS calls → geometry & electrostatics → structural featurizers
5. Feature Aggregation (features/feature_utils)
6. Model Trainer (models/model_trainer)
7. Visualization (plot/protein.py)
8. External Tools (APBS, NanoShaper, hmmer, pdb2pqr, multivalue, ABodyBuilder2)
b. Relationships & data flow
• Sequence Pipeline and Structure Pipeline both feed into Feature Aggregation.
• Aggregated features go into Model Trainer or returned to user.
• Visualization can subscribe to outputs of aggregation or modeling.
c. Architectural patterns / design principles
• Modular layering: API / config / pipelines / utilities / ML
• Single‑responsibility per module folder
• Clear separation of sequence vs. structure processing
• Pluggable external tool wrappers in utils/
d. Key technologies, frameworks, libraries
• Python 3.x, conda environment
• Third‑party tools: APBS v3, NanoShaper, HMMER, pdb2pqr, multivalue, ABodyBuilder2
• Python libs: NumPy, SciPy, Biopython (implicit), machine‑learning framework (scikit‑learn or PyTorch/TensorFlow indicated by conda_env.yml)
• Blue for internal Python modules
• Green for external tools/binaries
• Orange for data artifacts (PDB, XYZR, feature vectors)