Skip Menu |

This queue is for tickets about the bioperl CPAN distribution.

Report information
The Basics
Id: 103272
Status: resolved
Priority: 0/
Queue: bioperl

People
Owner: Nobody in particular
Requestors: Joshua.Fortriede [...] cchmc.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Typename.pm Bug: method:source doesnt allow period character
Date: Thu, 2 Apr 2015 14:31:55 +0000
To: "bug-bioperl [...] rt.cpan.org" <bug-bioperl [...] rt.cpan.org>
From: "Fortriede, Joshua (Joshua Fortriede)" <Joshua.Fortriede [...] cchmc.org>
Dear BioPerl Authors, I have been working on removing features from our GBrowse database using the built in bp_seqFeature_delete.pl script that comes with the GBrowse installation. While trying to remove certain features based on -type, I noticed that some "types" were not having features returned. After many trials and errors, I determined that any feature associated with a typelist that contained a decimal point (".") were not being returned. I traced this to the mysql.pm module, and did a printout of the SQL query that is sent to return the list of features. perl -X bp_seqfeature_delete.pl -d xl7_1 -type '*UNIGENE*' --dryrun -u *** -p **** SELECT f.id,f.object,f.typeid,f.seqid,f.start,f.end,f.strand FROM feature as f, typelist AS tl WHERE ( tl.id=f.typeid AND ( tl.tag LIKE 'EST_match:XL_7.1_UNIGENE:%' OR tl.tag LIKE 'EST_match:XL_7.1_UNIGENE_1:%' OR tl.tag='EST_match:XL_UNIGENE' OR tl.tag LIKE 'exon:XL_7.1_UNIGENE:%' OR tl.tag LIKE 'exon:XL_7.1_UNIGENE_1:%' OR tl.tag='exon:XL_UNIGENE') ) Any typelist that has a decimal in it has ":" appended to the end. This lead me to go to the Typename module, where I found the following code: sub new { my $package = shift; my ($method,$source) = @_; $method ||= ''; $source ||= ''; if ($source eq '' && $method =~ /^([\w-]+):([\w-]*)$/) { $method = $1; $source = $2; } return $OBJECT_CACHE{"$method:$source"} ||= bless [$method,$source],$package; } Here, the method/source are being parsed on Alphanumeric or underscores only. If the regular expression was /^([\w-\.]+):([\w-\.]*)$/ then decimals would be allowed also. When I make this modification locally and run the script again, I can see the features associated with the typelists that have decimals in them. Please let me know if there is any other information that you need from me. Thank you. Joshua Fortriede, MS Xenbase Curator Xenbase Gene Nomenclature Administrator Cincinnati Children's Research Foundation 3333 Burnet Avenue, S3.609 Cincinnati, Ohio 45229-3039 Joshua.Fortriede@cchmc.org<mailto:Joshua.Fortriede@cchmc.org> 513-803-5379 www.xenbase.org<http://www.xenbase.org/>
I added the change and saw no obvious errors with tests, so have gone ahead and added it for the next release. Thanks for pointing this out! On Thu Apr 02 09:32:14 2015, Joshua.Fortriede@cchmc.org wrote: Show quoted text
> Dear BioPerl Authors, > > I have been working on removing features from our GBrowse database > using the built in bp_seqFeature_delete.pl script that comes with the > GBrowse installation. While trying to remove certain features based > on -type, I noticed that some "types" were not having features > returned. After many trials and errors, I determined that any feature > associated with a typelist that contained a decimal point (".") were > not being returned. > > I traced this to the mysql.pm module, and did a printout of the SQL > query that is sent to return the list of features. > > perl -X bp_seqfeature_delete.pl -d xl7_1 -type '*UNIGENE*' --dryrun -u > *** -p **** > > SELECT f.id,f.object,f.typeid,f.seqid,f.start,f.end,f.strand > FROM feature as f, typelist AS tl > WHERE ( tl.id=f.typeid > AND ( > tl.tag LIKE 'EST_match:XL_7.1_UNIGENE:%' OR > tl.tag LIKE 'EST_match:XL_7.1_UNIGENE_1:%' OR > tl.tag='EST_match:XL_UNIGENE' OR > tl.tag LIKE 'exon:XL_7.1_UNIGENE:%' OR > tl.tag LIKE 'exon:XL_7.1_UNIGENE_1:%' OR > tl.tag='exon:XL_UNIGENE') > ) > > Any typelist that has a decimal in it has ":" appended to the end. > This lead me to go to the Typename module, where I found the following > code: > > > sub new { > my $package = shift; > my ($method,$source) = @_; > $method ||= ''; > $source ||= ''; > if ($source eq '' && $method =~ /^([\w-]+):([\w-]*)$/) { > $method = $1; > $source = $2; > } > return $OBJECT_CACHE{"$method:$source"} ||= bless > [$method,$source],$package; > } > > Here, the method/source are being parsed on Alphanumeric or > underscores only. If the regular expression was /^([\w-\.]+):([\w- > \.]*)$/ then decimals would be allowed also. When I make this > modification locally and run the script again, I can see the features > associated with the typelists that have decimals in them. > > Please let me know if there is any other information that you need > from me. Thank you. > > Joshua Fortriede, MS > Xenbase Curator > Xenbase Gene Nomenclature Administrator > Cincinnati Children's Research Foundation > 3333 Burnet Avenue, S3.609 > Cincinnati, Ohio 45229-3039 > > Joshua.Fortriede@cchmc.org<mailto:Joshua.Fortriede@cchmc.org> > 513-803-5379 > > www.xenbase.org<http://www.xenbase.org/>