diff --git a/oktoberfest/predict/alignment.py b/oktoberfest/predict/alignment.py index e16f160..729c934 100644 --- a/oktoberfest/predict/alignment.py +++ b/oktoberfest/predict/alignment.py @@ -33,7 +33,7 @@ def _prepare_alignment_df( groups = ["RAW_FILE"] hcd_targets = library.obs.query("(FRAGMENTATION == 'HCD') & ~REVERSE)") - hcd_targets = hcd_targets[hcd_targets["MODIFIED_SEQUENCE"].str.match(r"^(?:[^U]*(?:\[UNIMOD:737\])?[^U]*)$")] + hcd_targets = hcd_targets[hcd_targets["MODIFIED_SEQUENCE"].str.match(r"^(?!.*UNIMOD(?!:737)).*$")] hcd_targets = hcd_targets.sort_values(by="SCORE", ascending=False).groupby(groups) if len(hcd_targets)<2000: