[Bioperl-l] SeqFeature->_expand_region
Hilmar Lapp
hlapp at gnf.org
Wed Jul 2 20:36:10 EDT 2003
On Wednesday, July 2, 2003, at 03:44 PM, Chris Mungall wrote:
> Or maybe the return value for Location::Atomic should be changed
>
> # let's go ahead and force to '0' if
> # we are requesting the strand without it
> # having been set previously
> return $self->{'_strand'} || 0;
>
I think here is where the offender sits. '0' is defined as 'set to
unknown', whereas not set is not set.
The expand-logic presently says that adding sub-features can't change
the knowledge about the strand if there are no coordinates set;
otherwise (if there are coordinates set) defer that decision to the
union() implementation.
So, I'd actually argue that if there has been no prior attempt to set
the strand, the first added subfeature with a strand is allowed to
promote its knowledge to the container. This is what this piece of code
does:
if((! defined($self->start())) && (! defined $self->end())) {
$self->start($feat->start());
$self->end($feat->end());
$self->strand($feat->strand) unless defined($self->strand());
My $0.02.
-hilmar
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------
More information about the Bioperl-l
mailing list