How suhasreddysingam/deeprsma works
Project Type and Purpose
• This is a research-focused deep learning application for predicting the binding affinity between RNA and small molecules using a cross-fusion approach.
• It integrates several experimental setups: cross validation, blind test, and independent test.
• The project leverages pre-computed RNA embeddings and contact maps along with molecule data.
Main Architectural Components
a. Data Layer:
– Raw Data: Includes various datasets stored under “data” (e.g., RSM_data, blind_test, independent_data, and RNA_contact which has detailed RNA contact maps for different RNA classes).
– Pre-trained Representations: RNA embeddings, contact maps, and additional molecular representations (data/representations_cv and data/representations_independent).
– Additional data processing scripts (e.g., process_data_molecule.py, process_data_rna.py, process_independent_mole.py, process_independent_rna.py).
– Supporting utilities: vocabulary files, tokenizers, and feature extraction scripts.
b. Preprocessing and Feature Extraction:
– Data processing modules that convert raw data into suitable inputs.
– This includes generation of contact maps and pre-trained RNA embeddings (with dependency on external libraries SPOT-RNA-2D and RNA-FM).
– Scripts under “data” which help prepare cross validation, blind test, and independent test datasets.
c. Model and Training Module:
– Deep learning models are built in the “model” folder.
• Components include cross_attention, GNN models for molecules and RNA, and a transformer encoder.
• These components likely perform the fusion of features from RNA and small molecules.
– Main training/testing runners:
• main_cv.py for cross validation,
• main_blind.py for blind testing,
• main_independent.py for independent testing.
– The model leverages a cross fusion mechanism to integrate heterogeneous features from different data streams.
d. Environment and Deployment:
– The environment is defined in environment.yml (using conda).
– There is a clear separation between data processing, model training, and evaluation scripts.
Relationships and Data Flow
– Raw data and pre-computed representations serve as input to the data processing modules.
– The processed data is then fed into different training/testing pipelines based on experimental setup (controlled by the main_*.py scripts).
– Within the model pipeline, processed features flow into the deep learning architecture, which fuses information using modules like cross_attention, GNNs, and transformer encoders.
– The outputs are binding affinity predictions, which can then be evaluated or used for further analysis.
– External libraries (e.g., SPOT-RNA-2D, RNA-FM) are utilized during the pre-training or feature extraction phase.
Architectural Patterns and Design Principles
– Modular design: Each component (data processing, model architecture, and experiment runners) is isolated in its own folder/file.
– Pipeline-based data flow: The system processes raw data to generate features that are subsequently passed through a network of deep learning modules.
– Separation of concerns: Data preparation is handled separately from model training and evaluation.
– Reusability and extensibility: The design leaves room to adjust or add new experimental setups or models.