[Bioperl-guts-l] [14440] bioperl-live/trunk/Bio/SeqIO/genbank.pm: fixing the missing space between the feature type name and the location when the type name is longer than 15 char .

Scott Cain scain at dev.open-bio.org
Tue Jan 15 21:46:08 EST 2008


Revision: 14440
Author:   scain
Date:     2008-01-15 21:46:08 -0500 (Tue, 15 Jan 2008)

Log Message:
-----------
fixing the missing space between the feature type name and the location when the type name is longer than 15 char.

Modified Paths:
--------------
    bioperl-live/trunk/Bio/SeqIO/genbank.pm

Modified: bioperl-live/trunk/Bio/SeqIO/genbank.pm
===================================================================
--- bioperl-live/trunk/Bio/SeqIO/genbank.pm	2008-01-15 21:56:48 UTC (rev 14439)
+++ bioperl-live/trunk/Bio/SeqIO/genbank.pm	2008-01-16 02:46:08 UTC (rev 14440)
@@ -1053,7 +1053,8 @@
     if( ! ref $fth || ! $fth->isa('Bio::SeqIO::FTHelper') ) {
 	$fth->warn("$fth is not a FTHelper class. Attempting to print, but there could be tears!");
     }
-    $self->_write_line_GenBank_regex(sprintf("     %-16s",$fth->key),
+    my $spacer = (length $fth->key >= 15) ? ' ' : '';
+    $self->_write_line_GenBank_regex(sprintf("     %-16s%s",$fth->key,$spacer),
 				     " "x21,
 				     $fth->loc,"\,\|\$",80);
     foreach my $tag ( keys %{$fth->field} ) {




More information about the Bioperl-guts-l mailing list