bioperl / bioperl-live-redmine

Legacy tickets migrated from the OBF Redmine issue tracker: http://redmine.open-bio.org
0 stars 0 forks source link

Bio::Tools::GFF, Target Tag disappears when editing a gff3 file #65

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: Fred empty (Fred empty) Original Redmine Issue: 2953, https://redmine.open-bio.org/issues/2953 Original Date: 2009-11-25 Original Assignee: Bioperl Guts


When using Bio::Tools::GFF for editing a GFF3 file, the edited file does not hold anymore Target tags !

($Id: GFF.pm 16330 2009-11-04 16:53:24Z)

cjfields commented 8 years ago

Original Redmine Comment Author Name: Fred empty Original Date: 2009-11-25T08:25:52Z


Created an attachment (id=1403) Blast sample file

Please find here a Blast sample file.

cjfields commented 8 years ago

Original Redmine Comment Author Name: Fred empty Original Date: 2009-11-25T08:27:29Z


I work with a sample Blast file (see attachment)

I make the original gff file : bp_search2gff.pl -v 3 -t query -i dcr1_sp.WUBLASTP -target -m -method match_part -o dcr1_sp.WUBLASTP.gff3

And then i try to add a new Tag : test.pl dcr1_sp.WUBLASTP.gff3

I use this sample code (test.pl) :

!/usr/local/bin/perl -w

use strict; use diagnostics; use warnings;

use Bio::Tools::GFF;

my $fileGFF3 = $ARGV[0];

my $in = new Bio::Tools::GFF( -gff_version => 3, -file => “$fileGFF3” ); my $out = new Bio::Tools::GFF( -gff_version => 3, -file => “>$fileGFF3.out” ); while ( my $seqfeature = $in->next_feature() ) {

if ( $seqfeature->primary_tag eq ‘match’ ) { $seqfeature->add_tag_value( ‘myNewTag’, “ValueOfMyNewTag” ); $out->write_feature($seqfeature);

} else { $out->write_feature($seqfeature); } } $out->close; exit;

cjfields commented 8 years ago

Original Redmine Comment Author Name: Fred empty Original Date: 2009-11-25T08:35:05Z


Bug 2952 has been marked as a duplicate of this bug.