From c7e3cd6c13a1998e07fee432446961121c2d67b8 Mon Sep 17 00:00:00 2001 From: victorgiurcoiu Date: Mon, 29 Apr 2024 14:04:48 +0000 Subject: [PATCH] Added PROTEINS column for maxquant --- spectrum_io/search_result/maxquant.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spectrum_io/search_result/maxquant.py b/spectrum_io/search_result/maxquant.py index 161c9da..e68d830 100644 --- a/spectrum_io/search_result/maxquant.py +++ b/spectrum_io/search_result/maxquant.py @@ -62,6 +62,7 @@ def read_result(self, tmt_labeled: str) -> pd.DataFrame: "MASS", # = Calculated Precursor mass; TODO get column with experimental Precursor mass instead "SCORE", "REVERSE", + "PROTEINS", ], sep="\t", ) @@ -117,6 +118,7 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram df["MODIFIED_SEQUENCE"] = maxquant_to_internal(df["MODIFIED_SEQUENCE"].to_numpy()) df["SEQUENCE"] = internal_without_mods(df["MODIFIED_SEQUENCE"]) df["PEPTIDE_LENGTH"] = df["SEQUENCE"].apply(lambda x: len(x)) + df["PROTEINS"].fillna("UNKNOWN", inplace=True) return df