neurosnap.algos.wolfpsort.wolfpsort module#
Structured WoLF PSORT localization prediction API.
This submodule provides the public Python interface for the WoLF PSORT-style
localization workflow bundled in neurosnap.algos.wolfpsort. It exposes
helpers for computing the model feature vector and for running the bundled
fungi, animal, and plant localization models with dictionary or DataFrame
outputs.
This implementation was developed as a distinct Python reimplementation for the academic community, while drawing technical reference and attribution from the original WoLF PSORT project by Paul Horton and Kenta Nakai. The referenced project materials consulted during development are available from the public WoLF PSORT source distribution rehosted at:
That distribution includes the historical PSORT / WoLF PSORT command-line code, model assets, and accompanying project notices.
When citation of the underlying software or prediction method is appropriate, the original WoLF PSORT references suggested by the project materials include:
Horton P, Park KJ, Obayashi T, Fujita N, Harada H, Adams-Collier CJ, Nakai K. “WoLF PSORT: protein localization predictor.” Nucleic Acids Research 35 (Web Server issue): W585-W587 (2007). https://doi.org/10.1093/nar/gkm259
Horton P, Park KJ, Obayashi T, Nakai K. “Protein Subcellular Localization Prediction with WoLF PSORT.” Asian Pacific Bioinformatics Conference (APBC/APCB 2006).
- class neurosnap.algos.wolfpsort.wolfpsort.WoLFPSortPredictor(organism_type='fungi')[source]#
Bases:
objectPure Python WoLF PSORT port with structured outputs.
- VALID_ORGANISMS = {'animal', 'fungi', 'plant'}#
- __init__(organism_type='fungi')[source]#
Initialize a WoLF PSORT predictor for one bundled organism model.
- Parameters:
organism_type (
str) – Bundled model to use. Supported values are"fungi","animal", and"plant".- Returns:
None. The predictor is initialized in place.
- compute_features_dataframe(sequences)[source]#
Compute WoLF PSORT features and return them as a DataFrame.
- predict(sequences, include_features=False, include_neighbors=False)[source]#
Predict localization scores for one or more protein sequences.
- Parameters:
- Return type:
- Returns:
List of dictionaries containing the predicted class, ranked class scores, human-readable labels, best
kvalue, and optional feature / neighbor details.
- neurosnap.algos.wolfpsort.wolfpsort.compute_features(sequences)[source]#
Compute WoLF PSORT features using the fungi feature definition.
- neurosnap.algos.wolfpsort.wolfpsort.compute_features_dataframe(sequences)[source]#
Compute WoLF PSORT features and return them in DataFrame form.
- neurosnap.algos.wolfpsort.wolfpsort.predict_localization(sequences, organism_type='fungi', include_features=False, include_neighbors=False, as_dataframe=True)[source]#
Predict WoLF PSORT localization scores for one or more sequences.
- Parameters:
sequences (
Iterator[Tuple[str,str]]) – Iterator yielding(identifier, sequence)tuples.organism_type (
str) – Bundled organism model to use. Supported values are"fungi","animal", and"plant".include_features (
bool) – WhenTrue, include the computed feature dictionary in dictionary output or expand feature columns in DataFrame output.include_neighbors (
bool) – WhenTrue, include the ranked training neighbors in dictionary output. This is not supported in DataFrame mode.as_dataframe (
bool) – WhenTrue, return a DataFrame summary. WhenFalse, return a list of dictionaries.
- Returns:
DataFrame or list of dictionaries, depending on
as_dataframe.