Skip to content

Commit 496c0b8

Browse files
change rust function names
1 parent 07b96e7 commit 496c0b8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

ms2rescore/feature_generators/ms2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77

88
from typing import List, Optional
99

10-
import numpy as np
1110
from psm_utils import PSMList
12-
from ms2rescore_rs import batch_ms2_features_from_spectra
11+
from ms2rescore_rs import ms2_features_from_ms2spectra
1312
from ms2rescore.feature_generators.base import FeatureGeneratorBase
1413

1514
logger = logging.getLogger(__name__)
@@ -76,7 +75,7 @@ def add_features(self, psm_list: PSMList) -> None:
7675
proformas = [psm.peptidoform.proforma.split("/")[0] for psm in psm_list]
7776
seq_lens = [len(psm.peptidoform.sequence) for psm in psm_list]
7877

79-
feature_dicts = batch_ms2_features_from_spectra(
78+
feature_dicts = ms2_features_from_ms2spectra(
8079
spectra=spectra,
8180
proformas=proformas,
8281
seq_lens=seq_lens,

ms2rescore/feature_generators/ms2pip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from typing import Optional
2828

2929
from ms2pip import process_MS2_spectra
30-
from ms2rescore_rs import batch_ms2pip_features_numpy
30+
from ms2rescore_rs import ms2pip_features_from_prediction_peak_arrays
3131

3232
from psm_utils import PSMList
3333

@@ -198,7 +198,7 @@ def _calculate_features(self, psm_list, ms2pip_results):
198198
obs_b.append(r.observed_intensity["b"])
199199
obs_y.append(r.observed_intensity["y"])
200200

201-
results = batch_ms2pip_features_numpy(idx, pred_b, pred_y, obs_b, obs_y)
201+
results = ms2pip_features_from_prediction_peak_arrays(idx, pred_b, pred_y, obs_b, obs_y)
202202

203203
for psm_index, feats in results:
204204
if feats:

0 commit comments

Comments
 (0)