[Bioperl-l] printing UnivAlgn

Murad Nayal murad@godel.bioc.columbia.edu
Sun, 17 Dec 2000 03:58:35 +0100


Peter Schattner wrote:
> 
> Hi Murad
> 
> First let me ditto Ewan?s comments - I think it?s great that you?re
> jumping in to the SimpleAlign - UnivAln "jungle".  Combining these two
> modules into a single alignment object would be very desirable - and
> probably not that difficult.  It simply hasn?t been where my interests
> have been lately - so I am glad to see someone else taking up the challenge.
> 
> I do agree with Ewan that it probably would be better to add UnivAln
> functionality to SimpleAlign than the other way around.  My only other
> suggestion is that if you are planning major change(s) to SimpleAlign.pm
> and/or AlignIO.pm, you first post a summary of what you plan to change
> to the Bioperl list, so you can get feedback on the possible
> implications of such changes before you get too deeply involved in coding.
> 
> Welcome aboard.
> 
> --- Peter


Thank you Peter. There are a couple of applications that I want to code
using bioperl. I will probably wait till the completion of this work
before I suggest major changes. I am thinking that that this experience
will probably be a good source of ideas as to what additional facilities
might be useful in 'the' Alignment object. I will certainly post the
propositions to the list before I start hacking away.

I kind of was wondering about the bioperl coding style (these questions
did not seem to be answered in the docs).

-it seems people like the C++ over the java style in naming functions.
i.e. function name words are small letter throughout and separated by an
underscore. but this is not universally true in bioperl code. I really
like the 'java' style where you capitalize the first letter of every
word (except the first) and no underscore. is there a 'bioperl' standard
in this regard?

-what seems to be very consistent style in bioperl is the use of a dual
purpose accessor/mutator function that have the same name as the
associated property. The issue that I have with this approach is that
you are spending runtime resources to resolve something (whether the
function was used as an accessor or a mutator) that was well defined at
compile time. as a result I prefer usually to use separate
accessor/mutator functions i.e. getProperty() and setProperty(). (again,
the java influence). I know it is more of a hassle to write two
functions instead of one, but still.

-functions that return a set of objects are named using differing
conventions in bioperl. one convention that I like is for a function
that say returns a set of alignments is just to be named getAlignments()
as opposed to names like each_alignment() which I have found confusing
since it sounds like representing an internal iterator that you have to
call repeatedly to iterate through the sequence (similar to the each
keyword in perl).


anyway, just random thoughts trying to get clear about the 'style
biases' of the group.

Regards,

Murad Nayal