[Bioperl-guts-l] [Bug 1932] New: Bulk load GFF and GFF3 problems
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Wed Jan 18 09:42:02 EST 2006
http://bugzilla.open-bio.org/show_bug.cgi?id=1932
Summary: Bulk load GFF and GFF3 problems
Product: Bioperl
Version: 1.5 branch
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Bio::DB::GFF
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: smithav at cshl.edu
When loading a mixture of GFF and GFF3 files using "bp_bulk_load_gff.pl" and
"bp_fast_load_gff.pl", all GFF files which come after a GFF3 file fail to load
group and attributes properly. This can be fixed by reseting the $gff3 flag
for each new filehandle, as it currently is turned on for the first and all
following GFF3 files.
I've used the following patches to get around the issue:
===
Index: bulk_load_gff.PLS
===================================================================
RCS file:
/home/repository/bioperl/bioperl-live/scripts/Bio-DB-GFF/bulk_load_gff.PLS,v
retrieving revision 1.33
diff -c -r1.33 bulk_load_gff.PLS
*** bulk_load_gff.PLS 14 Sep 2005 17:00:42 -0000 1.33
--- bulk_load_gff.PLS 18 Jan 2006 14:21:44 -0000
***************
*** 365,370 ****
--- 365,371 ----
my $count;
my $fasta_sequence_id;
my $gff3;
+ my $current_file; #used to reset GFF3 flag in mix of GFF and GFF3 files
$db->preferred_groups(split (/[,\s]+/,$GROUP_TAG)) if defined $GROUP_TAG;
***************
*** 402,407 ****
--- 403,414 ----
while (<>) {
+ $current_file ||= $ARGV;
+ # reset GFF3 flag if new filehandle
+ unless($current_file eq $ARGV){
+ undef $gff3;
+ $current_file = $ARGV;
+ }
chomp;
my ($ref,$source,$method,$start,$stop,$score,$strand,$phase,$group);
===
Index: fast_load_gff.PLS
===================================================================
RCS file:
/home/repository/bioperl/bioperl-live/scripts/Bio-DB-GFF/fast_load_gff.PLS,v
retrieving revision 1.22
diff -c -r1.22 fast_load_gff.PLS
*** fast_load_gff.PLS 30 Aug 2005 16:42:42 -0000 1.22
--- fast_load_gff.PLS 18 Jan 2006 14:22:05 -0000
***************
*** 260,266 ****
print STDERR "Fast loading enabled\n" if $DO_FAST;
! my ($count,$gff3,$last,$start,$beginning);
$last = Time::HiRes::time() if $timer;
$beginning = $start = $last;
--- 260,266 ----
print STDERR "Fast loading enabled\n" if $DO_FAST;
! my ($count,$gff3,$last,$start,$beginning, $current);
$last = Time::HiRes::time() if $timer;
$beginning = $start = $last;
***************
*** 272,277 ****
--- 272,283 ----
}
while (<>) {
+ $current ||= $ARGV;
+ # reset GFF3 flag if new filehandle
+ unless($current eq $ARGV){
+ undef $gff3;
+ $current = $ARGV;
+ }
chomp;
my ($ref,$source,$method,$start,$stop,$score,$strand,$phase,$group);
===
-albert
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Bioperl-guts-l
mailing list