Calculating mass of precursor

75 views
Skip to first unread message

Joel Wallenius

unread,
Apr 11, 2017, 11:08:41 AM4/11/17
to pyte...@googlegroups.com
Hello!

I'm just starting to get into Pyteomics. I think it will make my life a lot easier. Thank you very much for that!

My first hurdle is:

How do I calculate the mass of a precursor/parent? It does not have an ion type, so what do I put in the ion_type argument?

mass.calculate_mass(sequence='PEPccTIoxiDE',ion_type=???,charge=4,aa_comp_aa_comps)

The parent has charge, modifications, and a sequence, but not an ion type. What to do?


Thank you so much, again.



sincerely,


Joel

Lev Levitsky

unread,
Apr 11, 2017, 11:17:54 AM4/11/17
to pyteomics
Hi Joel,

Thanks for your feedback!

As noted in the docs, the ion_type parameter is optional, you don't have to specify anything in case of the precursor ion. If for some reason it's more convenient for you to explicitly pass an ion_type, you can use the value 'M', which is the default.

P.S. Charge is optional as well, in case you are interested in the neutral mass.

Best,

Lev

--

---
You received this message because you are subscribed to the Google Groups "Pyteomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Lev Levitsky
Institute for Energy Problems of Chemical Physics RAS
Laboratory of Physical and Chemical Methods for Structure Analysis
Leninsky pr. 38, bld. 2 119334 Moscow Russia
tel: +7 499 1378257 fax: +7 499 1378257, +7 499 1378258

Joel Wallenius

unread,
Apr 18, 2017, 8:40:36 AM4/18/17
to pyte...@googlegroups.com
Hello again!

A gentle reminder of my question, which still stands. :]



Joel

joelwa...@gmail.com

unread,
Apr 18, 2017, 9:07:42 AM4/18/17
to Pyteomics
On Tuesday, 11 April 2017 17:17:54 UTC+2, Lev Levitsky wrote:
> Hi Joel,
>
>
> Thanks for your feedback!
>
>
>
> As noted in the docs, the ion_type parameter is optional, you don't have to specify anything in case of the precursor ion. If for some reason it's more convenient for you to explicitly pass an ion_type, you can use the value 'M', which is the default.
>
>
> P.S. Charge is optional as well, in case you are interested in the neutral mass.
>
>
> Best,
>
>
> Lev
>
>
> On Tue, Apr 11, 2017 at 6:07 PM, Joel Wallenius <joelwa...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> Hello!
>
> I'm just starting to get into Pyteomics. I think it will make my life a lot easier. Thank you very much for that!
>
> My first hurdle is:
>
> How do I calculate the mass of a precursor/parent? It does not have an ion type, so what do I put in the ion_type argument?
>
> mass.calculate_mass(sequence='PEPccTIoxiDE',ion_type=???,charge=4,aa_comp_aa_comps)
>
> The parent has charge, modifications, and a sequence, but not an ion type. What to do?
>
>
> Thank you so much, again.
>
>
>
> sincerely,
>
>
> Joel
>
>
>
>
>
> --
>
>
>
> ---
>
> You received this message because you are subscribed to the Google Groups "Pyteomics" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
> Lev Levitsky
>
> Institute for Energy Problems
> of Chemical Physics RAS
> Laboratory of Physical and Chemical Methods for
> Structure Analysis
> Leninsky pr. 38, bld. 2 119334 Moscow Russia
> tel: +7
> 499 1378257 fax: +7 499 1378257, +7 499 1378258



Hello Lev and thank you for your reply! I did not see it until now (Mark told me how to access it). For some reason I did not receive any notification about it.

Anyway. I tested three things:

ion_type='y',
ion_type='M',
<ion_type argument omitted>

The answer was the same regardless of which of these three approaches I used (apart from random floating point rounding errors at the fifteenth decimal).

Does that make sense?


Thanks again!!

Lev Levitsky

unread,
Apr 18, 2017, 9:27:38 AM4/18/17
to pyteomics, joelwa...@gmail.com
Hi Joel,

Yes, I was replying from email and hoped you'd get a notification, but I was wrong, sorry about that. Cc'ing you directly this time.

To your question:
Yes, I believe it makes sense. Indeed, y ions have the same chemical composition as precursor ions of the same sequence, and have the mass equal to the sum of residue masses, plus water, plus the proton(s) carrying charge.

Best,
Lev

To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

joelwa...@gmail.com

unread,
Apr 18, 2017, 10:15:29 AM4/18/17
to Pyteomics, joelwa...@gmail.com
Hi!

Yes it works now, the cc was magic ^_^

Before I stop troubling you, would you perhaps have any idea why there is a slight discrepancy between the mass predictions/calculations done by pyteomics, and by the algorithm at:

http://db.systemsbiology.net:8080/proteomicsToolkit/FragIonServlet.html

??

The discrepancy in m/z is about 0.00005. It would have been interesting if it was 0.0005 as that's the electron mass but unless my eyes are playing tricks it's 0.00005... what could give a difference equal to a tenth of an electron?

Mysteries...



Joel

Lev Levitsky

unread,
Apr 18, 2017, 11:04:08 AM4/18/17
to pyteomics, joelwa...@gmail.com
Good question. I'm not sure, it could be that they just use less accurate element masses.
I would expect that pyteomics calculates masses accurately enough, but one potential source of error is the "chemical" mass defect (real molecular mass is less than the sum of components because of the chemical bond energy). I don't have a confident estimate of this effect, but my feeling is that it's probably another order of magnitude less than the discrepancy that you observe.



To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

joelwa...@gmail.com

unread,
Apr 19, 2017, 5:00:33 AM4/19/17
to Pyteomics, joelwa...@gmail.com
Yes something like that. According to the Wiki article, peptide bonds are about 0.15 eV, so in a peptide of 20 you'd have about 3 eV, and that is nowhere near 51.1 keV (tenth of an electron). Hmmm.

Is pyteomics calculating masses by summing individual atoms, or individual amino acids plus terminals & protons?

Lev Levitsky

unread,
Apr 19, 2017, 5:39:36 AM4/19/17
to pyteomics, Joel Wallenius
calculate_mass first calculates the full chemical composition and then sums atomic weights nist_mass (you'd probably need to account for all bonds and not only peptide bonds in this case). 
fast_mass, on the other hand, just sums residue masses, then adds termini and protons.

To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

joelwa...@gmail.com

unread,
Apr 19, 2017, 5:53:06 AM4/19/17
to Pyteomics, joelwa...@gmail.com
Okay so calculate_mass would give the highest mass. The discrepancy is probably something else then, because the dbsys browser calculator returns a mass that is 0.00005 Da in excess of calculate_mass.

Thank you for your time and patience! I'll ask further questions to the devs of the dbsys algorithm :]
Reply all
Reply to author
Forward
0 new messages