How hhhzj-7/deeprsma works
Project type and purpose
• DeepRSMA is a specialized research-oriented, full-stack machine learning pipeline for predicting RNA–small molecule binding affinity.
• It ingests raw biological data, preprocesses it, builds graph/neural representations, trains deep models, and evaluates under three settings (cross‑validation, blind test, independent test).
Top‑level components
a. Data Layer
• Raw datasets in data/RSM_data, data/blind_test, data/independent_data.csv.
• RNA contact maps in data/RNA_contact.
• Pre‑trained RNA embeddings in data/representations_cv and data/representations_independent.
• Molecular vocabulary and tokenizer under data/smiles_vocab.pkl & data/tokenizer.
b. Preprocessing Layer
• process_data_molecule.py & process_data_rna.py: prepare cross‑validation & blind‑test features.
• process_independent_mole.py & process_independent_rna.py: prepare independent‑test features.
• feature.py: extract any additional feature vectors.
c. Representation Generation (external dependency)
• SPOT-RNA-2D and RNA-FM external tools generate RNA contact maps & embeddings.
• These tools feed into data/RNA_contact and data/representations_*.
d. Model Layer
• GNNs: gnn_model_mole.py (molecule graphs), gnn_model_rna.py (RNA graphs).
• Transformer encoder: transformer_encoder.py.
• Cross‑attention fusion: cross_attention.py.
e. Training & Inference Layer
• main_cv.py: orchestrates cross‑validation training & evaluation.
• main_blind.py: blind‑test inference pipeline.
• main_independent.py: independent‑test inference pipeline.
f. Environment & Deployment
• environment.yml: conda specification for reproducibility.
Relationships & data flow
• External tools feed into the data layer; environment.yml underpins all components.
Architectural patterns & principles
• Pipeline pattern: clearly separated data ingestion, preprocessing, modeling, and evaluation stages.
• Modular code organization: data/, model/, main_*.py as entry points.
• Dependency injection of representations and contact maps (decouples embedding generation from model code).
• Reproducibility via environment.yml.