[Bioperl-l] Bio::FeatureIO::gff bug?

Sendu Bala bix at sendu.me.uk
Mon Sep 24 09:35:39 UTC 2007


Hi,

I'm finding that when writing GFF files the version header line gets 
printed out twice. This is because:

sub _initialize {
   # [snip]

   if ($arg{-file} =~ /^>.*/ ) {
     $self->_print("##gff-version " . $self->version() . "\n");
   }
   else {
     my $directive;
     while(($directive = $self->_readline()) && ( $directive =~ /^##/ || 
$directive =~ /^>/)){
       $self->_handle_directive($directive);
     }
     $self->_pushback($directive);
   }

   if ($arg{-file} =~ /^>.*/ ) {
     $self->_print("##gff-version " . $self->version() . "\n");
   }

   # [snip]
}

Does it make sense for if ($arg{-file} =~ /^>.*/ ) to appear twice like 
that? If not, which one should be removed? The independent one, or the 
if/else one?


Cheers,
Sendu.



More information about the Bioperl-l mailing list