Implementing Blastall Locally With E Value Using Blast Database Using Java
2
0
Entering edit mode
12.2 years ago

Dear all, I am a PhD student in Bioinformatics. I am looking for a piece of code to run something similar to blastall (linux command) locally (in a client machine) from a downloaded NCBI database and annotate gene on the basis of e value using JAVA API and store results in a output file. Any leads? Many thanks.

Sincere Regards, Alinda

java • 4.0k views
ADD COMMENT
2
Entering edit mode

Your post has great many problems. Why would you want to re-implement blastall when it is available in binary form? Also it highly unclear what you want to get out as well. The question needs to be fixed and when you do so make a comment here.

ADD REPLY
0
Entering edit mode

Thank you Albert for your kind reply. Let's make it precise... I want to execute following string (String cmd) in java and want to store results in a .blast or .fs file. I would like to run the whole process locally in my machine using database downloaded from NCBI in my local machine.

String cmd = "C:/blast/bin/blastall -p blastp -d wormDB.fa -i XXX.fas -e 1e-5 -o test.blast";

Hope that helps.

Sincere Regards, Alinda

ADD REPLY
0
Entering edit mode

Why do you want to execute blast in java? Can't you just run it from the command line?

ADD REPLY
0
Entering edit mode

Did this method work?Please let me know the process

ADD REPLY
2
Entering edit mode
12.2 years ago
Michael 55k

Depending on the complexity of your use case, you might want to have a look at BioJava.

Your use case is a bit vague, but it looks to me like like:

  • Given a list of sequences
  • run blast against a custom/ or whatever, or multiple databases
  • "annotate sequences:" by e.g. "Best blast hit" (e-value or more complex strategy) (this step involves parsing the blast-result)
  • generate an annotation file: e.g. in GFF format

While you can run the blast command just fine as pointed out by Ketil, the following steps might involve parsing the blast result, have a look at the Cookbook in this case.

ADD COMMENT
0
Entering edit mode
12.2 years ago
Ketil 4.1k

Googling for "java system command" gave me this link, does that help?

http://www.java-samples.com/showtutorial.php?tutorialid=8

ADD COMMENT
0
Entering edit mode

Thanks Ketil. I found that code yesterday. Yet to implement. Will do it soon and let you know if it works...

ADD REPLY
0
Entering edit mode

Were you able to implement it?

ADD REPLY

Login before adding your answer.

Traffic: 2420 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6