Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Converting Uniprot File to a Fasta File in Perl

by erix (Prior)
on Feb 27, 2017 at 21:42 UTC ( [id://1183023]=note: print w/replies, xml ) Need Help??


in reply to Converting Uniprot File to a Fasta File in Perl

Unless this is a programming exercise, it will be easiest to just parse out the accessions (the first one, the 'primary accession number', suffices, the rest are old ones, kept for 'backward compatibility') and use those primary accessions to query the uniprot.org website.

To get the fasta for an accession, say 'Q94650', just construct a url like:

http://www.uniprot.org/uniprot/Q94650.fasta

and go get the fasta with wget or indeed perl LWP. It'll return:

>sp|Q94650|ARF1_PLAFA ADP-ribosylation factor 1 OS=Plasmodium falcipar +um GN=ARF1 PE=1 SV=3 MGLYVSRLFNRLFQKKDVRILMVGLDAAGKTTILYKVKLGEVVTTIPTIGFNVETVEFRN ISFTVWDVGGQDKIRPLWRHYYSNTDGLIFVVDSNDRERIDDAREELHRMINEEELKDAI ILVFANKQDLPNAMSAAEVTEKLHLNTIRERNWFIQSTCATRGDGLYEGFDWLTTHLNNA K

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1183023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found