This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to launch a local Blast through java

Hello everyone,

I'm playing a bit with java graphic interface theses days. I'm trying to implement a simple blast interface using java that will accept a sequence and then allow the user to click on a button to launch blast. I'm almost done with the details, but I still can't figure out how to launch a local blast within java using the user's sequence.

Some important details :

  • I want to Blast against always the same home-made database
  • I want the blast to be local ( = run on own computer)
  • I want the solution to be easily exportable (runnable at least on mac and Linux)

I already look at this post but it didn't helped me as the purposes are a bit different : How To Perform A Blast Search From A Java Application?

I also looked at this solution, but not quite sure this is the best way to do it : https://stackoverflow.com/questions/525212/how-to-run-unix-shell-script-from-java-code

Does anyone ever tried to do such a thing ? I hope my question is not confusing.

Cheers,

Roxane

java blast

I already look at this post but it didn't helped me as the purposes are a bit different

 ProcessBuilder pb = new ProcessBuilder(
                this.blastAllPath,
                "-p","blastn",
                "-d",blastDB,
                "-m","7",
                "-i",fasta.getAbsolutePath(),
                "-o",blast.getAbsolutePath()
                );

what is different ? you have all you need to launch a blast query. You just have to modify the Blast parameters according to your needs. ( At the time of writing it was still the old binary blastall (blastAllPath) , but the idea is the same)

0 answers

No answers yet.

Log in to answer this question.