[Biojava-l] BioGroovy

Mark Schreiber markjschreiber at gmail.com
Sun Aug 17 03:16:55 UTC 2008


> This brings up another question, if we're leveraging libraries other
> than BioJava does it make sense to post the BioGroovy cookbooks on the
> BioJava site?
>

Sure. Maybe put them in their own section but they should go into the
BioJava cookbook.

> Also, as Andy intimated though, there is probably going to be a point
> where standard Groovy things (like Builders) aren't available in
> BioJava.  When those things happen, some decision will need to be made
> as to whether the Builder should be implemented in Java or in Groovy.
> My tendency would be to make it available in BioJava (or BioJavaX),
> which would let others leverage the simplified syntax not only in Java
> but in scripting languages (such as JRuby and Jython) as well.
>

I think in future versions of BioJava that Groovy could be
incorporated. Java and groovy are very complementary so there is no
real reason not to. I wouldn't be too surprised if Groovy got absorbed
into the JDK at some point.

> As for performance, when you use the Eclipse Groovy plugin in
> automatically compiles the Groovy script to Java bytecode, so I
> haven't really noticed any difference in speed -- although most of
> what I've tried hasn't been computationally challenging either.

Yes. This helps in many cases. It also helps (for compiled
applications) if you define types where you can. This means the
runtime doesn't have to do so much introspection.

- Mark

>
> Mark
>
> On Sat, Aug 16, 2008 at 3:11 AM, Mark Schreiber
> <markjschreiber at gmail.com> wrote:
> > 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
> >
> >
>
>
>
> --
> 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