[Biojava-dev] Local binary execution
Michael Barton
michael.barton1 at ncl.ac.uk
Thu Jun 9 08:27:48 EDT 2005
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
More information about the biojava-dev
mailing list