Local Copy of UniMod

28 views
Skip to first unread message

Dennis Linke

unread,
Oct 18, 2016, 6:40:20 AM10/18/16
to pyte...@googlegroups.com
Hey Guys!

Recently, I found your great software Pyteomics and this is really awesome!
I am about to use some of your classes to implement this in custom made python scripts to do phosphorylation site assignment.
For this, I am using the UniMod database information; as shown on your homepage:
Unimod database is an excellent resource for the information on the chemical compositions of known protein modifications. Version 2.0.3 introduces pyteomics.mass.Unimod class that can serve as a Python interface to Unimod:
>>> db = mass.Unimod()
>>> aa_comp = dict(mass.std_aa_comp)
>>> aa_comp['p'] = db.by_title('Phospho')['composition']
>>> mass.calculate_mass('PEpTIDE', aa_comp=aa_comp)
782.2735307010443

Is there a way to keep a local copy of the Unimod DB if the PC has no connection to the internet? Is there an easy way to implement this?


Best wishes & many thanks

Dennis

Joshua Klein

unread,
Oct 18, 2016, 8:40:11 AM10/18/16
to pyteomics

The Unimod object can be initialized from a local file. If you download the file located at http://www.unimod.org/xml/unimod.xml to a portable drive and place it somewhere on the computer without an internet connection, you can create a working Unimod object using the following commands

db = mass.Unimod(open("path/to/local/unimod.xml"))

--

---
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.

Reply all
Reply to author
Forward
0 new messages