Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@C/N-term mods do not create in silico modified peptides #214

Open
Shinya-Watanabe opened this issue Nov 6, 2024 · 0 comments
Open

@C/N-term mods do not create in silico modified peptides #214

Shinya-Watanabe opened this issue Nov 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Shinya-Watanabe
Copy link

Hi,

I am trying to create a in silico spectral library with custom mods, but any of @Any/Protein_C/N-term mods do not create modified peptides, even the default Acetyl@Protein_N-term. I am using jupyter notebook with python 3.8 and pip installed all dependencies. Here's the brief process and output.

var_mods = ['Ethanolamine@D', 'Ethanolamine@E','Ethanolamine@Protein_C-term','PS@D','PS@E','PS@Protein_C-term']
user_mods = {"Ethanolamine@Protein_C-term":{"composition":"H(5)C(2)N(1)", "modloss_composition":""},
             "PS@D":{"composition":"H(5)C(3)N(1)O(2)", "modloss_composition":""},
             "PS@E":{"composition":"H(5)C(3)N(1)O(2)", "modloss_composition":""},
             "PS@Protein_C-term":{"composition":"H(5)C(3)N(1)O(2)", "modloss_composition":""}
             }

var_mods += ['Acetyl@Protein_N-term', 'Oxidation@M']
peptdeep.settings.add_user_defined_modifications(user_mods=user_mods)
peptdeep.settings.global_settings['common']['user_defined_modifications'] = user_mods
peptdeep.settings.global_settings['library']['var_mods'] = var_mods

Peptdeep.settings.add_user_defined_modifications() did not add user_mods to the global_settings, so I added them directly.

I created the spectral library using the following code.

fasta_lib = PredictSpecLibFasta(
    model_mgr,
    protease=digest,
    charged_frag_types=frag_types,
    var_mods=var_mods,
    fix_mods=['Carbamidomethyl@C'],
    max_missed_cleavages=max_miss_cleave,
    max_var_mod_num=max_var_mods,
    peptide_length_max=max_pep_len,
    peptide_length_min=min_pep_len,
    precursor_charge_min=precursor_charge_min,
    precursor_charge_max=precursor_charge_max,
    precursor_mz_min=min_pep_mz,
    precursor_mz_max=max_pep_mz,
    decoy=None
)

fasta_lib.get_peptides_from_fasta_list(fasta_list)
fasta_lib.append_decoy_sequence()
fasta_lib.add_modifications()

fasta_lib.precursor_df['nAA'] = fasta_lib.precursor_df.sequence.str.len()
fasta_lib.precursor_df.sort_values('nAA', inplace=True)
fasta_lib.precursor_df.reset_index(drop=True, inplace=True)
fasta_lib.add_charge()

I checked if @Protein_C-term is in 'mods' column using below, and there was nothing. I also checked 'Acetyl@Protein_N-term' but could not find.

prot_c_term_filter = fasta_lib.precursor_df['mods'].str.contains('@Protein_C-term')
fasta_lib.precursor_df[prot_c_term_filter]

Best,
Shinya

@GeorgWa GeorgWa added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants