Bioperl: RangeI strand questions
Matthew Pocock
mrp@sanger.ac.uk
Thu, 25 May 2000 14:57:39 +0100
Steve,
Steve Chervitz wrote:
> Matt,
>
> In RangeI.pm, the union and intersection methods were both always
> returning 0 for the strand. Why is this? It seems better to preserve
> strand information if the ranges being compared are on the same strand
> and return 0 only if this isn't the case. Is there any code that
> depends on the current behavior?
There are no dependancies that I am aware of. Fixing this would be a GOOD
thing. I sudgest writing a function like _testStrand called _combineStrand
that is invoked as:
$self->_combineStrand($other, $so)
and does the apropreate combining based upon the strand option string.
>
>
> There were several calls to _testStrand that didn't include both
> arguments (the other range and the strand option string). Was this
> deliberate?
>
No - my mistake. e.g. intersection should contain:
return unless $self->_testStrand($other, $so);
I guess this code never got tested thoroughly. I was always a bit hazey
about including strand info with the range, so didn't have a very clear
idea how the API was supposed to behave. Oops.
>
> Last item: The way union is set up, you can't supply a strand option
> argument. If you instead specify that the range list be passed in as a
> reference, then users could include a strand option argument:
>
> Bio::RangeI->union(\@ranges, 'strong');
>
> What do you think?
>
Looks fine to me. I guess pass-by-reference is always a good thing -
easier on the memory, and lets you pass in more than just a single list.
Since I now use Java day-to-day, would somebody else like to look after
this module? I don't think that I can provide an apropreate level of
support.
All the best,
Matthew
>
> Steve
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://bio.perl.org/
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
> ====================================================================
--
Joon: You're out of your tree
Sam: It wasn't my tree
(Benny & Joon)
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================