From 6f4a3025ec4e80250fb4ebd6134456cbfe4de5ad Mon Sep 17 00:00:00 2001 From: WassimG Date: Mon, 23 Sep 2024 16:52:45 +0000 Subject: [PATCH] Add neutral loss flag to annotate function --- .../annotation/annotation.py | 26 +++++++++++++++---- spectrum_fundamentals/fragments.py | 2 +- spectrum_fundamentals/mod_string.py | 2 ++ tests/unit_tests/data/spectrum_output.csv | 8 +++--- .../unit_tests/data/tmt_spectrum_output.json | 3 ++- 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/spectrum_fundamentals/annotation/annotation.py b/spectrum_fundamentals/annotation/annotation.py index d71c091..27a65da 100644 --- a/spectrum_fundamentals/annotation/annotation.py +++ b/spectrum_fundamentals/annotation/annotation.py @@ -129,6 +129,7 @@ def annotate_spectra( unit_mass_tolerance: Optional[str] = None, custom_mods: Optional[Dict[str, float]] = None, fragmentation_method: str = "HCD", + annotate_neutral_losses: Optional[bool] = False ) -> pd.DataFrame: """ Annotate a set of spectra. @@ -149,6 +150,7 @@ def annotate_spectra( :param unit_mass_tolerance: unit for the mass tolerance (da or ppm) :param fragmentation_method: fragmentation method that was used :param custom_mods: mapping of custom UNIMOD string identifiers ('[UNIMOD:xyz]') to their mass + :param annotate_neutral_losses: flag to indicate whether to annotate neutral losses or not :return: a Pandas DataFrame containing the annotated spectra with meta data """ raw_file_annotations = [] @@ -161,6 +163,7 @@ def annotate_spectra( unit_mass_tolerance, fragmentation_method=fragmentation_method, custom_mods=custom_mods, + annotate_neutral_losses=annotate_neutral_losses ) if not results: continue @@ -168,7 +171,14 @@ def annotate_spectra( results_df = pd.DataFrame(raw_file_annotations) if "CROSSLINKER_TYPE" not in index_columns: - results_df.columns = ["INTENSITIES", "MZ", "CALCULATED_MASS", "removed_peaks", "count_nl_peaks"] + results_df.columns = [ + "INTENSITIES", + "MZ", + "CALCULATED_MASS", + "removed_peaks", + "ANNOTATED_NL_COUNT", + "EXPECTED_NL_COUNT", + ] else: results_df.columns = [ "INTENSITIES_A", @@ -353,9 +363,10 @@ def parallel_annotate( unit_mass_tolerance: Optional[str] = None, custom_mods: Optional[Dict[str, float]] = None, fragmentation_method: str = "HCD", + annotate_neutral_losses: Optional[bool] = False ) -> Optional[ Union[ - Tuple[np.ndarray, np.ndarray, float, int, int], + Tuple[np.ndarray, np.ndarray, float, int, int, int], Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, float, float, int, int], ] ]: @@ -375,6 +386,7 @@ def parallel_annotate( :param unit_mass_tolerance: unit for the mass tolerance (da or ppm) :param custom_mods: mapping of custom UNIMOD string identifiers ('[UNIMOD:xyz]') to their mass :param fragmentation_method: fragmentation method that was used + :param annotate_neutral_losses: flag to indicate whether to annotate neutral losses or not :return: a tuple containing intensity values (np.ndarray), masses (np.ndarray), calculated mass (float), and any removed peaks (List[str]) """ @@ -389,6 +401,7 @@ def parallel_annotate( unit_mass_tolerance, fragmentation_method=fragmentation_method, custom_mods=custom_mods, + add_neutral_losses= annotate_neutral_losses ) if (spectrum[index_columns["PEPTIDE_LENGTH_A"]] > 30) or (spectrum[index_columns["PEPTIDE_LENGTH_B"]] > 30): @@ -405,6 +418,7 @@ def _annotate_linear_spectrum( unit_mass_tolerance: Optional[str], custom_mods: Optional[Dict[str, float]] = None, fragmentation_method: str = "HCD", + add_neutral_losses: Optional[bool] = False ): """ Annotate a linear peptide spectrum. @@ -415,13 +429,14 @@ def _annotate_linear_spectrum( :param unit_mass_tolerance: Unit for the mass tolerance (da or ppm) :param custom_mods: mapping of custom UNIMOD string identifiers ('[UNIMOD:xyz]') to their mass :param fragmentation_method: fragmentation method that was used + :param add_neutral_losses: flag to indicate whether to annotate neutral losses or not :return: Annotated spectrum """ mod_seq_column = "MODIFIED_SEQUENCE" if "MODIFIED_SEQUENCE_MSA" in index_columns: mod_seq_column = "MODIFIED_SEQUENCE_MSA" - fragments_meta_data, tmt_n_term, unmod_sequence, calc_mass, _ = initialize_peaks( + fragments_meta_data, tmt_n_term, unmod_sequence, calc_mass, expected_nl = initialize_peaks( sequence=spectrum[index_columns[mod_seq_column]], mass_analyzer=spectrum[index_columns["MASS_ANALYZER"]], charge=spectrum[index_columns["PRECURSOR_CHARGE"]], @@ -429,6 +444,7 @@ def _annotate_linear_spectrum( unit_mass_tolerance=unit_mass_tolerance, fragmentation_method=fragmentation_method, custom_mods=custom_mods, + add_neutral_losses= add_neutral_losses ) matched_peaks, count_annotated_nl = match_peaks( fragments_meta_data, @@ -446,13 +462,13 @@ def _annotate_linear_spectrum( if len(matched_peaks) == 0: intensity = np.full(vec_length, 0.0) mass = np.full(vec_length, 0.0) - return intensity, mass, calc_mass, 0, 0 + return intensity, mass, calc_mass, 0, 0, 0 matched_peaks, removed_peaks = handle_multiple_matches(matched_peaks) intensities, mass = generate_annotation_matrix( matched_peaks, unmod_sequence, spectrum[index_columns["PRECURSOR_CHARGE"]], fragmentation_method ) - return intensities, mass, calc_mass, removed_peaks, count_annotated_nl + return intensities, mass, calc_mass, removed_peaks, count_annotated_nl, expected_nl def _annotate_crosslinked_spectrum( diff --git a/spectrum_fundamentals/fragments.py b/spectrum_fundamentals/fragments.py index 85c3cff..6af620f 100644 --- a/spectrum_fundamentals/fragments.py +++ b/spectrum_fundamentals/fragments.py @@ -213,7 +213,7 @@ def _calculate_nl_score_mass(neutral_loss): return score, mass -def initialize_peaks( +def initialize_peaks( # noqa: C901 sequence: str, mass_analyzer: str, charge: int, diff --git a/spectrum_fundamentals/mod_string.py b/spectrum_fundamentals/mod_string.py index 0e68f1a..cb282ea 100644 --- a/spectrum_fundamentals/mod_string.py +++ b/spectrum_fundamentals/mod_string.py @@ -364,6 +364,7 @@ def add_permutations( whether the modification mass was mistakenly picked as the monoisotopic peak. Mainly used for Citrullination. :return: list of possible sequence permutations """ + modified_sequence = modified_sequence.replace('UNIMOD','unimod') sequence = modified_sequence.replace("[unimod:" + str(unimod_id) + "]", "") modifications = len(re.findall("unimod:" + str(unimod_id), modified_sequence)) if modifications == 0: @@ -385,6 +386,7 @@ def add_permutations( modified_sequence = ( modified_sequence[: index + 1] + "[unimod:" + str(unimod_id) + "]" + modified_sequence[index + 1 :] ) + modified_sequence = modified_sequence.replace('unimod','UNIMOD') modified_sequences_comb.append(modified_sequence) return modified_sequences_comb diff --git a/tests/unit_tests/data/spectrum_output.csv b/tests/unit_tests/data/spectrum_output.csv index 07f1dfb..e263c56 100644 --- a/tests/unit_tests/data/spectrum_output.csv +++ b/tests/unit_tests/data/spectrum_output.csv @@ -1,4 +1,4 @@ -,INTENSITIES,MZ,CALCULATED_MASS,removed_peaks,count_nl_peaks -0,"[0.83793371,0.,0.29878655,0.,0.,0.,0.,0.,0.09085768,0.,0.,1.,0.,0.34441502,0.,0.,0.,0.,0.,0.25216961,0.04101572,0.,0.25216961,0.,0.54783487,0.,0.,0.54783487,0.,0.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.]","[132.44059902,0.,44.83719672,0.,0.,0.,0.,0.,68.5568945,0.,0.,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.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]",280.0915347,0,0 +,INTENSITIES,MZ,CALCULATED_MASS,removed_peaks,ANNOTATED_NL_COUNT,EXPECTED_NL_COUNT +0,"[0.83793371,0.,0.29878655,0.,0.,0.,0.,0.,0.09085768,0.,0.,1.,0.,0.34441502,0.,0.,0.,0.,0.,0.25216961,0.04101572,0.,0.25216961,0.,0.54783487,0.,0.,0.54783487,0.,0.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.,-1.]","[132.44059902,0.,44.83719672,0.,0.,0.,0.,0.,68.5568945,0.,0.,68.43836233,0.,182.38682974,0.,0.,0.,0.,0.,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,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]",280.0915347,0,0,0 diff --git a/tests/unit_tests/data/tmt_spectrum_output.json b/tests/unit_tests/data/tmt_spectrum_output.json index 67798bd..7d99d64 100644 --- a/tests/unit_tests/data/tmt_spectrum_output.json +++ b/tests/unit_tests/data/tmt_spectrum_output.json @@ -240,5 +240,6 @@ "4": 1445.80325967 }, "removed_peaks": { "0": 0, "1": 0, "2": 1, "3": 0, "4": 0 }, - "count_nl_peaks": { "0": 0, "1": 0, "2": 0, "3": 0, "4": 0 } + "ANNOTATED_NL_COUNT": { "0": 0, "1": 0, "2": 0, "3": 0, "4": 0 }, + "EXPECTED_NL_COUNT": { "0": 0, "1": 0, "2": 0, "3": 0, "4": 0 } }