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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Fields, Christopher J
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 <[hidden email]> 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 <[hidden email]>
> 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
> [hidden email]
> http://lists.open-bio.org/mailman/listinfo/bioperl-l


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

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

Scott Cain
Huh.  Years ago I added support for non-public schemas to what now appears to be only some of the supporting code for Chado.  I even remember modifying the Bio::GMOD::DB::Adapter code.  I can't think of a reason why would have left those specific tables in the public schema.

Now, this reminds me of something I wanted to do a few months ago: take the git repo you created for Chado and copy it to the GMOD repo and make it the official repository.  I'll work on that today, and then make the change in the Adapter code.

Scott



On Wed, Apr 30, 2014 at 12:12 PM, Fields, Christopher J <[hidden email]> wrote:
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 <[hidden email]> 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 <[hidden email]>
> 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
> [hidden email]
> http://lists.open-bio.org/mailman/listinfo/bioperl-l


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

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

Karl O. Pinc
On 04/30/2014 12:02:09 PM, Scott Cain wrote:

> Now, this reminds me of something I wanted to do a few months ago:
> take the
> git repo you created for Chado and copy it to the GMOD repo and make
> it the
> official repository.  I'll work on that today, and then make the
> change in
> the Adapter code.

You might instead want to run the convert to git script
that's on my git site.  I forget the details but I do
know that you'll want an updated list of "who's email
is who's".




Karl <[hidden email]>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

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

Fields, Christopher J
On Apr 30, 2014, at 12:12 PM, Karl O. Pinc <[hidden email]> wrote:

> On 04/30/2014 12:02:09 PM, Scott Cain wrote:
>
>> Now, this reminds me of something I wanted to do a few months ago:
>> take the
>> git repo you created for Chado and copy it to the GMOD repo and make
>> it the
>> official repository.  I'll work on that today, and then make the
>> change in
>> the Adapter code.
>
> You might instead want to run the convert to git script
> that's on my git site.  I forget the details but I do
> know that you'll want an updated list of "who's email
> is who's".
>
> Karl <[hidden email]>
> Free Software:  "You don't pay back, you pay forward."
>                 -- Robert A. Heinlein

Yep, the author map was the most problematic step (one we punted on with bioperl since we had a bioperl.org email for everyone in the project).

chris
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

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

Karl O. Pinc
On 04/30/2014 12:14:55 PM, Fields, Christopher J wrote:

> On Apr 30, 2014, at 12:12 PM, Karl O. Pinc <[hidden email]> wrote:
>
> > On 04/30/2014 12:02:09 PM, Scott Cain wrote:
> >
> >> Now, this reminds me of something I wanted to do a few months ago:
> >> take the
> >> git repo you created for Chado and copy it to the GMOD repo and
> make
> >> it the
> >> official repository.

> Yep, the author map was the most problematic step (one we punted on
> with bioperl since we had a bioperl.org email for everyone in the
> project).

There's an author map on my git site.  And at least one clone with
updates.

Karl <[hidden email]>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema