SEA-PHAGES Logo

The official website of the HHMI Science Education Alliance-Phage Hunters Advancing Genomics and Evolutionary Science program.

Welcome to the forums at seaphages.org. Please feel free to ask any questions related to the SEA-PHAGES program. Any logged-in user may post new topics and reply to existing topics. If you'd like to see a new forum created, please contact us using our form or email us at info@seaphages.org.

PhagesDB Data API Question

| posted 26 Sep, 2019 18:04
Is there a way to download specific genes in FASTA format (i.e. all major tail proteins) from the entire PhagesDB data base? The API seems to suggest that it is possible but I've been unable to figure it out.

Any help would be appreciated!

andong.li@uconn.edu
| posted 01 Oct, 2019 14:53
You can get the translations of any gene using /api/genes/{GeneID}/ but the API returns everything in JSON format not FASTA format and you would have to do them one at a time.
As an example if you want the info on gene 1 of phage Dori call this URL:

https://phagesdb.org/api/genes/Dori_CDS_1/

in the results you will get the amino acid sequence in the "translation".

Another alternative, although more manual, would be to use the "Download all sequences" button on the pham page of phagesdb. This will give you all the protein sequences of all members of the pham in FASTA format. Depending on your exact goal this might be good enough, you just need to figure out which phams you want and decide if all pham members are appropriate for your purpose.

Finally, if you have a specific gene list and you want all the sequences programmatically, you could consider using the phamerator database and use mysql to query the database based on gene names; the data you want is in the gene table in the translation field. You could get to that data by either using a graphical user interface or the command line.

Edits December 2021: the name of the gene has changed from Dori_1 to Dori_CDS_1; URL was updated. The current names of the genes are available from the "genesbyphage" request i.e. https://phagesdb.org/api/genesbyphage/Dori )
Edited 30 Dec, 2021 00:18
| posted 01 Oct, 2019 15:30
As Chris says, there's not really a great way to acquire sequences in that way via the API. He's given a few options that would likely work. If you have just a request or two, however, you can email me (dar78@pitt.edu) and I can send them back to you.

–Dan
 
Login to post a reply.