[Bioperl-l] Bio::Tree development
Sendu Bala
bix at sendu.me.uk
Fri Jan 19 19:18:17 UTC 2007
Johan Viklund wrote:
> Hi,
>
> I've started using Bio::Tree{,IO} and would very much like to update
> it (it was I who filed bug 2191
> <http://bugzilla.open-bio.org/show_bug.cgi?id=2191>).
>
> I have listed below the main issues I think should be addressed,
> (there might be more). I just thought I could get some
> comments/suggestions on this, and if you're happy with this I could
> start working on it. Shouldn't take so long time.
>
>
> == Bugs (or what I think is bugs) ==
>
> * Spelling of Descendent.
> I think old (misspelled) names should be reatained for
> backwards-compability, but they should be aliases. Or the old methods
> can be kept and they delegate to the new ones with a warning (I've
> seen this in other places of BioPerl).
This came up before; its an alternate spelling found in dictionaries, so
isn't a bug. But by all means add aliases for the more common spelling.
> == Some minor bugs ==
>
> * Node->Id (minor bug)
> For some reason the Id gets set to the bootstrap value for internal
> nodes, I find this a bit annoying. I think that the internal_id would
> be better.
Where does this come up? If only with certain TreeIO input formats,
that's probably because the id field was abused by making it the
bootstrap and/or Bioperl has no way of distinguishing the bootstrap from
the id.
> * General code cleanup
> Making sure everything is indented according to some standard. I've
> seen previously that there doesn't seem to be any real standard for
> how BioPerl code should look like. I would think that it would be a
> lot clearer to understand lots of the code if it was indented
> properly. As it is now, the indentation depth changes between 2,3 and
> 4 within the same file even.
My own personal preference is an indent of 4 spaces.
> * get_Descendents()
> Undocumented and works, I thought it was each_Descendent()-like, but
> it was an alias for get_all_Descendents(), highly confusing. Should at
> least be documented, maybe it's an old remnant...
Please document it :)
> * Naming convensions in BioPerl
> What are they, sometimes methods look_like_this() ans sometimes they
> look_like_This(), what's the general rule for when to use capital
> letters in the beginning of a word (in Bio::Seq there's even a
> get_SeqFeatures() )? It seems like there are capital letters in a name
> when there's another BioPerl class/object involved, but I'm not sure
> (is_Leaf in Node.pm doesn't follow this).
I'd say the most common convention is all lower-case, underscores
between words. I was actually thinking of having is_leaf() a synonym of
is_Leaf, because the latter is really annoying.
Anyway, other than the points above I'd say all your ideas sound great;
code away!
More information about the Bioperl-l
mailing list