diff --git a/alpharaw/viz/df_utils.py b/alpharaw/viz/df_utils.py index 8c1ff91..7740c13 100644 --- a/alpharaw/viz/df_utils.py +++ b/alpharaw/viz/df_utils.py @@ -14,102 +14,202 @@ from alpharaw.match.match_utils import match_closest_peaks, match_highest_peaks -def make_psm_plot_df_for_peptide( - spec_masses: np.ndarray, - spec_intensities: np.ndarray, +def make_query_df_for_peptide( sequence: str, mods: str, mod_sites: str, charge: int, rt_sec: float = 0.0, mobility: float = 0.0, - ppm: float = 20.0, + ms_level: int = 2, charged_frag_types: list = ["b_z1", "b_z2", "y_z1", "y_z2"], include_fragments: bool = True, fragment_intensity_df: pd.DataFrame = None, include_precursor_isotopes: bool = False, max_isotope: int = 6, min_frag_mz: float = 100.0, - match_mode: typing.Literal["closest", "highest"] = "closest", + min_frag_intensity: float = 0.001, ) -> pd.DataFrame: - plot_df = make_query_df_for_peptide( + """ + Create a query dataframe for a peptide that can be + use to generate MS2 or XIC plots. + + Parameters + ---------- + sequence : str + Peptide sequence. + mods : str + Modification names in alphabase format. + mod_sites : str + Modification sites in alphabase format. + charge : int + Charge state of the peptide. + rt_sec : float, optional + Retention time in seconds of the peptide, by default 0.0 + mobility : float, optional + Ion mobility of the peptide, by default 0.0 + ms_level : int, optional + MS level. If it is 1, `include_fragments` is always False. By default 2 + charged_frag_types : list, optional + Charge states of fragments, by default ["b_z1", "b_z2", "y_z1", "y_z2"] + include_fragments : bool, optional + If include fragments in plot_df, by default True + fragment_intensity_df : pd.DataFrame, optional + Fragment intensity dataframe of the peptide for mirror plot, by default None + include_precursor_isotopes : bool, optional + If plot_df include precursor isotopes, by default False + max_isotope : int, optional + Maximal number of precursor isotopes, by default 6 + min_frag_mz : float, optional + Minimal m/z value of fragments, by default 100.0 + min_frag_intensity : float, optional + Minimal intensity of fragments to plot, by default 0.001 + + Returns + ------- + pd.DataFrame + Query dataframe for plotting with possible columns: + 'mz', 'type', 'loss_type', 'charge', 'number', 'fragment_site', + 'ion_name', 'sequence', 'mods', 'mod_sites', 'precursor_charge', + 'modified_sequence', 'rt_sec', 'precursor_mz', 'precursor_i_0', + 'precursor_i_1', 'precursor_i_2', 'precursor_i_3', 'precursor_i_4', + 'precursor_i_5', 'precursor_mono_idx' + """ + if ms_level == 1: + include_fragments = False + precursor_df, fragment_mz_df = make_precursor_fragment_df( sequence, mods, mod_sites, charge, - rt_sec=rt_sec, - mobility=mobility, - charged_frag_types=charged_frag_types, include_fragments=include_fragments, - fragment_intensity_df=fragment_intensity_df, + charged_frag_types=charged_frag_types, include_precursor_isotopes=include_precursor_isotopes, max_isotope=max_isotope, - min_frag_mz=min_frag_mz, ) + if fragment_intensity_df is not None: + columns = np.intersect1d( + fragment_mz_df.columns.values, + fragment_intensity_df.columns.values, + ) + fragment_mz_df = fragment_mz_df[columns] + fragment_intensity_df = fragment_intensity_df[columns] - return make_psm_plot_df( - spec_masses=spec_masses, - spec_intensities=spec_intensities, - query_masses=plot_df.mz.values, - query_ion_names=plot_df.ion_name.values, - query_mass_tols=plot_df.mz.values * ppm * 1e-6, - query_frag_idxes=plot_df.fragment_site.values, - modified_sequence=plot_df.modified_sequence.values[0], - mod_sites=mod_sites, - query_intensities=plot_df.intensity.values - if "intensity" in plot_df.columns - else None, - match_mode=match_mode, + return translate_frag_df_to_plot_df( + precursor_df, + fragment_mz_df, + fragment_intensity_df=fragment_intensity_df, + rt_sec=rt_sec, + mobility=mobility, + ms_level=ms_level, + min_frag_mz=min_frag_mz, + min_frag_intensity=min_frag_intensity, ) -def make_query_df_for_peptide( +def make_psm_plot_df_for_peptide( + spec_masses: np.ndarray, + spec_intensities: np.ndarray, sequence: str, mods: str, mod_sites: str, charge: int, rt_sec: float = 0.0, mobility: float = 0.0, - ms_level: int = 2, + ppm: float = 20.0, charged_frag_types: list = ["b_z1", "b_z2", "y_z1", "y_z2"], include_fragments: bool = True, fragment_intensity_df: pd.DataFrame = None, include_precursor_isotopes: bool = False, max_isotope: int = 6, min_frag_mz: float = 100.0, + min_frag_intensity: float = 0.001, + match_mode: typing.Literal["closest", "highest"] = "closest", ) -> pd.DataFrame: - if ms_level == 1: - include_fragments = False - precursor_df, fragment_mz_df = make_precursor_fragment_df( + """ + Create a plot dataframe for a MS2 spectrum and a peptide. + + Parameters + ---------- + spec_masses : np.ndarray + Peak m/z values of a spectrum. + spec_intensities : np.ndarray + Peak intensities of a spectrum. + sequence : str + Peptide sequence. + mods : str + Modification names in alphabase format. + mod_sites : str + Modification sites in alphabase format. + charge : int + Charge state of the peptide. + rt_sec : float, optional + Retention time in seconds of the peptide, by default 0.0 + mobility : float, optional + Ion mobility of the peptide, by default 0.0 + ppm : float, optional + Matching mass tolerance in ppm, by default 20.0 + charged_frag_types : list, optional + Charge states of fragments, by default ["b_z1", "b_z2", "y_z1", "y_z2"] + include_fragments : bool, optional + If include fragments in plot_df, by default True + fragment_intensity_df : pd.DataFrame, optional + Fragment intensity dataframe of the peptide for mirror plot, by default None + include_precursor_isotopes : bool, optional + If plot_df include precursor isotopes, by default False + max_isotope : int, optional + Maximal number of precursor isotopes, by default 6 + min_frag_mz : float, optional + Minimal m/z value of fragments, by default 100.0 + min_frag_intensity : float, optional + Minimal intensity of fragments to plot, by default 0.001 + match_mode : "closest", "highest", optional + If extract the closest peak or highest peak within + the given matching tolerance, by default "closest" + + Returns + ------- + pd.DataFrame + Plot dataframe with possible columns: + "modified_sequence", "mz", "intensity", "fragment_site", + "ppm_err", "mass_err", "ion_name", "mod_sites", + "precursor_mz", "precursor_i_0", + "precursor_i_1", "precursor_i_2", "precursor_i_3", "precursor_i_4", + "precursor_i_5", "precursor_mono_idx", "color" + """ + plot_df = make_query_df_for_peptide( sequence, mods, mod_sites, charge, - include_fragments=include_fragments, + rt_sec=rt_sec, + mobility=mobility, charged_frag_types=charged_frag_types, + include_fragments=include_fragments, + fragment_intensity_df=fragment_intensity_df, include_precursor_isotopes=include_precursor_isotopes, max_isotope=max_isotope, + min_frag_mz=min_frag_mz, + min_frag_intensity=min_frag_intensity, ) - if fragment_intensity_df is not None: - columns = np.intersect1d( - fragment_mz_df.columns.values, - fragment_intensity_df.columns.values, - ) - fragment_mz_df = fragment_mz_df[columns] - fragment_intensity_df = fragment_intensity_df[columns] - return translate_frag_df_to_plot_df( - precursor_df, - fragment_mz_df, - fragment_intensity_df=fragment_intensity_df, - rt_sec=rt_sec, - mobility=mobility, - ms_level=ms_level, - min_frag_mz=min_frag_mz, + return make_psm_plot_df( + spec_masses=spec_masses, + spec_intensities=spec_intensities, + query_masses=plot_df.mz.values, + query_ion_names=plot_df.ion_name.values, + query_mass_tols=plot_df.mz.values * ppm * 1e-6, + query_frag_idxes=plot_df.fragment_site.values, + modified_sequence=plot_df.modified_sequence.values[0], + mod_sites=mod_sites, + query_intensities=plot_df.intensity.values + if "intensity" in plot_df.columns + else None, + match_mode=match_mode, ) -def make_psm_plot_for_frag_dfs( +def make_psm_plot_df_for_frag_dfs( spec_masses: np.ndarray, spec_intensities: np.ndarray, precursor_df: pd.DataFrame, @@ -119,7 +219,41 @@ def make_psm_plot_for_frag_dfs( min_frag_mz: float = 100.0, min_frag_intensity: float = 0.001, match_mode: typing.Literal["closest", "highest"] = "closest", -): +) -> pd.DataFrame: + """ + Similar to :func:`make_psm_plot_df_for_peptide`, but this function + does not start from a peptide, but from its fragment_mz_df. + + Parameters + ---------- + spec_masses : np.ndarray + Peak m/z values of a spectrum. + spec_intensities : np.ndarray + Peak intensities of a spectrum. + precursor_df : pd.DataFrame + This must be alphabase precursor_df with only one precursor. + fragment_mz_df : pd.DataFrame + The alphabase fragment_mz_df of the `precursor_df`. + fragment_intensity_df : pd.DataFrame, optional + Fragment intensity dataframe of precursor for mirror plot, by default None + ppm : float, optional + Matching mass tolerance in ppm, by default 20.0 + min_frag_mz : float, optional + Minimal m/z value of fragments, by default 100.0 + min_frag_intensity : float, optional + Minimal intensity of fragments to plot, by default 0.001 + match_mode : "closest", "highest", optional + If extract the closest peak or highest peak within + the given matching tolerance, by default "closest" + + Returns + ------- + DataFrame + Plot dataframe with possible columns: + "modified_sequence", "mz", "intensity", "fragment_site", + "ppm_err", "mass_err", "ion_name", "mod_sites", + "precursor_mz", "color" + """ plot_df = translate_frag_df_to_plot_df( precursor_df, fragment_mz_df, @@ -128,6 +262,11 @@ def make_psm_plot_for_frag_dfs( min_frag_intensity=min_frag_intensity, ) + if "intensity" in plot_df.columns: + query_intensities = plot_df.intensity.values + else: + query_intensities = None + return make_psm_plot_df( spec_masses=spec_masses, spec_intensities=spec_intensities, @@ -137,9 +276,7 @@ def make_psm_plot_for_frag_dfs( query_frag_idxes=plot_df.fragment_site.values, modified_sequence=plot_df.modified_sequence.values[0], mod_sites=precursor_df.mod_sites.values[0], - query_intensities=plot_df.intensity.values - if "intensity" in plot_df.columns - else None, + query_intensities=query_intensities, match_mode=match_mode, ) @@ -152,6 +289,30 @@ def make_query_df( query_im: float = 0.0, query_intensities: np.ndarray = None, ) -> pd.DataFrame: + """ + Create a query dataframe based on query_masses and query_ion_names + to generate MS2 or XIC plots. + + Parameters + ---------- + query_masses : np.ndarray + Query or fragment m/z values. + query_ion_names : typing.List[str] + Query or fragment ion names. + query_rt_sec : float + RT in seconds. + precursor_mz : float + Precursor m/z value. + query_im : float, optional + Ion mobility, by default 0.0 + query_intensities : np.ndarray, optional + Query intensities for mirror plot, by default None + + Returns + ------- + pd.DataFrame + "mz", "intensity", "fragment_site", "ion_name", "precursor_mz" + """ df = pd.DataFrame( dict( mz=query_masses, @@ -179,6 +340,43 @@ def make_psm_plot_df( query_intensities: np.ndarray = None, match_mode: typing.Literal["closest", "highest"] = "closest", ) -> pd.DataFrame: + """ + Create a plot dataframe for a MS2 spectrum and query m/z values. + + Parameters + ---------- + spec_masses : np.ndarray + Peak m/z values of a spectrum. + spec_intensities : np.ndarray + Peak intensities of a spectrum. + query_masses : np.ndarray + Query or fragment m/z values. + query_ion_names : typing.List[str] + Query or fragment ion names. + query_mass_tols : np.ndarray + Matching mass tolerance of `query_masses`. + query_frag_idxes : np.ndarray + Fragment indices or positions of `query_masses`. + modified_sequence : str, optional + Modified sequence, such as "AM[+16]DEFGK_(2+)", by default "" + mod_sites : str, optional + Modification sites in alphabase format, by default "" + query_intensities : np.ndarray, optional + Query intensities for mirror plot, by default None + match_mode : "closest", "highest", optional + If extract the closest peak or highest peak within + the given matching tolerance, by default "closest" + + Returns + ------- + pd.DataFrame + Plot dataframe with possible columns: + "modified_sequence", "mz", "intensity", "fragment_site", + "ppm_err", "mass_err", "ion_name", "mod_sites", + "precursor_mz", "precursor_i_0", + "precursor_i_1", "precursor_i_2", "precursor_i_3", "precursor_i_4", + "precursor_i_5", "precursor_mono_idx", "color" + """ query_ion_names = np.array(query_ion_names, dtype="U") if match_mode == "highest": query_matched_idxes = match_highest_peaks( @@ -261,7 +459,28 @@ def PCC_sim(x, y): return df -def get_modified_sequence(sequence: str, mods: str, mod_sites: str, charge: int = 0): +def get_modified_sequence( + sequence: str, mods: str, mod_sites: str, charge: int = 0 +) -> str: + """ + Parse sequence, mods, mod_sites into a single modified sequence string. + + Parameters + ---------- + sequence : str + Peptide sequence. + mods : str + Modifications in alphabase format. + mod_sites : str + Modification sites in alphabase format. + charge : int, optional + Precursor charge, by default 0 + + Returns + ------- + str + Modified sequence. + """ sequence = "_" + sequence + "_" mod_masses = np.zeros(len(sequence)) if mods: @@ -288,6 +507,38 @@ def translate_frag_df_to_plot_df( min_frag_mz: float = 100.0, min_frag_intensity: float = 0.001, ) -> pd.DataFrame: + """ + Translate `precursor_df`, `fragment_mz_df` (and `fragment_intensity_df`) + into a single plot df. + + Parameters + ---------- + precursor_df : pd.DataFrame + Precursor df with a single precursor. + fragment_mz_df : pd.DataFrame + fragment_mz_df for the precursor. + fragment_intensity_df : pd.DataFrame, optional + fragment_intensity_df for the precursor, by default None + rt_sec : float, optional + RT in seconds, by default 0.0 + mobility : float, optional + Ion mobility, by default 0.0 + ms_level : int, optional + MS level. If 2, precursor_mz will be included otherwise it is useless. + By default 2 + min_frag_mz : float, optional + Minimal m/z value of fragments, by default 100.0 + min_frag_intensity : float, optional + Minimal intensity of fragments to plot, by default 0.001 + + Returns + ------- + pd.DataFrame + Query dataframe for plotting with possible columns: + 'mz', 'type', 'loss_type', 'charge', 'number', 'fragment_site', + 'ion_name', 'sequence', 'mods', 'mod_sites', 'precursor_charge', + 'modified_sequence', 'rt_sec', 'precursor_mz' + """ fragment_mz_df = fragment_mz_df.mask(fragment_mz_df < min_frag_mz, 0) if fragment_intensity_df is None: fragment_intensity_df = pd.DataFrame() @@ -379,7 +630,35 @@ def make_precursor_fragment_df( charged_frag_types: list = ["b_z1", "b_z2", "y_z1", "y_z2"], include_precursor_isotopes: bool = False, max_isotope: int = 6, -): +) -> typing.Tuple[pd.DataFrame, pd.DataFrame]: + """ + Create precursor_df and fragment_mz_df for a peptide. + + Parameters + ---------- + sequence : str + Peptide sequence + mods : str + Modifications in alphabase format + mod_sites : str + Modification sites in alphabase format + charge : int + Precursor charge state + include_fragments : bool, optional + If calculate fragments (fragment_mz_df), by default True + charged_frag_types : list, optional + Fragment charge states, by default ["b_z1", "b_z2", "y_z1", "y_z2"] + include_precursor_isotopes : bool, optional + If calculate precursor isotopes, by default False + max_isotope : int, optional + Maximal number of isotopes, by default 6 + + Returns + ------- + Tuple + pd.DataFrame: precursor dataframe. + pd.DataFrame: fragment dataframe. Empty dataframe if include_fragments==False + """ precursor_df = pd.DataFrame( dict(sequence=[sequence], mods=[mods], mod_sites=[mod_sites], charge=charge) ) diff --git a/nbs/test_viz.ipynb b/nbs/test_viz.ipynb index 123adbd..f9a680a 100644 --- a/nbs/test_viz.ipynb +++ b/nbs/test_viz.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -38,405 +38,9 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - " | raw_name | \n", - "sequence | \n", - "charge | \n", - "rt | \n", - "rt_start | \n", - "rt_stop | \n", - "mobility | \n", - "proteins | \n", - "uniprot_ids | \n", - "genes | \n", - "scan_num | \n", - "score | \n", - "fdr | \n", - "diann_spec_idx | \n", - "mods | \n", - "mod_sites | \n", - "nAA | \n", - "rt_norm | \n", - "precursor_mz | \n", - "ccs | \n", - "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "HLQLAIR | \n", - "2 | \n", - "54.5422 | \n", - "54.4385 | \n", - "54.7489 | \n", - "0 | \n", - "H2AX_HUMAN | \n", - "Q71UI9;Q9BTM1;P0C0S5;P16104;Q96KK5;Q96QV6;Q998... | \n", - "H2AX | \n", - "75269 | \n", - "0.991963 | \n", - "5.351050e-04 | \n", - "75268 | \n", - "\n", - " | \n", - " | 7 | \n", - "0.671811 | \n", - "425.766512 | \n", - "0.0 | \n", - "
1 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "KLEDGPK | \n", - "2 | \n", - "27.6224 | \n", - "27.5188 | \n", - "27.7608 | \n", - "0 | \n", - "EF1A1_HUMAN;EF1A3_HUMAN | \n", - "P68104;Q5VTE0 | \n", - "EEF1A1;EEF1A1P5 | \n", - "37875 | \n", - "0.993793 | \n", - "4.318230e-04 | \n", - "37874 | \n", - "\n", - " | \n", - " | 7 | \n", - "0.340233 | \n", - "393.721436 | \n", - "0.0 | \n", - "
2 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "MVQEAEK | \n", - "2 | \n", - "29.9747 | \n", - "29.8710 | \n", - "30.0784 | \n", - "0 | \n", - "HSP7C_HUMAN | \n", - "P0DMV9;P11142;P0DMV8 | \n", - "HSPA8 | \n", - "41141 | \n", - "0.982627 | \n", - "9.529970e-04 | \n", - "41140 | \n", - "\n", - " | \n", - " | 7 | \n", - "0.369207 | \n", - "417.704929 | \n", - "0.0 | \n", - "
3 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "AAAEQLR | \n", - "2 | \n", - "33.7771 | \n", - "33.6734 | \n", - "33.8809 | \n", - "0 | \n", - "B3GA3_HUMAN | \n", - "O94766 | \n", - "B3GAT3 | \n", - "46418 | \n", - "0.936862 | \n", - "2.747850e-03 | \n", - "46417 | \n", - "\n", - " | \n", - " | 7 | \n", - "0.416042 | \n", - "379.711402 | \n", - "0.0 | \n", - "
4 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "LPLQDVYK | \n", - "2 | \n", - "64.5849 | \n", - "64.4818 | \n", - "64.7575 | \n", - "0 | \n", - "EF1A2_HUMAN | \n", - "P68104;Q5VTE0;Q05639 | \n", - "EEF1A2 | \n", - "89242 | \n", - "0.989373 | \n", - "6.590750e-04 | \n", - "89241 | \n", - "\n", - " | \n", - " | 8 | \n", - "0.795510 | \n", - "488.279118 | \n", - "0.0 | \n", - "
... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "
80 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "AAAAAAAAAAAAAAAGAGAGAK | \n", - "3 | \n", - "66.8599 | \n", - "66.7564 | \n", - "66.9970 | \n", - "0 | \n", - "S12A2_HUMAN | \n", - "P55011 | \n", - "SLC12A2 | \n", - "92414 | \n", - "0.999983 | \n", - "2.060000e-05 | \n", - "92413 | \n", - "\n", - " | \n", - " | 22 | \n", - "0.823532 | \n", - "532.953265 | \n", - "0.0 | \n", - "
81 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "AAAAVGAGHGAGGPGAASSSGGAR | \n", - "3 | \n", - "35.1365 | \n", - "35.0327 | \n", - "35.2402 | \n", - "0 | \n", - "S35E1_HUMAN | \n", - "Q96K37 | \n", - "SLC35E1 | \n", - "48308 | \n", - "0.958022 | \n", - "1.908840e-03 | \n", - "48307 | \n", - "\n", - " | \n", - " | 24 | \n", - "0.432786 | \n", - "622.305138 | \n", - "0.0 | \n", - "
82 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "AAAASAAEAGIATTGTEDSDDALLK | \n", - "3 | \n", - "67.1117 | \n", - "67.0084 | \n", - "67.2152 | \n", - "0 | \n", - "PSMD4_HUMAN | \n", - "P55036 | \n", - "PSMD4 | \n", - "92768 | \n", - "0.999071 | \n", - "1.766390e-04 | \n", - "92767 | \n", - "\n", - " | \n", - " | 25 | \n", - "0.826633 | \n", - "774.043203 | \n", - "0.0 | \n", - "
83 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "AAAAATVVPPMVGGPPFVGPVGFGPGDR | \n", - "3 | \n", - "78.5982 | \n", - "78.4598 | \n", - "78.7020 | \n", - "0 | \n", - "RBM42_HUMAN | \n", - "Q9BTD8 | \n", - "RBM42 | \n", - "108759 | \n", - "1.000000 | \n", - "1.000000e-09 | \n", - "108758 | \n", - "\n", - " | \n", - " | 28 | \n", - "0.968116 | \n", - "864.452814 | \n", - "0.0 | \n", - "
84 | \n", - "20190914_HFX4_SeHu_HeLa-400ng_DIA-GradientTest... | \n", - "AAAAAAAAAPAAAATAPTTAATTAATAAQ | \n", - "3 | \n", - "66.5616 | \n", - "66.4583 | \n", - "66.6650 | \n", - "0 | \n", - "SRP14_HUMAN | \n", - "P37108 | \n", - "SRP14 | \n", - "92001 | \n", - "0.999984 | \n", - "2.060000e-05 | \n", - "92000 | \n", - "\n", - " | \n", - " | 29 | \n", - "0.819857 | \n", - "790.074949 | \n", - "0.0 | \n", - "
85 rows × 20 columns
\n", - "\n", - " | intensity | \n", - "mz | \n", - "
---|---|---|
26325795 | \n", - "1.340309e+06 | \n", - "101.071152 | \n", - "
26325796 | \n", - "8.808889e+05 | \n", - "103.053886 | \n", - "
26325797 | \n", - "1.274483e+06 | \n", - "104.053070 | \n", - "
26325798 | \n", - "5.006362e+05 | \n", - "106.500206 | \n", - "
26325799 | \n", - "9.967048e+05 | \n", - "109.731781 | \n", - "
... | \n", - "... | \n", - "... | \n", - "
26326066 | \n", - "9.956638e+06 | \n", - "723.452393 | \n", - "
26326067 | \n", - "8.864892e+06 | \n", - "724.444397 | \n", - "
26326068 | \n", - "2.661402e+06 | \n", - "725.436951 | \n", - "
26326069 | \n", - "2.712479e+06 | \n", - "730.404236 | \n", - "
26326070 | \n", - "9.344985e+05 | \n", - "731.411865 | \n", - "
276 rows × 2 columns
\n", - "\n", - " | raw_name | \n", - "sequence | \n", - "charge | \n", - "rt | \n", - "rt_start | \n", - "rt_stop | \n", - "mobility | \n", - "proteins | \n", - "uniprot_ids | \n", - "genes | \n", - "scan_num | \n", - "score | \n", - "fdr | \n", - "diann_spec_idx | \n", - "mods | \n", - "mod_sites | \n", - "nAA | \n", - "rt_norm | \n", - "precursor_mz | \n", - "ccs | \n", - "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
25 | \n", - "PhosphoPooledSynth1xdY_DIA60K10Da30K500_1000Da... | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "4 | \n", - "55.0662 | \n", - "54.8758 | \n", - "55.2564 | \n", - "0 | \n", - "EGFR_HUMAN | \n", - "P00533 | \n", - "EGFR | \n", - "42061 | \n", - "0.999181 | \n", - "0.000122 | \n", - "42060 | \n", - "Phospho@S | \n", - "21 | \n", - "22 | \n", - "0.410663 | \n", - "620.555215 | \n", - "0.0 | \n", - "
26 | \n", - "PhosphoPooledSynth1xdY_DIA60K10Da30K500_1000Da... | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "4 | \n", - "56.6580 | \n", - "56.4649 | \n", - "56.8483 | \n", - "0 | \n", - "EGFR_HUMAN | \n", - "P00533 | \n", - "EGFR | \n", - "43311 | \n", - "0.999037 | \n", - "0.000122 | \n", - "43310 | \n", - "Phospho@S | \n", - "5 | \n", - "22 | \n", - "0.422534 | \n", - "620.555215 | \n", - "0.0 | \n", - "
28 | \n", - "PhosphoPooledSynth1xdY_DIA60K10Da30K500_1000Da... | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "4 | \n", - "53.3473 | \n", - "53.1569 | \n", - "53.5375 | \n", - "0 | \n", - "EGFR_HUMAN | \n", - "P00533 | \n", - "EGFR | \n", - "40711 | \n", - "0.999703 | \n", - "0.000122 | \n", - "40710 | \n", - "Phospho@Y | \n", - "11 | \n", - "22 | \n", - "0.397844 | \n", - "620.555215 | \n", - "0.0 | \n", - "
\n", - " | charge | \n", - "injection_time | \n", - "isolation_lower_mz | \n", - "isolation_upper_mz | \n", - "ms_level | \n", - "nce | \n", - "peak_start_idx | \n", - "peak_stop_idx | \n", - "precursor_mz | \n", - "rt | \n", - "spec_idx | \n", - "
---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", - "0 | \n", - "14.627 | \n", - "-1.000000 | \n", - "-1.000000 | \n", - "1 | \n", - "0.0 | \n", - "0 | \n", - "844 | \n", - "-1.000000 | \n", - "0.000436 | \n", - "0 | \n", - "
1 | \n", - "0 | \n", - "50.000 | \n", - "500.502502 | \n", - "510.502502 | \n", - "2 | \n", - "30.0 | \n", - "844 | \n", - "980 | \n", - "505.502502 | \n", - "0.001647 | \n", - "1 | \n", - "
2 | \n", - "0 | \n", - "55.500 | \n", - "510.507507 | \n", - "520.507507 | \n", - "2 | \n", - "30.0 | \n", - "980 | \n", - "1114 | \n", - "515.507507 | \n", - "0.003949 | \n", - "2 | \n", - "
3 | \n", - "0 | \n", - "55.500 | \n", - "520.512512 | \n", - "530.512512 | \n", - "2 | \n", - "30.0 | \n", - "1114 | \n", - "1285 | \n", - "525.512512 | \n", - "0.005236 | \n", - "3 | \n", - "
4 | \n", - "0 | \n", - "55.500 | \n", - "530.517517 | \n", - "540.517517 | \n", - "2 | \n", - "30.0 | \n", - "1285 | \n", - "1505 | \n", - "535.517517 | \n", - "0.006518 | \n", - "4 | \n", - "
... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "
126169 | \n", - "0 | \n", - "55.500 | \n", - "950.727478 | \n", - "960.727478 | \n", - "2 | \n", - "30.0 | \n", - "72044012 | \n", - "72044045 | \n", - "955.727478 | \n", - "159.997733 | \n", - "126169 | \n", - "
126170 | \n", - "0 | \n", - "55.500 | \n", - "960.732483 | \n", - "970.732483 | \n", - "2 | \n", - "30.0 | \n", - "72044045 | \n", - "72044098 | \n", - "965.732483 | \n", - "159.999014 | \n", - "126170 | \n", - "
126171 | \n", - "0 | \n", - "55.500 | \n", - "970.737488 | \n", - "980.737488 | \n", - "2 | \n", - "30.0 | \n", - "72044098 | \n", - "72044129 | \n", - "975.737488 | \n", - "160.000297 | \n", - "126171 | \n", - "
126172 | \n", - "0 | \n", - "55.500 | \n", - "980.742493 | \n", - "990.742493 | \n", - "2 | \n", - "30.0 | \n", - "72044129 | \n", - "72044160 | \n", - "985.742493 | \n", - "160.001581 | \n", - "126172 | \n", - "
126173 | \n", - "0 | \n", - "55.500 | \n", - "990.747498 | \n", - "1000.747498 | \n", - "2 | \n", - "30.0 | \n", - "72044160 | \n", - "72044182 | \n", - "995.747498 | \n", - "160.002864 | \n", - "126173 | \n", - "
126174 rows × 11 columns
\n", - "\n", - " | modified_sequence | \n", - "mz | \n", - "intensity | \n", - "fragment_site | \n", - "ppm_err | \n", - "mass_err | \n", - "ion_name | \n", - "mod_sites | \n", - "color | \n", - "
---|---|---|---|---|---|---|---|---|---|
0 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "110.071243 | \n", - "1.006920e+07 | \n", - "-1 | \n", - "0.000000 | \n", - "0.000000 | \n", - "- | \n", - "21 | \n", - "lightgrey | \n", - "
1 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "111.074463 | \n", - "4.443796e+05 | \n", - "-1 | \n", - "0.000000 | \n", - "0.000000 | \n", - "- | \n", - "21 | \n", - "lightgrey | \n", - "
2 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "112.087112 | \n", - "6.159941e+05 | \n", - "-1 | \n", - "0.000000 | \n", - "0.000000 | \n", - "- | \n", - "21 | \n", - "lightgrey | \n", - "
3 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "113.070869 | \n", - "1.202546e+05 | \n", - "-1 | \n", - "0.000000 | \n", - "0.000000 | \n", - "- | \n", - "21 | \n", - "lightgrey | \n", - "
4 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "114.102188 | \n", - "1.011716e+05 | \n", - "-1 | \n", - "0.000000 | \n", - "0.000000 | \n", - "- | \n", - "21 | \n", - "lightgrey | \n", - "
... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "
735 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "304.133606 | \n", - "5.126084e+05 | \n", - "16 | \n", - "-2.107196 | \n", - "-0.000641 | \n", - "y5++ | \n", - "21 | \n", - "lightblue | \n", - "
736 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "510.207184 | \n", - "7.633365e+05 | \n", - "17 | \n", - "13.517984 | \n", - "0.006897 | \n", - "y4+ | \n", - "21 | \n", - "lightblue | \n", - "
737 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "439.170074 | \n", - "8.596875e+05 | \n", - "18 | \n", - "-4.099863 | \n", - "-0.001801 | \n", - "y3+ | \n", - "21 | \n", - "lightblue | \n", - "
738 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "220.088669 | \n", - "1.208201e+05 | \n", - "18 | \n", - "-0.207991 | \n", - "-0.000046 | \n", - "y3++ | \n", - "21 | \n", - "lightblue | \n", - "
739 | \n", - "_RPAGSVQNPVYHNQPLNPAPS[+80]R_(4+) | \n", - "175.118958 | \n", - "2.989494e+06 | \n", - "20 | \n", - "-0.348535 | \n", - "-0.000061 | \n", - "y1+ | \n", - "21 | \n", - "lightblue | \n", - "
740 rows × 9 columns
\n", - "\n", - " | mz | \n", - "type | \n", - "loss_type | \n", - "charge | \n", - "number | \n", - "fragment_site | \n", - "ion_name | \n", - "sequence | \n", - "mods | \n", - "mod_sites | \n", - "... | \n", - "rt_sec | \n", - "precursor_mz | \n", - "precursor_i_0 | \n", - "precursor_i_1 | \n", - "precursor_i_2 | \n", - "precursor_i_3 | \n", - "precursor_i_4 | \n", - "precursor_i_5 | \n", - "precursor_mono_idx | \n", - "color | \n", - "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", - "157.108383 | \n", - "98 | \n", - "0.0 | \n", - "1.0 | \n", - "1.0 | \n", - "0 | \n", - "b1+ | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
1 | \n", - "2323.097900 | \n", - "121 | \n", - "0.0 | \n", - "1.0 | \n", - "21.0 | \n", - "0 | \n", - "y21+ | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
2 | \n", - "1162.052612 | \n", - "121 | \n", - "0.0 | \n", - "2.0 | \n", - "21.0 | \n", - "0 | \n", - "y21++ | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
3 | \n", - "254.161148 | \n", - "98 | \n", - "0.0 | \n", - "1.0 | \n", - "2.0 | \n", - "1 | \n", - "b2+ | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
4 | \n", - "127.584213 | \n", - "98 | \n", - "0.0 | \n", - "2.0 | \n", - "2.0 | \n", - "1 | \n", - "b2++ | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "... | \n", - "
83 | \n", - "620.806030 | \n", - "77 | \n", - "0.0 | \n", - "0.0 | \n", - "0.0 | \n", - "-1 | \n", - "M1 | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
84 | \n", - "621.056885 | \n", - "77 | \n", - "0.0 | \n", - "0.0 | \n", - "0.0 | \n", - "-1 | \n", - "M2 | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
85 | \n", - "621.307678 | \n", - "77 | \n", - "0.0 | \n", - "0.0 | \n", - "0.0 | \n", - "-1 | \n", - "M3 | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
86 | \n", - "621.558533 | \n", - "77 | \n", - "0.0 | \n", - "0.0 | \n", - "0.0 | \n", - "-1 | \n", - "M4 | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
87 | \n", - "621.809326 | \n", - "77 | \n", - "0.0 | \n", - "0.0 | \n", - "0.0 | \n", - "-1 | \n", - "M5 | \n", - "RPAGSVQNPVYHNQPLNPAPSR | \n", - "Phospho@S | \n", - "21 | \n", - "... | \n", - "3303.972 | \n", - "620.555215 | \n", - "0.261768 | \n", - "0.336085 | \n", - "0.231848 | \n", - "0.113007 | \n", - "0.043388 | \n", - "0.013905 | \n", - "0 | \n", - "lightblue | \n", - "
88 rows × 22 columns
\n", - "