Skip to content

Commit

Permalink
Merge branch 'config-update-feature' of https://github.com/MannLabs/a…
Browse files Browse the repository at this point in the history
…lphadia into config-update-feature
  • Loading branch information
mo-sameh committed Jan 27, 2024
2 parents 081515f + 88faa2b commit 8b406c6
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 104 deletions.
5 changes: 3 additions & 2 deletions alphadia/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,11 @@ def fragment_features(
is_y = fragments.type == 121

if np.sum(is_b) > 0 and np.sum(is_y) > 0:

min_y = fragments.position[is_y].min()
max_b = fragments.position[is_b].max()
overlapping = (is_y & (fragments.position < max_b)) | (is_b & (fragments.position > min_y))
overlapping = (is_y & (fragments.position < max_b)) | (
is_b & (fragments.position > min_y)
)

# n_overlapping
feature_array[43] = overlapping.sum()
Expand Down
3 changes: 1 addition & 2 deletions alphadia/plexscoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,9 +1678,8 @@ def collect_candidates(
"mean_ms2_mass_error",
"n_overlapping",
"mean_overlapping_intensity",
"mean_overlapping_mass_error"
"mean_overlapping_mass_error",
]


precursor_idx, rank, features = psm_proto_df.to_precursor_df()

Expand Down
Loading

0 comments on commit 8b406c6

Please sign in to comment.