peptdeep.spec_lib.predict_lib¶
Classes:
|
|
|
Flatten the predicted spectral library, the key feature is to predict and flatten fragments in batch with predict_and_parse_lib_in_batch() |
- class peptdeep.spec_lib.predict_lib.PredictSpecLib(model_manager: ModelManager = None, charged_frag_types=['b_z1', 'b_z2', 'y_z1', 'y_z2'], precursor_mz_min: float = 400.0, precursor_mz_max: float = 2000.0, decoy: str = 'pseudo_reverse', rt_to_irt: bool = False, generate_precursor_isotope: bool = False)[source][source]¶
Bases:
SpecLibBaseMethods:
__init__([model_manager, ...])predict_all([...])set_precursor_and_fragment(*, precursor_df)translate_rt_to_irt_pred([irt_pep_df])Add 'irt_pred' into columns based on 'rt_pred'
- __init__(model_manager: ModelManager = None, charged_frag_types=['b_z1', 'b_z2', 'y_z1', 'y_z2'], precursor_mz_min: float = 400.0, precursor_mz_max: float = 2000.0, decoy: str = 'pseudo_reverse', rt_to_irt: bool = False, generate_precursor_isotope: bool = False)[source][source]¶
- Parameters:
model_manager (ModelManager, optional) – ModelManager, by default None
charged_frag_types (list, optional) – Charged fragment types, by default [‘b_z1’,’b_z2’,’y_z1’,’y_z2’]
precursor_mz_min (float, optional) – precursor_mz_min, by default 400.0
precursor_mz_max (float, optional) – precursor_mz_max, by default 2000.0
decoy (str, optional) – Decoy choice, see alphabase.spec_lib.decoy_library, by default ‘pseudo_reverse’
rt_to_irt (bool, optional) – Convert predicted RT to iRT values, by default False
generate_precursor_isotope (bool, optional) – Generate precursor isotopes, defaults to False
- predict_all(min_required_precursor_num_for_mp: int = 2000, predict_items: list = ['rt', 'mobility', 'ms2'])[source][source]¶
Predict RT/IM/MS2 for self._precursor_df
Calculate isotope information in self._precursor_df
- class peptdeep.spec_lib.predict_lib.PredictSpecLibFlat(min_fragment_intensity: float = 0.001, keep_top_k_fragments: int = 1000, custom_fragment_df_columns: list = ['type', 'number', 'position', 'charge', 'loss_type'], **kwargs)[source][source]¶
Bases:
SpecLibFlatFlatten the predicted spectral library, the key feature is to predict and flatten fragments in batch with predict_and_parse_lib_in_batch()
- Parameters:
min_fragment_intensity (float, optional) – minimal intensity to keep, by default 0.001
keep_top_k_fragments (int, optional) – top k highest peaks to keep, by default 1000
Methods:
__init__([min_fragment_intensity, ...])predict_and_parse_lib_in_batch(predict_lib)Predict and flatten fragments in batch
- __init__(min_fragment_intensity: float = 0.001, keep_top_k_fragments: int = 1000, custom_fragment_df_columns: list = ['type', 'number', 'position', 'charge', 'loss_type'], **kwargs)[source][source]¶
- Parameters:
min_fragment_intensity (float, optional) – minimal intensity to keep, by default 0.001
keep_top_k_fragments (int, optional) – top k highest peaks to keep, by default 1000
custom_fragment_df_columns (list, optional) – See
custom_fragment_df_columns, defaults to [‘type’,’number’,’position’,’charge’,’loss_type’]
- predict_and_parse_lib_in_batch(predict_lib: PredictSpecLib, batch_size: int = 200000)[source][source]¶
Predict and flatten fragments in batch
- Parameters:
predict_lib (PredictSpecLib) – spectral library to be predicted and flatten
batch_size (int, optional) – the batch size, by default 200000