I want to retrieve Post-translational modifications (PTMs) data from Uniprot via bioservices, I am using following script:
from bioservices import uniprot
u = uniprot.UniProt()
ptm = u.search("P38903", frmt="xls", include=True, columns="features")
and obtain the following outcome:
u'Features\nChain (1); Compositional bias (5); Modified residue (2); Sequence conflict (3)\n'
What I want to have are the details of "Modified residue (2)" i.e. what type of modifications are these and what are the positions, (optional) references as well.
The short answer is: you can't do it with bioservices. It doesn't support the the column value
feature(MODIFIED RESIDUE)where the information is hiding.But you can get the information by using the Uniprot API. The following Python3 snippet gives you info you need:
Output: