Skip to content
Snippets Groups Projects
Commit bac4579b authored by Web Admin's avatar Web Admin
Browse files

better handlers archive stable ids

parent 7879f0e8
No related merge requests found
......@@ -222,16 +222,18 @@ sub get_translation_archive_id {
my $self = shift;
if( $self->type() eq "Transcript" ) {
return [$self->adaptor->fetch_by_transcript_archive_id( $self )];
my $T = $self->adaptor->fetch_by_transcript_archive_id( $self );
return $T ? [$T] : [];
} elsif( $self->type() eq "Gene" ) {
my $transcripts = $self->adaptor->fetch_all_by_gene_archive_id( $self );
my @peptides ;
for (@$transcripts) {
push @peptides , $self->adaptor->fetch_by_transcript_archive_id( $_ );
}
return \@peptides;
my @peptides ;
for (@$transcripts) {
my $T = $self->adaptor->fetch_by_transcript_archive_id( $_ );
push @peptides, $T if $T;
}
return \@peptides;
} else {
return undef;
return [$self];
}
}
......
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