Skip to content

Commit

Permalink
Merge pull request #44 from IBM/code-dev
Browse files Browse the repository at this point in the history
🪲 Bug fix: Enable MMseqs alignment again
  • Loading branch information
RaulFD-creator authored Jan 24, 2025
2 parents a34f658 + 868dd3c commit dc09296
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion autopeptideml/autopeptideml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

from sklearn.model_selection import StratifiedKFold
from hestia.partition import ccpart, graph_part
from hestia.similarity import sequence_similarity_peptides, sequence_similarity_needle
from hestia.similarity import (sequence_similarity_peptides,
sequence_similarity_needle,
sequence_similarity_mmseqs)

from .data.algorithms import SYNONYMS, SUPPORTED_MODELS
from .data.metrics import METRICS, METRIC2FUNCTION, THRESHOLDED_METRICS
Expand Down Expand Up @@ -518,6 +520,14 @@ def train_test_partition(
threads=self.threads, verbose=3 if self.verbose else 0,
threshold=threshold,
)
elif 'mmseqs' in alignment:
sim_df = sequence_similarity_mmseqs(
df_query=df, field_name='sequence',
prefilter='+prefilter' in alignment,
denominator=denominator, threads=self.threads,
threshold=threshold,
verbose=3 if self.verbose else 0,
)
train_idx, test_idx, label_ids = ccpart(
df=df,
sim_df=sim_df,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'onnxmltools',
'skl2onnx',
'onnxruntime',
'hestia-ood>=0.0.34'
'hestia-good'
]

test_requirements = requirements
Expand Down

0 comments on commit dc09296

Please sign in to comment.