This Flask app uses a pre-trained Meta ESM model to predict the subcellular localization of a protein sequence. The app provides both tabular and graphical outputs of the predicted localization.
Proteins are essential macromolecules that perform a wide variety of functions within cells. One important aspect of protein function is their subcellular localization, which refers to the specific location within a cell where the protein is most active or performs its function.
Determining the subcellular localization of a protein can provide important insights into its function and role in cellular processes. There are several experimental methods available for determining protein localization, but these can be time-consuming and costly. Computational methods, such as machine learning models, offer a more efficient and cost-effective approach to predicting protein localization.
This Flask app uses the Meta ESM architecture. The ESM model is a deep learning model that is specifically designed for processing protein sequences. The model was trained on a large dataset of protein sequences with known subcellular localization, allowing it to learn patterns in the sequence that are associated with specific subcellular localizations.
The app takes a protein sequence as input and returns the predicted subcellular localization. The predictions are provided in both a tabular format and as a bar plot, making it easy to quickly understand the predicted localization.
To run this Flask app, you will need to have Python 3.7 or higher installed.
- Clone the repository or download the zip file and extract it.
- Open a terminal window and navigate to the root directory of the project.
- Create a virtual environment by running python3 -m venv env.
- Activate the virtual environment by running source env/bin/activate.
- Install the required packages by running
pip install -r requirements.txt
. - Start the Flask app by running
export FLASK_APP=app.py flask run
. - Once the app is running, you can access it in your web browser by going to http://localhost:5000.
The pre-trained ESM model used in this app is available on Hugging Face at https://huggingface.co/ritakurban/ESM_protein_localization/tree/main. The app is also hosted at https://ritakurban.pythonanywhere.com/.