Skip to content

Commit

Permalink
updated searchresults & msfragger
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Basso committed Jul 28, 2024
1 parent 11e4405 commit 1368743
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions spectrum_io/search_result/msfragger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
import spectrum_fundamentals.constants as c
from pyteomics import pepxml
from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_or_custom_to_internal
from spectrum_fundamentals.mod_string import internal_without_mods, msfragger_to_internal
from spectrum_fundamentals.constants import MSFRAGGER_VAR_MODS
from tqdm import tqdm

Expand Down Expand Up @@ -69,13 +69,13 @@ def update_columns_for_prosit(df, tmt_labeled: str, stat_mods: Optional[Dict[str
unimod_tag = c.TMT_MODS[tmt_labeled]
logger.info("Adding TMT fixed modifications")
mods = {**{"C": "C[UNIMOD:4]", r"n[\d+]": f"{unimod_tag}-", "K": f"K{unimod_tag}"}, **mods}
df["MODIFIED_SEQUENCE"] = msfragger_or_custom_to_internal(
df["MODIFIED_SEQUENCE"] = msfragger_to_internal(
df["modified_peptide"].to_list(), mods=mods)
else:
#By default, i.e. if nothing is supplied to fixed_mods, carbamidomethylation on cystein will be included
# in the fixed modifications. If you want to have no fixed modifictions at all, supply fixed_mods={}
mods = {**{"C": "C[UNIMOD:4]"}, **mods}
df["MODIFIED_SEQUENCE"] = msfragger_or_custom_to_internal(df["modified_peptide"].to_list(), mods=mods)
df["MODIFIED_SEQUENCE"] = msfragger_to_internal(df["modified_peptide"].to_list(), mods=mods)

df.rename(
columns={
Expand Down
1 change: 0 additions & 1 deletion spectrum_io/search_result/search_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from abc import abstractmethod
from pathlib import Path
from typing import Optional, Union, Dict, Tuple
from spectrum_fundamentals.constants import update_custom_mods

import pandas as pd

Expand Down

0 comments on commit 1368743

Please sign in to comment.