[Biojava-dev] Local binary execution

Michael Heuer heuermh at acm.org
Wed Jun 15 15:51:06 EDT 2005


I guess I would like to see something like the following:

A synchronous (blocking) and asynchronous (event-based) interface
extending Runnable for each executable

Implementations of these interfaces using ProcessBuilder or commons-exec
or whatever to call local executables

A local executable registry & configuration mechanism

Implementations of these interfaces calling web services versions of these
executables (e.g. http://rt.bioteam.net:8080/metadot/index.pl?iid=2307)

Implementations of these interfaces calling web forms and web-scraping the
result pages (e.g. bioperl Bio::Tools::Run::RemoteBlast)

Implementations of these interfaces using BioMoby/Semantic Moby/insert
your favorite technology du jour here/etc.

Hopefully someone from the myGRID/taverna/SOAPLAB folks or elsewhere will
respond to this email and tell me that it's been done already and this is
where I should go to check it out from cvs/svn...  :)

   michael


On Tue, 14 Jun 2005, Michael Barton wrote:

> I had a look at the post you were refering to. In terms of the ant
> support for local binary execution I think it is very similar to the
> newly implemented ProcessBuilder in Java 1.5.
> This class has a similar way way of adding command line arguments to
> that of ant <exec>.
>
> The classes I'm suggesting have an enum of arguments specific to the
> application which may convienient for suppling different switch/argument
> pairs, as it it means that only arguments for which the binary allows
> can be supplied.
> Any errors should therefore come from incorrent argument values rather
> than incorrect arguments. If that makes sense.
> In addition the class throws an exception if the essential arguments
> required to run the search are not supplied.
>
> This means however that the classes are written in Java 1.5. Would this
> be a problem?
>
>
> On Thu, 2005-06-09 at 11:54 -0400, Michael Heuer wrote:
> > 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
> > >
> >
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>



More information about the biojava-dev mailing list