From 24d38fdb326435cef42bebe5d834bbb580a02d55 Mon Sep 17 00:00:00 2001 From: Magali Ruffier <mr6@ebi.ac.uk> Date: Mon, 15 Dec 2014 16:19:59 +0000 Subject: [PATCH] ENSCORESW-1127: TSL and gencode_basic tags added to gtf dumps as per gencode specifications --- modules/Bio/EnsEMBL/Utils/IO/GTFSerializer.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/Bio/EnsEMBL/Utils/IO/GTFSerializer.pm b/modules/Bio/EnsEMBL/Utils/IO/GTFSerializer.pm index ff91f892a7..0ba0816ac6 100644 --- a/modules/Bio/EnsEMBL/Utils/IO/GTFSerializer.pm +++ b/modules/Bio/EnsEMBL/Utils/IO/GTFSerializer.pm @@ -439,12 +439,20 @@ sub _print_attribs { } if($transcript && $transcript->isa('Bio::EnsEMBL::Transcript')) { - foreach my $tag (qw/cds_end_NF cds_start_NF mRNA_end_NF mRNA_start_NF/) { + foreach my $tag (qw/cds_end_NF cds_start_NF mRNA_end_NF mRNA_start_NF gencode_basic/) { my $attributes = $transcript->get_all_Attributes($tag); if(@{$attributes}) { - print $fh qq{ tag "${tag}";}; + my $value = $tag; + $value = "basic" if $tag eq "gencode_basic"; + print $fh qq{ tag "${value}";}; } } + my $attributes = $transcript->get_all_Attributes("TSL"); + if (@{$attributes}) { + my $value = $attributes->[0]->value; + $value =~ s/tsl//; + print $fh qq{ transcript_support_level "${value}";}; + } } return; -- GitLab