[Bioperl-l] Bio::GMOD::DB::Adapter is broken regards the public schema

Fields, Christopher J cjfields at illinois.edu
Wed Apr 30 16:12:20 UTC 2014


Bio::GMOD is actually part of Chado, though it uses bit of BioPerl.  Scott Cain is the primary architect IIRC; I think the list is:

    https://lists.sourceforge.net/lists/listinfo/gmod-schema

(cc’d)

chris

On Apr 30, 2014, at 10:41 AM, Karl O. Pinc <kop at meme.com> wrote:

> Hi,
> 
> Bio::GMOD::DB::Adapter has the "public" schema hardcoded in
> such a way that the cache table must go in the public schema.
> 
> This is a problem for us since we don't have
> (or want) a public schema,
> and if we did we wouldn't want to put the cache there.
> Further, users may not have permission to create tables
> in the public schema.
> 
> Probably best would be a command line argument to specify
> the schema and the cache table name. (Say for
> gmod_bulk_load_gff3.pl)  This would allow any
> user to put a cache in a place where the user
> had enough permission to create a table.
> 
> Second best would be
> a configuration option.
> 
> Another choice would be a command line option
> that disables the cache.
> 
> The appended patch identifies where the problem is,
> although all it does is create the cache as
> a temporary table, which probably defeats the point.
> 
> Regards,
> 
> Karl <kop at meme.com>
> Free Software:  "You don't pay back, you pay forward."
>                 -- Robert A. Heinlein
> 
> P.S.  The list seems to reject patches as attachments.
> 
> -------------<snip>------------
> --- /usr/local/share/perl5/Bio/GMOD/DB/Adapter.pm	2014-04-29 
> 15:31:57.162887710 -0400
> +++ Bio/GMOD/DB/Adapter.pm	2014-04-29 15:26:56.482888495 -0400
> @@ -143,44 +143,44 @@
>                "SELECT synonym_id FROM synonym WHERE name=? AND 
> type_id=?";
> 
> use constant CREATE_CACHE_TABLE =>
> -               "CREATE TEMP TABLE tmp_gff_load_cache (
> +               "CREATE TABLE public.tmp_gff_load_cache (
>                     feature_id int,
>                     uniquename varchar(1000),
>                     type_id int,
>                     organism_id int
>                 )";
> use constant DROP_CACHE_TABLE =>
> -               "DROP TABLE tmp_gff_load_cache";
> +               "DROP TABLE public.tmp_gff_load_cache";
> use constant VERIFY_TMP_TABLE =>
>                "SELECT count(*) FROM pg_class WHERE relname=? and 
> relkind='r'";
> use constant POPULATE_CACHE_TABLE =>
> -               "INSERT INTO tmp_gff_load_cache
> +               "INSERT INTO public.tmp_gff_load_cache
>                 SELECT feature_id,uniquename,type_id,organism_id FROM 
> feature";
> use constant CREATE_CACHE_TABLE_INDEX1 =>
>                "CREATE INDEX tmp_gff_load_cache_idx1 
> -                    ON tmp_gff_load_cache (feature_id)";
> +                    ON public.tmp_gff_load_cache (feature_id)";
> use constant CREATE_CACHE_TABLE_INDEX2 =>
>                "CREATE INDEX tmp_gff_load_cache_idx2 
> -                    ON tmp_gff_load_cache (uniquename)";
> +                    ON public.tmp_gff_load_cache (uniquename)";
> use constant CREATE_CACHE_TABLE_INDEX3 =>
>                "CREATE INDEX tmp_gff_load_cache_idx3
> -                    ON tmp_gff_load_cache 
> (uniquename,type_id,organism_id)";
> +                    ON public.tmp_gff_load_cache 
> (uniquename,type_id,organism_id)";
> use constant VALIDATE_TYPE_ID =>
> -               "SELECT feature_id FROM tmp_gff_load_cache
> +               "SELECT feature_id FROM public.tmp_gff_load_cache
>                     WHERE type_id = ? AND
>                           organism_id = ? AND
>                           uniquename = ?";
> use constant VALIDATE_ORGANISM_ID =>
> -               "SELECT feature_id FROM tmp_gff_load_cache
> +               "SELECT feature_id FROM public.tmp_gff_load_cache
>                     WHERE organism_id = ? AND
>                           uniquename = ?";
> use constant VALIDATE_UNIQUENAME =>
> -               "SELECT feature_id FROM tmp_gff_load_cache WHERE 
> uniquename=?";
> +               "SELECT feature_id FROM public.tmp_gff_load_cache WHERE 
> uniquename=?";
> use constant INSERT_CACHE_TYPE_ID =>
> -               "INSERT INTO tmp_gff_load_cache 
> +               "INSERT INTO public.tmp_gff_load_cache 
>                   (feature_id,uniquename,type_id,organism_id) VALUES 
> (?,?,?,?)";
> use constant INSERT_CACHE_UNIQUENAME =>
> -               "INSERT INTO tmp_gff_load_cache (feature_id,uniquename)
> +               "INSERT INTO public.tmp_gff_load_cache 
> (feature_id,uniquename)
>                   VALUES (?,?)";
> 
> use constant INSERT_GFF_SORT_TMP =>
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list