Bio::Tools::GFF [Re: [Bioperl-l] Bio::SeqFeature::Generic]

Heikki Lehvaslaiho heikki at ebi.ac.uk
Wed Oct 22 09:11:45 EDT 2003


Charles,

Your code should be fine.

I can see the extra spaces in the output by running the
following script as 'gfftest.pl |od'.

The method that needs changing is Bio::Tools::GFF::_gff2_string(), I'd
rather have feedback from GFF people first. Lincoln or someone from his
group should be able to say what is the correct way to solve this
problem.

Yours,
	-Heikki

---------------------gfftest.pl--------------------------------
use Bio::Tools::GFF;
use Bio::SeqFeature::Generic;
use Data::Dumper;

my $gffout = Bio::Tools::GFF->new(-gff_version => 2);

my $feat = new Bio::SeqFeature::Generic();
$feat->seq_id('111');
$feat->source_tag('assembly');
$feat->primary_tag('contig');
$feat->start('1');
$feat->end(123);
$feat->add_tag_value('Contig','111');
$gffout->write_feature($feat);
#print Dumper $feat;
--------------------------------------------------------

On Tue, 2003-10-21 at 18:37, Charles Hauser wrote:
> Don't know if this is a bug or a problem on my end.
> 
> Using Bio::SeqFeature::Generic to generate gff:
> 
> 	my $feat = new Bio::SeqFeature::Generic();
> 	$feat->seq_id($seq->id);
> 	$feat->source_tag('assembly');
> 	$feat->primary_tag('contig');
> 	$feat->start('1');
> 	$feat->end($seq->length);
> 	$feat->add_tag_value('Contig',$seq->id);
> 	$out->write_feature($feat);
> 
> I end up with 2 extra spaces following the group tag ('Contig
> scaffold_1') which results in gbrowse returning: ...landmark not
> recognized...
> 
> deleting these spaces makes all right with the world.
> 
> Is the problem in my code or in  Bio::SeqFeature::Generic?
> 
> Charles
> 
> 
> ______________________________________________________________________
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho    heikki_at_ebi ac uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________



More information about the Bioperl-l mailing list