Model-Agnostic Pipeline for Explainable Localization.
pip install map-exploc
git clone https://github.com/cytronicoder/explainable-localization-predictor.git
cd explainable-localization-predictor
pip install -e .
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 .
dev
: Testing, linting, and code quality toolsnotebooks
: Jupyter, plotting, and analysis toolsdocs
: Documentation generation toolstorch
: PyTorch for deep learning modelsesm
: ESM protein language modelsbio
: Bioinformatics tools (BioPython)
mapexploc train --config config/default.yml
mapexploc predict MKTIIALSYIFCLVFADYKDDDDK
mapexploc explain MKTIIALSYIFCLVFADYKDDDDK
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))
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
Build the documentation locally:
mkdocs serve
To build and upload a release to PyPI:
python -m build
python -m twine upload dist/*
This project is licensed under the MIT License. See LICENSE for details.