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

bug fix (from Marc Lamarine): returned Bio::Seq display_id was not set...

bug fix (from Marc Lamarine): returned Bio::Seq display_id was not set consistantly by Exon::seq method
parent 7374c70a
No related branches found
No related tags found
No related merge requests found
......@@ -733,7 +733,7 @@ sub peptide {
Arg [1] : none
Example : my $seq_str = $exon->seq->seq;
Description: Retrieves the dna sequence of this Exon.
Description: Retrieves the dna sequence of this Exon.
Returned in a Bio::Seq object. Note that the sequence may
include UTRs (or even be entirely UTR).
Returntype : Bio::Seq
......@@ -751,23 +751,21 @@ sub seq {
$self->{'_seq_cache'} = $arg->seq();
}
if( defined $self->{'_seq_cache'} ) {
return Bio::Seq->new(-seq=> $self->{'_seq_cache'});
}
my $seq;
if(!defined($self->{'_seq_cache'})) {
my $seq;
if ( ! defined $self->slice ) {
warning(" this exon doesn't have a slice you won't get a seq \n");
return undef;
} else {
$seq = $self->slice()->subseq($self->start, $self->end, $self->strand);
if ( ! defined $self->slice ) {
warning(" this exon doesn't have a slice you won't get a seq \n");
return undef;
} else {
$seq = $self->slice()->subseq($self->start, $self->end, $self->strand);
}
$self->{'_seq_cache'} = $seq;
}
$self->{'_seq_cache'} = $seq;
return Bio::Seq->new(-seq => $self->{'_seq_cache'},
-id => $self->stable_id,
-moltype => 'dna');
-moltype => 'dna');
}
......
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