[Biojava-dev] Local binary execution

Michael Heuer heuermh at acm.org
Thu Jun 9 11:54:47 EDT 2005


Hello Michael,

Personally I think this kind of code might be better suited in a more
general library, say in an Apache Jakarta Commons project for example.

In fact, there was just a proposal to pull the exec code out of ant into a
separate self-contained library to the commonds-dev mailing list a couple
of days ago:

> http://tinyurl.com/9culs

That said, this comes up quite frequently here, so perhaps we should just
bite the bullet and do it up right.

   michael


On Thu, 9 Jun 2005, Michael Barton wrote:

>
> Hi,
>
> I'm Bioinformatics MRes student at Newcastle. I've been messing around
> with some java code to execute bioinformatics binaries. It was
> originally intended for blast but has also been extended for genewise.
> It takes the hassle out of using process / process builder a little bit.
>
> Use goes along the lines of something like this
>
> //Search factory for creating searches
> SearchFactory<BlastSearch, BlastSearchFactory.Parameter> bsf;
> bsf = new BlastSearchFactory();
>
> //Paramterise with search specific variables
> bsf.setSearchBinaryLocation(test_data + "/blast/binary");
> bsf.setSearchParameter(BlastSearchFactory.Parameter.blastType,"blastn");
> bsf.setSearchParameter(BlastSearchFactory.Parameter.database,
>     test_data + "/blast/db/sargasso");
>
> //Create immutable search object which can be used to run mutiple
> searches on the same database
> Search<BlastSearchResult> blastSearch = bsf.getSearch();
>
> Simple search result object which returns inputstream
> SearchResult sr = blastSearch.execute(new File(test_data +
> "/blast/query/query"));
>
> InputStream is = sr.getResultStream();
>
> It's seems to work okay on linux, I haven't tested it on windows.
>
> There's a little bit of JavaDoc I started work on but it's a little bit
> messed up from where I've been changing things around.
>
> The source/jar/doc are all here. There's test cases too.
>
> http://www.students.ncl.ac.uk/michael.barton1/
>
> Mike
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>



More information about the biojava-dev mailing list