This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is There Any Api Of Blast And Uniprot To Align Protein?

Given a set of protein's gi/UniProt identifiers. I want to find the e-value/identity between each of the pairs. I decided to do it by program but I cant find any apis of Blast and Uniprot. Any ideas?

blast uniprot

2 answers

UniProt most certainly has an API: all of its resources are RESTful (look for the links on any protein page) and there are tools such as UniProtJAPI.

I'm not sure what you mean by a BLAST API, but it's possible to run remote BLAST programatically. See for example Bio::Tools::Run::RemoteBlast for Bioperl.

However, I think you are a little unclear about exactly what you want to do and how to do it. If I had protein GIs and wanted to do pairwise comparison using BLAST I would:

  1. Use the GIs to retrieve protein sequences in FASTA format via Batch Entrez
  2. Download and install BLAST locally
  3. Create a local BLAST database from the sequences using makeblastdb
  4. Run blastp using the FASTA format file as query against my local BLAST database

In that way I would generate identity/e-values for every sequence vs. every other sequence.

Thanks very much! I will try it out later.

@Neilfws, have you worked with UniProtJAPI before? I downloaded the API and tried to edit their example code, but I have trouble understanding how to run my edited projects. In the API, a .cmd file is given to execute the example files - compiling them on their own would result in errors. Please let me know - I've scoured the internet for resources but have come up short. Any help appreciated!

Sorry no, I have not.

You can do it with bioperl.

Get the sequences with the efetch module: http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook

Align the sequences with the simple align module: http://www.bioperl.org/wiki/HOWTO:AlignIO_and_SimpleAlign

edit*

Just as a side note, if you do use blast to do your alignment, I wouldn't use the e-value for that output. Blast E-values are normalized p-values to the search space of the database. Since the search space is essentially length of sequence A * length of sequence B, the e-value is probably not the best metric as short sequences would artificial give high e-values. I would use the bitscore instead. Also remember that the lengths used to calculate identity in normal blast includes gaps.

I am not familiar with perl, but I found a similar stuff called "biopython", I will try it out later. Thanks!

Log in to answer this question.