Commit f5f5a7ae authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

When creating a Bio::Seq object, always specify '-alphabet'.

parent 70a8f0fa
......@@ -1260,10 +1260,11 @@ sub peptide {
$pep_str = $tr->translate->subseq($start, $end);
}
return Bio::Seq->new(-seq => $pep_str,
-moltype => 'protein',
-alphabet => 'protein',
-id => $self->display_id);
return
Bio::Seq->new( -seq => $pep_str,
-moltype => 'protein',
-alphabet => 'protein',
-id => $self->display_id );
}
......@@ -1309,9 +1310,11 @@ sub seq {
$self->{'_seq_cache'} = $seq;
}
return Bio::Seq->new(-seq => $self->{'_seq_cache'},
-id => $self->display_id,
-moltype => 'dna');
return
Bio::Seq->new( -seq => $self->{'_seq_cache'},
-id => $self->display_id,
-moltype => 'dna',
-alphabet => 'dna' );
}
......
......@@ -277,9 +277,10 @@ sub translation {
$Xseq = "N"x$start_phase . $Xseq;
}
my $tmpSeq = new Bio::Seq( -id => $self->display_id,
-seq => $Xseq,
-moltype => "dna" );
my $tmpSeq = new Bio::Seq( -id => $self->display_id,
-seq => $Xseq,
-moltype => 'dna',
-alphabet => 'dna' );
return Bio::EnsEMBL::Translation->new
(-ADAPTOR => $pta,
......@@ -335,7 +336,10 @@ sub translate {
# if you want to have a terminal stop codon either comment this line out
# or call translatable seq directly and produce a translation from it
my $bioseq = new Bio::Seq( -id => $self->display_id, -seq => $dna, -moltype => 'dna' );
my $bioseq = new Bio::Seq( -id => $self->display_id,
-seq => $dna,
-moltype => 'dna',
-alphabet => 'dna' );
my $translation = $bioseq->translate(undef,undef,undef,$codon_table_id);
......
......@@ -1405,10 +1405,11 @@ sub five_prime_utr {
return undef if(!$seq);
return Bio::Seq->new(
-DISPLAY_ID => $self->display_id,
-MOLTYPE => 'dna',
-SEQ => $seq);
return
Bio::Seq->new( -id => $self->display_id,
-moltype => 'dna',
-alphabet => 'dna',
-seq => $seq );
}
......@@ -1439,10 +1440,11 @@ sub three_prime_utr {
return undef if(!$seq);
return Bio::Seq->new(
-DISPLAY_ID => $self->display_id,
-MOLTYPE => 'dna',
-SEQ => $seq);
return
Bio::Seq->new( -id => $self->display_id,
-moltype => 'dna',
-alphabet => 'dna',
-seq => $seq );
}
......@@ -1626,11 +1628,13 @@ sub translate {
=cut
sub seq {
my( $self ) = @_;
return Bio::Seq->new
(-DISPLAY_ID => $self->display_id,
-MOLTYPE => 'dna',
-SEQ => $self->spliced_seq);
my ($self) = @_;
return
Bio::Seq->new( -id => $self->display_id,
-moltype => 'dna',
-alphabet => 'dna',
-seq => $self->spliced_seq );
}
......
Markdown is supported
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