Skip to content
Snippets Groups Projects
Commit f3591508 authored by Graham McVicker's avatar Graham McVicker
Browse files

seq_region_start|end could have returned undef inappropraitely when one (but...

seq_region_start|end could have returned undef inappropraitely when one (but not both) of the features end|start was undefined
parent 8b636940
No related branches found
No related tags found
No related merge requests found
......@@ -708,12 +708,12 @@ sub seq_region_start {
my $slice = $self->{'slice'};
return undef if(!$slice);
return undef if(!defined($self->{'start'}));
return undef if(!defined($self->{'end'}));
if($slice->strand == 1) {
return undef if(!defined($self->{'start'}));
return $slice->start() + $self->{'start'} - 1;
} else {
return undef if(!defined($self->{'end'}));
return $slice->end() - $self->{'end'} + 1;
}
}
......@@ -724,7 +724,7 @@ sub seq_region_start {
Arg [1] : none
Example : print $feature->seq_region_end();
Description: Convenience method which returns the absolute end of this
feature on the seq_region, as opposed to the relative (slice)
feature on the seq_region, as opposed to the relative (slice)
position.
Returns undef if this feature is not on a slice.
......@@ -739,12 +739,12 @@ sub seq_region_end {
my $slice = $self->{'slice'};
return undef if(!$slice);
return undef if(!defined($self->{'start'}));
return undef if(!defined($self->{'end'}));
if($slice->strand == 1) {
return undef if(!defined($self->{'end'}));
return $slice->start() + $self->{'end'} - 1;
} else {
return undef if(!defined($self->{'start'}));
return $slice->end() - $self->{'start'} + 1;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment