[Bioperl-l] [Gmod-gbrowse] plugin Aligner.pm and MySQL syntax
Dave Clements, GMOD Help Desk
gmodhelp at googlemail.com
Wed Jul 22 19:58:17 EDT 2009
Hi Davide,
On my version of SeqFeature/Store/DBI/mysql.pm, the problem query is:
# if no other criteria are specified, then
# only fetch indexed (i.e. top level objects)
@where = 'indexed=1' unless @where;
my $from = join ', ', at from;
my $where = join ' AND ',map {"($_)"} @where;
my $group = join ', ', at group;
$group = "GROUP BY $group" if @group;
my $query = <<END;
SELECT f.id,f.object,f.typeid,f.seqid,f.start,f.end,f.strand
FROM $from
WHERE $where
$group
END
$self->_print_query($query, at args) if DEBUG || $self->debug;
my $sth = $self->_prepare($query);
$sth->execute(@args) or $self->throw($sth->errstr);
Which looks OK to me. However, $from, $where and $group are set in many
places upstream, and that is where the extra comma (or missing field name)
is, I think.
I don't see how this can be a user-caused problem. My guess is that this is
a problem in SeqFeature, rather than in GBrowse per se, so I'm going to also
add BioPerl to this thread (and maybe someone there will send it back :-).
Dave C.
On Mon, Jul 20, 2009 at 6:11 AM, Davide Rambaldi CNR <
davide.rambaldi at itb.cnr.it> wrote:
> Hi, I have a server with an instance of gbrowse version 1.69 (with MySQL
> DBI adaptor)
>
> I have decided to add the plugin Aligner.pm and I have as result an
> empty page and this EXCEPTION:
>
> -------------------- EXCEPTION --------------------, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
> MSG: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near '), referer: http://155.253.41.215/cgi-bin/gbrowse/charcot/
>
> )' at line 12, referer: http://155.253.41.215/cgi-bin/gbrowse/charcot/
>
> STACK Bio::DB::SeqFeature::Store::DBI::mysql::_features
> /usr/local/share/perl/5.10.0/Bio/DB/SeqFeature/Store/DBI/mysql.pm:851,
> referer: http://155.253.41.215/cgi-bin/gbrowse/charcot/
> STACK Bio::DB::SeqFeature::Store::features
> /usr/local/share/perl/5.10.0/Bio/DB/SeqFeature/Store.pm:1067, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
> STACK Bio::DB::SeqFeature::Segment::features
> /usr/local/share/perl/5.10.0/Bio/DB/SeqFeature/Segment.pm:201, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
> STACK Bio::Graphics::Browser::Plugin::Aligner::dump
> /etc/apache2/gbrowse.conf/plugins/Aligner.pm:159, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
> STACK main::do_plugin_dump /usr/lib/cgi-bin/gbrowse:3439, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
> STACK toplevel /usr/lib/cgi-bin/gbrowse:237, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
> -------------------------------------------, referer:
> http://155.253.41.215/cgi-bin/gbrowse/charcot/
>
>
> Seems that the query to MySQL have a syntax error... any solution
> avaliable for this bug?
>
> Thanks
>
> Davide R
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Gmod-gbrowse mailing list
> Gmod-gbrowse at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
>
--
* Register now for the August GMOD Meeting:
http://gmod.org/wiki/August_2009_GMOD_Meeting
* Please keep responses on the list!
* Was this helpful? Let us know at http://gmod.org/wiki/Help_Desk_Feedback
More information about the Bioperl-l
mailing list