[BioRuby] Bioruby design

Pjotr Prins pjotr.public14 at thebird.nl
Mon Jan 4 15:04:59 UTC 2010


On Mon, Jan 04, 2010 at 09:33:20PM +0900, Tomoaki NISHIYAMA wrote:
> These are short enought, since we have to write something like
> "PAML ver XXX (Yang, XX) was used for XX" and "KEGG (Kanehisa, XXX)"...
> in the manuscript of the paper if we use that module.
> Stating their use explicitly in the first lines of the
> program is considered good.

Uhm. I think that is a bit far fetched. The way you propose it is
that you would have to load the name space every time you use
something in code:

  require 'bio'

  include Bio::PAML
  include Bio::Kegg
  include ...
  
  do something

next source file, the same. And again:

  require 'bio'

  include Bio::PAML
  include Bio::Kegg
  include ...
  
  do something

This is the philosophy of Python - where every source file explicitly
loads all modules/name spaces.

It is arguably 'clear'. But ugly. And, takes the fun out of
programming (anyone mention that?).

Only once I have used the Python name spacing with good effect. It was
when we plugged in a replacement module - completely rewritten. That
was changing one line only - and it worked :-). In Python you can say

  import Paml as paml

it became

  import Paml2 as paml

That was nice. But whan you see Python source files, the header is
ugly, and wastes a lot of typing. See for example:

  http://pypi.python.org/pypi/zope.sqlalchemy#example

I argue not to state imports. import Bio should be part of 

  require 'bio'

Anyway, we will have time to talk in Tokyo, I hope. 

Pj.


P.S. Do you have an example of anyone quoting a Bioruby module in a
paper?




More information about the BioRuby mailing list