From 8cea343db2a820b618e0bb9a43d7f833eaca462b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Wed, 19 Oct 2011 16:27:34 +0000 Subject: [PATCH] Allow TinyTranscript to have biotype. --- modules/Bio/EnsEMBL/IdMapping/Cache.pm | 3 ++- modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/IdMapping/Cache.pm b/modules/Bio/EnsEMBL/IdMapping/Cache.pm index bdcb08f759..8a4ef78f96 100644 --- a/modules/Bio/EnsEMBL/IdMapping/Cache.pm +++ b/modules/Bio/EnsEMBL/IdMapping/Cache.pm @@ -320,8 +320,9 @@ sub build_cache_from_genes { $tr->modified_date, $tr->start, $tr->end, $tr->strand, $tr->length, md5_hex( $tr->spliced_seq ), - ( $tr->is_known ? 1 : 0 ), ] ); + ( $tr->is_known ? 1 : 0 ) ] ); + $ltr->biotype( $tr->biotype() ); $lgene->add_Transcript($ltr); # build transcript caches diff --git a/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm b/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm index e78273b700..9c3c24691c 100644 --- a/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm +++ b/modules/Bio/EnsEMBL/IdMapping/TinyTranscript.pm @@ -71,6 +71,7 @@ package Bio::EnsEMBL::IdMapping::TinyTranscript; # 10 is_known # 11 translation # 12 [exons] +# 13 biotype use strict; @@ -287,6 +288,12 @@ sub get_all_Exons { return $_[0]->[12] || []; } +sub biotype { + my $self = shift; + $self->[13] = shift if (@_); + return $self->[13]; +} + 1; -- GitLab