[Biojava-l] BioGroovy

Mark Schreiber markjschreiber at gmail.com
Sat Aug 16 10:11:35 UTC 2008


 Hi -

There are really 2 approaches you could take with Groovy. One would be to
write and entire API. This would be a "BioGroovy". The other approach would
be to use the BioJava API and use Groovy to string together the BioJava
objects to write the programs.  I tend to think the second is usually the
better option for dynamic languages like Groovy.  If you go for the second
option the BioJava cookbook would be a suitable place for examples.
Actually using Groovy to make programs with the BioJava library could smooth
the learning curve of BioJava a little.

It's worth being mindful of the performance of Groovy at this stage. While
this will undoubtably improve with future versions you can currently expect
Groovy code to run about 10x slower than Java so it might not be good to
implement any kind of sequence alignment or HMM algorithm in Groovy.

- Mark

On Fri, Aug 15, 2008 at 11:49 PM, Mark Fortner <phidias51 at gmail.com> wrote:

> Hi Andy,
> The builders and closures definitely make it easier to use and cut
> down on the verbosity of the language. You also have built-in support
> for CLI, and can leverage libraries like ORO for regular expression
> handling.   The XmlSlurper makes it easier to handle downloading and
> parsing XML.
>
> I created a roadmap for a series of blog articles on various common
> bioinformatics-related tasks.  I started out with a couple of quick
> entries on using NCBI's EUtils with Groovy.  If there's some interest,
> I'll see about posting the roadmap on a wiki somewhere (along with
> some of the "recipes" that I've written).  Anyone who's interested
> could then contribute their own "recipes" to it.
>
> I'm just getting started with Grails.  My initial thought was to
> identify the BioSQL objects  (i.e. SimpleNamespace, SimpleNCBITaxon,
> SimpleBioEntry, etc) as domain objects and have the grails ant script
> handle generating the gui and persistence stacks for them (perhaps
> using Derby).
>
> This might be overly-simplistic, but I'm looking for ways to make
> biojavax, and biosql more easily accessible.
>
> Mark
>
> On Fri, Aug 15, 2008 at 1:55 AM, Andy Yates <ayates at ebi.ac.uk> wrote:
> > Hi Mark,
> >
> > There has been talk in the past about a groovier version of BioJava or at
> > the very least showing where Groovy can help to reduce the verbosity of
> some
> > parts of the biojava framework. I've done a tiny bit but my work has only
> > been into prototyping Java code & quickly asserting some assumptions I
> had
> > about BioJava (as in how the framework works).
> >
> > What would be a brilliant step in a Groovier BioJava is to start levering
> > the builders (http://groovy.codehaus.org/Builders). I mean imagine being
> > able to write something like:
> >
> > def myReferences = getReferences();
> >
> > new EmblBuilder().build {
> >        id('U00096')
> >        myReferences.each{ ref ->
> >                reference {
> >                        //
> >                }
> >        }
> > }
> >
> > I admit it's not a fully formed idea at the moment but hopefully you can
> see
> > where I'm going with this :)
> >
> > WRT Grails; our supported BioSQL API is written in Hibernate; just the
> same
> > as GORM (Grails' ORM solution). So technically I cannot see a reason why
> it
> > wouldn't be possible; my only wonder is how Grails controls transaction
> > boundaries and translating this to our BioSQL.
> >
> > Andy
> >
> > Mark Fortner wrote:
> >>
> >> I've been using the biojava library with groovy lately and I ran
> >> across the BioGroovy.org site.  The site seems to be a placeholder and
> >> doesn't really have much information on it.  I was wondering if it was
> >> an official Bio* site?  Has anyone else been using Groovy (or any
> >> other scripting languages) with BioJava?
> >>
> >> Also has anyone looked at using Grails with BioSQL?  It would seem
> >> like an easy way to get something started quickly.
> >>
> >> Regards,
> >>
> >
>
>
>
> --
> Mark Fortner
>
> blog: http://feeds.feedburner.com/jroller/ideafactory
> _______________________________________________
>  Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>



More information about the Biojava-l mailing list