- Project Overview
- Models Implemented
- Project Tree
- Cloning the Repository
- Setting Up the Environment
- Running the Shell Scripts
- Script Input Requirements
- Datasets and Data Folder Placeholders
- Contact
This final year project (FYP) is a deep learning-based project focused on predicting microRNA (miRNA) target binding sites. The project explores different neural network architectures to enhance the accuracy of miRNA-mRNA interaction predictions. This work is part of ongoing research in bioinformatics, specifically in the area of post-transcriptional gene regulation.
This project builds on the miRBind project and is part of the ongoing miRBind2 publication project, which focuses on improving miRNA target site prediction by training more accurate models on larger datasets. The aim is to better understand miRNA-mRNA interactions by making use of deep learning techniques to predict miRNA binding sites more effectively.
The repository contains the following models for miRNA target site classification:
- Residual Networks (ResNets)
- Bidirectional Long Short-Term Memory Model networks (BiLSTMs)
- Deep Gated Recurrent Unit nertworks (DeepGRUs)
.
├── code
│ ├── BiLSTM_workflow.sh
│ ├── DeepGRU_workflow.sh
│ ├── ResNet_workflow.sh
│ ├── run_all_workflows.sh
│ ├── helper_functions
│ │ └── model_utils.py
│ └── machine_learning
│ ├── encode
│ │ ├── binding_2D_matrix_encoder.py
│ │ └── sequence_encoder_16ntPairs.py
│ ├── evaluate
│ │ ├── BiLSTM
│ │ │ ├── model_evaluate.py
│ │ │ └── model_predict.py
│ │ ├── DeepGRU
│ │ │ ├── model_evaluate.py
│ │ │ └── model_predict.py
│ │ └── ResNet
│ │ ├── model_evaluate.py
│ │ └── model_predict.py
│ └── train
│ ├── BiLSTM
│ │ ├── BiLSTM_Architectures.py
│ │ ├── BiLSTM_NoReg.py
│ │ └── BiLSTM_WithReg.py
│ ├── DeepGRU
│ │ ├── DeepGRU_Architectures.py
│ │ ├── DeepGRU_NoReg.py
│ │ └── DeepGRU_WithReg.py
│ └── ResNet
│ ├── ResNet_Architectures.py
│ ├── ResNet_NoReg.py
│ └── ResNet_WithReg.py
├── data
│ ├── BiLSTM_data
│ │ ├── testing
│ │ │ └── README.md
│ │ └── training
│ │ └── README.md
│ ├── DeepGRU_data
│ │ ├── testing
│ │ │ └── README.md
│ │ └── training
│ │ └── README.md
│ └── ResNet_data
│ ├── testing
│ │ └── README.md
│ └── training
│ └── README.md
└── models
├── ResNet_large_L1L2_AGO2_CLASH_Hejret2023_dr0.25_rf0.002.keras
├── ResNet_large_NoReg_AGO2_CLASH_Hejret2023_dr0.09.keras
├── ResNet_large_NoReg_AGO2_eCLIP_Manakov2022_dr0.13.keras
├── ResNet_medium_NoReg_AGO2_eCLIP_Manakov2022_dr0.13.keras
└── ResNet_small_NoReg_AGO2_eCLIP_Manakov2022_dr0.09.kerasThis project is organized into two main directories: code and data. The code directory contains the workflow scripts, helper functions and machine learning logic, which is further divided into the encode, train and evaluate directories.
Each model architecture (BiLSTM, DeepGRU, and ResNet) has its own dedicated folder within both train and evaluate, allowing for clear traceability between files and their corresponding architectures. Furthermore, the helper_functions directory contains reusable utility functions that support model building, training, and evaluation across different architectures.
Encoding scripts handle sequence and binding matrix transformations, while workflow .sh scripts in the root streamline the execution process. Lastly, the data directory is divided by model type and workflow stage (training or testing), each with its own README file acting as placeholders to indicate which datasets should be placed there instead of the README file. This setup ensures modularity, clarity, and ease of use.
To clone this repository, use the following command:
$ git clone https://github.com/DavidF-22/ICS3909-FYP.git # or ssh with 'git@github.com:DavidF-22/ICS3909-FYP.git'
$ cd ./ICS3909-FYP- Ensure you are using a Linux-based system or WSL.
- Create a virtual environment (optional but recommended):
$ python3 -m venv .venv # create python environment $ source .venv/bin/activate # activate environment $ python3 -m pip install --upgrade pip # upgrad pip to latest version
- Install the required dependencies:
$ pip install pandas numpy matplotlib tensorflow scikit-learn visualkeras
Before running any shell script in the repository, you must grant execution permissions. For example, to set permissions for the ResNet_workflow.sh script in the ResNet model, run:
$ chmod +x code/ResNet_workflow.shTo execute the script, use the file bath to the bash script along with its required user inputs:
$ code/ResNet_workflow.sh <user_input>If you wish to run all the workflows at once, you can use the run_all_workflows.sh script provided in the root directory. Please note that executing this script will initiate every workflow sequentially (one after another), which can be time consuming and may demand significant computational resources. Ensure your system is equipped to handle the load before running.
$ chmod +x code/run_all_workflows.sh
$ code/run_all_workflows.shSaves_... folders in each model’s directory before each run—otherwise previously saved outputs will be overwritten. They are automatically named in such a way that when running the run_all_workflows.sh script, there will be no clashes, but afterwards they need to be removed or renamed.
Each workflow script accepts a set of command-line arguments. In addition, you can use the -h or --help flag with any script to display the full usage information and a description of each input.
Usage:
$ code/ResNet_workflow.sh [noncodingRNA | miRNA] [small | medium | large] [noreg | withreg] [plot_true | plot_false] [seed]Arguments:
-
noncodingRNA | miRNA:Specifies the column name for the microRNA in the datasets. (This accommodates datasets with different naming conventions.)
-
small | medium | large:Selects the ResNet model variant based on its architecture parameters.
-
noreg | withreg:Indicates whether to train the model without regularization (noreg) or with regularization (withreg).
-
plot_true | plot_false:Specifies whether plots should be generated during training and evaluation.
-
seedEnsures reproducibility by setting a fixed random seed for data processing and model initialization.
Usage:
$ code/DeepGRU_workflow.sh [noncodingRNA | miRNA] [noreg | withreg] [plot_true | plot_false] [seed]$ code/BiLSTM_workflow.sh [noncodingRNA | miRNA] [noreg | withreg] [plot_true | plot_false] [seed]Arguments:
-
noncodingRNA | miRNA:Specifies the microRNA column name.
-
noreg | withreg:Indicates the type of regularization to use.
-
plot_true | plot_false:Determines whether to generate plots during the workflow.
Within the repository, several data folders include placeholder README.md files. These placeholders indicate, by file name, which datasets need to be placed in each folder.
AGO2_eCLIP_Manakov2022_full_dataset.tsv should not be used.
All required datasets can be obtained from the following link: miRBench_Datasets - Zenodo
This repository works with .tsv files. If your datasets are provided as .tsv.gz files, they will need to be unpacked:
-
Windows: You can extract
.gzfiles using thetarcommand in Command Prompt or by installing the 7-Zip program. -
Mac Simply double-click the file to extract it, or use the command in a Terminal window:
$ gunzip filename.gz
-
Linux Use the following command to decompress the file:
$ gzip -d `__filename__`.gz
If you have any questions or feedback, please contact David Farrugia