Question: Retrieve Protein Sequences from Uniprot
0
gravatar for biohacker_tobe
4 months ago by
biohacker_tobe40 wrote:

I have a list of protein id's, these all traceback to Uniprot. However, I wanted to know if I can obtain sequence information from these proteins from uniprot protein ids.. Is there any package in biopython to do this?

I found this snippet of code online and it does give the sequence information but not sure if there is a better way

import requests as r from Bio import SeqIO from io import StringIO

cID='A0A061AD41'

baseUrl="http://www.uniprot.org/uniprot/" currentUrl=baseUrl+cID+".fasta" response = r.post(currentUrl) cData=''.join(response.text)

Seq=StringIO(cData) pSeq=list(SeqIO.parse(Seq,'fasta'))

where pSeq prints:

[SeqRecord(seq=Seq('MQAALIGLNFPLQRRFLSGVLTTTSSAKRCYSGDTGKPYDCTSAEHKKELEECY...SSS', SingleLetterAlphabet()), id='sp|O45228|PROD_CAEEL', name='sp|O45228|PROD_CAEEL', description='sp|O45228|PROD_CAEEL Proline dehydrogenase 1, mitochondrial OS=Caenorhabditis elegans OX=6239 GN=prdh-1 PE=2 SV=2', dbxrefs=[])]
ADD COMMENTlink modified 4 months ago by Shalu Jhanwar480 • written 4 months ago by biohacker_tobe40
1
gravatar for Shalu Jhanwar
4 months ago by
Shalu Jhanwar480
Switzerland
Shalu Jhanwar480 wrote:

Have a look at the previous post here showing retrieval of the sequences from UniProt protein Ids.

ADD COMMENTlink written 4 months ago by Shalu Jhanwar480

I saw that this uses linux command directly, was curious if I could do it directly from a python command.

ADD REPLYlink written 4 months ago by biohacker_tobe40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1082 users visited in the last hour
_