-
Notifications
You must be signed in to change notification settings - Fork 46
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
define variable modifications in calculateFragments() #167
Comments
Maybe I don't completely understand your request but at least your second suggestion is already possible: library("MSnbase")
calculateFragments("ACE", modifications=c(C=57.02146))
# Modifications used: C=57.02146
# mz ion type pos z seq
# 1 72.04439 b1 b 1 1 A
# 2 232.07504 b2 b 2 1 AC
# 3 361.11763 b3 b 3 1 ACE
# 4 148.06043 y1 y 1 1 E
# 5 308.09108 y2 y 2 1 CE
# 6 379.12819 y3 y 3 1 ACE
# 7 115.06278 y1_ y_ 1 1 E
# 8 275.09343 y2_ y_ 2 1 CE
# 9 346.13054 y3_ y_ 3 1 ACE
calculateFragments("ACE", modifications=c(C=57.02146, A=-1))
# Modifications used: C=57.02146, A=-1
# mz ion type pos z seq
# 1 71.04439 b1 b 1 1 A
# 2 231.07504 b2 b 2 1 AC
# 3 360.11763 b3 b 3 1 ACE
# 4 148.06043 y1 y 1 1 E
# 5 308.09108 y2 y 2 1 CE
# 6 378.12819 y3 y 3 1 ACE
# 7 115.06278 y1_ y_ 1 1 E
# 8 275.09343 y2_ y_ 2 1 CE
# 9 345.13054 y3_ y_ 3 1 ACE |
If I get it correctly, You could this by giving a modification vector with the modification giving at the postion in the vector matching the position in the sequence the OrgMassSpecR R package solved this by using a lettercode in the peptide sequence and link the lettercode to a modification with list. (see fragmentpeptide() and PeptideSpectrum() functions) A more biological relevant use case would be phosphorylation. Eg, serine can get phosporylated but not all serines in the protein will be phosporylated. |
Ok, thanks for the clarification. Great idea. I like your second solution more than the first. For the first you have to know the length of the peptide sequence before (or count it manually). |
@lgatto we changed the way the In favor to handle the |
Sry, we have to rethink the handling of modification once again. We changed to add instead of replace because we allow modifications to
|
Hi, Not sure what you mean by adding or replacing the original mass with modification mass. Maybe something to consider, nterm en cterm modification might also be variable. Finally, since you can work with mzid format in MSnBase. MZidentML also has an specific way to handle modified peptide sequence as defined in MZidentML guidelines. |
@sgibb - trying to catch up (still travelling, until next week). A few thoughts
|
@lgatto A reply on your 2nd comment.
You also have to be able to specify where the variable modificiation is positioned. Eg. if you have a sequence with 2 serines. You can have a Phospo group on the first but not on the second serine. |
Yes, of course. My point here is to handle variable and fixed modifications independently, rather than tangle them together using, for example upper and lower case. These two parameters could be could be lists with positions and masses, ... or anything that makes sense/is convenient in terms of user interface and coding. @sgibb - what about a |
Adding a new class would be surely the cleanest solution and even support unimod would be great but is that what the user really wants? The mzIdentMl code is very similar to your class suggestion: <Modification location="10" residues="K" monoisotopicMassDelta="138.0680796">
<cvParam accession="XLMOD:02001" cvRef="XLMOD" name="DSS"/>
<cvParam accession="MS:1002509" cvRef="PSI-MS" name="cross-link donor" value="11309529182388590588"/>
</Modification> Would be something like this pseudocode be more useable? mod <- Modification(residues="C", location=2, avgMassDelta=57.02146)
calculateFragments("ACE", modifications=mod) Or for the to be written unimod package: library(unimod)
m <- unimod::query(id=4)
calculateFragments("ACE", modifications=mod) |
Sorry for being so slow and quiet regarding this topic. I think the best way would be to provide a The planned class: https://github.com/ComputationalProteomicsUnit/unimod/blob/master/R/AllClasses.R (nothing implemented yet).
EDIT: urls updated to CPU |
Excellent initiative! I have now given you admin rights to the CPU repo. |
upvote +1 It can be very useful to define variable modifications when calculating fragment ions. |
For those people who wants to predict MS2 fragments with variable modifications, there is a temporary solution here. https://www.github.com/yafeng/SpectrumAI/ |
Hi there, |
Unfortunately I have much to do with my real job. We started to implement the unimod modifications in the unimod package. Currently it can download and parse the data from https://unimod.org and can calculate the mass of given sequences with fixed modifications. We would need this functionality in more than one package ( |
Hi,
It seems you can only define fixed modifications with calculateFragments().
Am I right? If not, how to do it?
I think a feature like this could be useful.
Posible ways of implementing this are:
1)
Provide a vector of masses/modifications with length = peptide sequence length.
The position in the vector corresponds to the position in the peptide sequence
use lettercode in the peptide sequence and link the lettercode to a modification wit a names list.
(much like fragmentpeptide() and PeptideSpectrum() in the OrgMassSpecR R package)
What do you guys think?
The text was updated successfully, but these errors were encountered: