How nithish-chandra-devarashetty/deeprsma-dp works
Project Type & Purpose
• DeepRSMA is a specialized deep‑learning pipeline (full-stack research tool) for predicting RNA–small‑molecule binding affinities.
• It ingests raw molecular and RNA data, processes and represents these inputs, trains graph‑based neural networks with cross‑attention fusion, and evaluates performance under three experimental settings: cross‑validation, blind test, and independent test.
Key Components
A. Data Storage & Preprocessing
• Raw Data Repository (“data/”):
• RSM_data (cross‑validation CSVs)
• blind_test CSVs
• independent_data.csv
• RNA contact maps (SPOT‑RNA‑2D outputs)
• Preprocessing Modules (“data/process_*.py” + “data/feature.py” + “data/vocab.py” + tokenizer):
• process_data_molecule.py / process_independent_mole.py
• process_data_rna.py / process_independent_rna.py
• compute small‑molecule graphs, tokenize SMILES, build RNA feature matrices
B. Representation & Embedding
• Pretrained RNA embeddings (“data/representations_cv/” and “representations_independent/”) generated via RNA‑FM
• Contact‑map files under “data/RNA_contact/*” generated via SPOT‑RNA‑2D
C. Model Definition
• Python package “model/”:
• gnn_model_mole.py: GNN encoder for small‑molecule graphs
• gnn_model_rna.py: GNN encoder for RNA contact graphs
• transformer_encoder.py: transformer blocks to process node features
• cross_attention.py: cross‑modal attention fusion between molecule & RNA embeddings
D. Training & Evaluation Orchestrator
• Entry‑point scripts:
• main_cv.py (cross‑validation loop)
• main_blind.py (blind test evaluation)
• main_independent.py (independent test evaluation)
• They import data preprocessing, model building, training loops, logging, metrics calculation
E. Environment & External Dependencies
• environment.yml: Conda specification for Python, PyTorch, NumPy, SciPy, etc.
• External services/libraries: SPOT‑RNA‑2D, RNA‑FM for generating contact maps and RNA embeddings
Interactions & Data Flow
1. Raw Input Data → Preprocessing Modules → Processed graphs + feature tensors
2. RNA contact maps & pretrained embeddings → Representation Modules → Embedding tensors
3. Processed inputs + embeddings → Model Definition → Forward passes under training scripts
4. Training scripts handle batching, loss computation, backpropagation, checkpointing, reporting metrics
5. Generated performance outputs (metrics, plots) for each experimental setting
Architectural Patterns & Principles
• Modular separation of concerns: data ingestion, representation, modelling, orchestration
• Pipeline/ETL pattern for data preprocessing and feature engineering
• Layered model architecture: GNN encoders → transformer blocks → cross‑attention fusion → prediction head
• Reproducibility via environment.yml and script‑based orchestration
Essential Elements to Capture
• Raw data sources (CSV, .prob_single files, .npy embeddings)
• Preprocessing scripts and outputs (graph objects, feature matrices)
• Pretrained representation store (embedding loader)
• Model modules (GNN encoders, transformer, cross‑attention fusion)
• Experiment orchestrator (main_cv.py, main_blind.py, main_independent.py)
• External libraries/services and environment management