Skip to content

Commit

Permalink
added a minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
“Karim committed Nov 7, 2023
1 parent 602bbd5 commit a0e4a11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spectrum_io/search_result/sage.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ def read_result(path: Union[str, Path], tmt_labeled: str) -> pd.DataFrame:
# Standardize column names
df.columns = df.columns.str.upper()
df.columns = df.columns.str.replace(" ", "_")
print(df)
df = Sage.update_columns_for_prosit(df)

df = Sage.update_columns_for_prosit(df,tmt_labeled)
return filter_valid_prosit_sequences(df)

@staticmethod
def update_columns_for_prosit(df: pd.DataFrame ) -> pd.DataFrame:
def update_columns_for_prosit(df: pd.DataFrame , tmt_labeled: str ) -> pd.DataFrame:
# renaming input columns
print(df.columns)

df = df.rename(columns={'FILENAME':'RAW_FILE','SCANNR':'SCAN_NUMBER','PEPTIDE':'MODIFIED_SEQUENCE','CHARGE':'PRECURSOR_CHARGE'})
print(df.columns)

# removing .mzML
df['RAW_FILE'] = df['RAW_FILE'].str.replace(".mzML","")
# extracting only the scan number
Expand Down

0 comments on commit a0e4a11

Please sign in to comment.