Open cjfields opened 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.
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) :
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;
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.
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)