Skip to content

🤖 Predicting protein subcellular localization with SHAP-driven motif insights (2025 ISCB YBS Student Challenge winner)

License

Notifications You must be signed in to change notification settings

cytronicoder/mapexploc

Repository files navigation

MAP-ExPLoc

Model-Agnostic Pipeline for Explainable Localization.

Installation

Basic Installation

pip install map-exploc

From Source

git clone https://github.com/cytronicoder/explainable-localization-predictor.git
cd explainable-localization-predictor
pip install -e .

Development Environment

For development with all dependencies:

pip install -e .[dev,notebooks,docs]

Or using conda/mamba:

conda env create -f environment.yml
conda activate eslp
pip install -e .

Optional Dependencies

  • dev: Testing, linting, and code quality tools
  • notebooks: Jupyter, plotting, and analysis tools
  • docs: Documentation generation tools
  • torch: PyTorch for deep learning models
  • esm: ESM protein language models
  • bio: Bioinformatics tools (BioPython)

Usage

CLI

mapexploc train --config config/default.yml
mapexploc predict MKTIIALSYIFCLVFADYKDDDDK
mapexploc explain MKTIIALSYIFCLVFADYKDDDDK

Python

from pathlib import Path
from mapexploc.config import load_config
from mapexploc.data import load_example_dataset
from mapexploc.features import build_feature_matrix
from mapexploc.models.rf import train_random_forest, predict

cfg = load_config(Path("config/default.yml"))
df = load_example_dataset(Path("examples/data/example_sequences.csv"))
X = build_feature_matrix(df["sequence"])
model = train_random_forest(X, df["label"].to_numpy(), cfg.model)
print(predict(model, X))

Development

Install additional dependencies and pre-commit hooks:

pip install -e .[torch,esm]
pre-commit install

Run tests and type checking:

pre-commit run --files $(git ls-files '*.py')
pytest

Documentation

Build the documentation locally:

mkdocs serve

Publishing

To build and upload a release to PyPI:

python -m build
python -m twine upload dist/*

License

This project is licensed under the MIT License. See LICENSE for details.

About

🤖 Predicting protein subcellular localization with SHAP-driven motif insights (2025 ISCB YBS Student Challenge winner)

Resources

License

Stars

Watchers

Forks