peptdeep.settings¶
This module provides functionalities for basic settings.
peptdeep.settings.global_settings in this module
controls all peptdeep functionalities.
Functions:
|
Add user-defined modifications into the system, this is userful for isotope labeling. |
|
|
|
|
|
Load modification tsv either from alphabase default modification.tsv or an external tsv file. |
|
Data:
Global settings in peptdeep, it controls all functionalities of PeptDeep. |
- peptdeep.settings.add_user_defined_modifications(user_mods: dict = None)[source][source]¶
Add user-defined modifications into the system, this is userful for isotope labeling.
- Parameters:
user_mods (dict, optional) – Example:
` { "Dimethyl2@Any_N-term": { "composition": "H(2)2H(2)C(2)", "modloss_composition": "" }, ... } `Set as global_settings[“user_defined_modifications”] if it is None. By default None.
- peptdeep.settings.global_settings = {'MAX_THREADS': 60, 'PEPTDEEP_HOME': '/home/docs/peptdeep', 'common': {'modloss_importance_level': 1.0, 'user_defined_modifications': {}}, 'hla_model_url': 'https://github.com/MannLabs/alphapeptdeep/releases/download/pre-trained-models/hla_model.zip', 'library': {'decoy': 'None', 'decoy_choices': ['None', 'pseudo_reverse', 'diann'], 'fasta': {'add_contaminants': False, 'max_miss_cleave': 2, 'protease': 'trypsin', 'protease_choices': ['trypsin', '([KR])', 'trypsin_not_P', '([KR](?=[^P]))', 'lys-c', 'K', 'lys-n', '\\w(?=K)', 'chymotrypsin', 'asp-n', 'glu-c']}, 'fix_mods': ['Carbamidomethyl@C'], 'frag_types': ['b', 'y'], 'generate_precursor_isotope': False, 'infile_type': 'fasta', 'infile_type_choices': ['fasta', 'sequence_table', 'peptide_table', 'precursor_table', 'all_other_psm_reader_types'], 'infiles': ['xxx.fasta'], 'irt_library': 'xxx/library.tsv', 'irt_library_type': 'speclib_tsv', 'labeling_channels': {}, 'max_frag_charge': 2, 'max_peptide_len': 35, 'max_precursor_charge': 4, 'max_precursor_mz': 2000.0, 'max_special_mod_num': 1, 'max_var_mod_num': 2, 'min_peptide_len': 7, 'min_precursor_charge': 2, 'min_precursor_mz': 200.0, 'min_special_mod_num': 0, 'min_var_mod_num': 0, 'output_folder': '/home/docs/peptdeep/spec_libs', 'output_tsv': {'enabled': False, 'keep_higest_k_peaks': 12, 'max_fragment_mz': 2000.0, 'min_fragment_mz': 200.0, 'min_relative_intensity': 0.001, 'translate_batch_size': 100000, 'translate_mod_to_unimod_id': False}, 'rt_to_irt': False, 'special_mods': [], 'special_mods_cannot_modify_pep_c_term': False, 'special_mods_cannot_modify_pep_n_term': False, 'var_mods': ['Acetyl@Protein_N-term', 'Oxidation@M']}, 'local_hla_model_zip_name': 'hla_model.zip', 'local_model_zip_name': 'pretrained_models_v3.zip', 'log_level': 'info', 'log_level_choices': ['debug', 'info', 'warning', 'error', 'critical'], 'model': {'frag_types': ['b', 'y', 'b_modloss', 'y_modloss'], 'max_frag_charge': 2}, 'model_mgr': {'charge_prob_cutoff': 0.3, 'default_instrument': 'Lumos', 'default_nce': 30.0, 'external_ccs_model': '', 'external_charge_model': '', 'external_ms2_model': '', 'external_rt_model': '', 'instrument_group': {'ASTRAL': 'Lumos', 'Astral': 'Lumos', 'ECLIPSE': 'Lumos', 'ELITE': 'Lumos', 'EXPLORIS': 'QE', 'EXPLORIS480': 'QE', 'Eclipse': 'Lumos', 'Elite': 'Lumos', 'Exploris': 'QE', 'Exploris480': 'QE', 'FUSION': 'Lumos', 'Fusion': 'Lumos', 'LUMOS': 'Lumos', 'Lumos': 'Lumos', 'ORBITRAPTRIBRID': 'Lumos', 'OrbitrapTribrid': 'Lumos', 'QE': 'QE', 'QE+': 'QE', 'QEHF': 'QE', 'QEHFX': 'QE', 'SCIEXTOF': 'SciexTOF', 'SciexTOF': 'SciexTOF', 'THERMOTOF': 'ThermoTOF', 'THERMOTRIBRID': 'Lumos', 'TIMSTOF': 'timsTOF', 'ThermoTOF': 'ThermoTOF', 'ThermoTribrid': 'Lumos', 'VELOS': 'Lumos', 'Velos': 'Lumos', 'timsTOF': 'timsTOF'}, 'mask_modloss': True, 'model_choices': ['generic', 'phos', 'hla', 'digly'], 'model_type': 'generic', 'predict': {'batch_size_charge': 1024, 'batch_size_ms2': 512, 'batch_size_rt_ccs': 1024, 'multiprocessing': True, 'verbose': True}, 'transfer': {'batch_size_charge': 1024, 'batch_size_ms2': 512, 'batch_size_rt_ccs': 1024, 'dda_psm_types': ['alphapept', 'pfind', 'maxquant', 'msfragger_pepxml'], 'epoch_charge': 40, 'epoch_ms2': 20, 'epoch_rt_ccs': 40, 'grid_instrument': ['Lumos'], 'grid_nce_first': 15.0, 'grid_nce_last': 45.0, 'grid_nce_search': False, 'grid_nce_step': 3.0, 'lr_charge': 0.0001, 'lr_ms2': 0.0001, 'lr_rt_ccs': 0.0001, 'model_output_folder': '/home/docs/peptdeep/refined_models', 'ms_file_type': 'alphapept_hdf', 'ms_file_type_choices': ['alphapept_hdf', 'thermo_raw', 'mgf', 'mzml'], 'ms_files': [], 'psm_files': [], 'psm_modification_mapping': {}, 'psm_num_per_mod_to_train_charge': 50, 'psm_num_per_mod_to_train_ms2': 50, 'psm_num_per_mod_to_train_rt_ccs': 50, 'psm_num_to_test_charge': 0, 'psm_num_to_test_ms2': 0, 'psm_num_to_test_rt_ccs': 0, 'psm_num_to_train_charge': 100000000, 'psm_num_to_train_ms2': 100000000, 'psm_num_to_train_rt_ccs': 100000000, 'psm_type': 'alphapept', 'psm_type_choices': ['alphapept', 'pfind', 'maxquant', 'diann', 'speclib_tsv', 'msfragger_pepxml', 'spectronaut_report'], 'top_n_mods_to_train': 10, 'verbose': False, 'warmup_epoch_charge': 10, 'warmup_epoch_ms2': 10, 'warmup_epoch_rt_ccs': 10}, 'use_predicted_charge_in_speclib': True}, 'model_url': 'https://github.com/MannLabs/alphapeptdeep/releases/download/pre-trained-models/pretrained_models_v3.zip', 'peak_matching': {'ms1_ppm': True, 'ms1_tol_value': 20.0, 'ms2_ppm': True, 'ms2_tol_value': 20.0}, 'task_choices': ['train', 'library'], 'task_workflow': ['library'], 'thread_num': 16, 'torch_device': {'device_ids': [], 'device_type': 'gpu', 'device_type_choices': ['get_available', 'gpu', 'mps', 'cpu']}}¶
Global settings in peptdeep, it controls all functionalities of PeptDeep.
- peptdeep.settings.update_modifications(tsv: str = '', modloss_importance_level: float = 1.0)[source][source]¶
Load modification tsv either from alphabase default modification.tsv or an external tsv file.
- Parameters:
tsv (str, optional) – External modification tsv file, “” refers to the default alphabase tsv, by default “”.
modloss_importance_level (float, optional) – Only keep the important modification losses, by default 1.0