[Bioperl-l] Small bug in Bio::Tools::GFF.pm - Target output

Don Gilbert gilbertd at cricket.bio.indiana.edu
Thu Apr 19 13:38:05 EDT 2007


I'm not sure what kind of test data would have bad Target strings,
but this should clear up those warnings -- insert the '+' line:

  sub _gff3_string:
    for my $tag ( @all_tags ) {
       ##dgg.patch.was# next if $tag eq 'Target';
      if ($tag eq 'Target'
         and ! $origfeat->isa('Bio::SeqFeature::FeaturePair'))
       {  
       my($target_id, $b,$e,$strand)= $feat->get_tag_values($tag); 
+       next unless(defined($e) && defined($b) && $target_id);
       ($b,$e)= ($e,$b) if(defined $strand && $strand<0);
       $target_id =~ s/([\t\n\r%&\=;,])/sprintf("%%%X",ord($1))/ge;    
       push @groups, sprintf("Target=%s %d %d", $target_id,$b,$e);
       next;
       }

-- Don


More information about the Bioperl-l mailing list