Re: genomic locus

2017-12-25 Thread Teodor Sigaev
I think I can wrangle this type into GiST just by tweaking consistent(), union(), and picksplit(), if I manage to express my needs in C without breaking too many things. My first attempt segfaulted. Actually, consistent() can determ actual query data type by strategy number. See examples in l

Re: genomic locus

2017-12-22 Thread Gene Selkov
ype? >> Yes, I have. That is sort of what I have been doing; a composite type >> certainly gets the job done but I don’t feel it reduces query complexity, at >> least from the user’s point of view. Maybe I don’t know enough. >> Here’s an example of how I imagine a compos

Re: genomic locus

2017-12-21 Thread Teodor Sigaev
ort of what I have been doing; a composite type certainly gets the job done but I don’t feel it reduces query complexity, at least from the user’s point of view. Maybe I don’t know enough. Here’s an example of how I imagine a composite genomic locus (conventionally represented as text ‘:’ i

Re: genomic locus

2017-12-21 Thread Teodor Sigaev
Hi! Problem 1. What is a union of ‘1:6000-7000’ and ‘X:1-2’? Intuitively, it should be NULL, however, I am not sure the method allows for that; it was developed for objects living in the same metric space. I have mechanistically reproduce the indexing methods of seg, but the resulting

Re: genomic locus

2017-12-21 Thread Gene Selkov
Hi Oleg, Great to hear from you. I wondered how many of the old-timers were still around. > Why not use composite type ? For simple interval approach it's worked for us > (see attached hdate.sql). I have just begun looking at your hdate example; I see potentially useful stuff in it, but the fir

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 18, 2017, at 6:59 AM, Craig Ringer wrote: > > If you think it'd make logical sense to extend seg with a string descriptor > of some sort and could come up with a name/use case that's not quite so > narrowly focused as genetics alone, then I could see adding it as a secondary > type i

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 18, 2017, at 5:00 AM, PostgreSQL - Hans-Jürgen Schönig > wrote: > > maybe this one is also helpful: > https://wiki.postgresql.org/images/1/1b/Postbis_pgcon_eu_2012.pdf > > it seems they have put a lot of work into th

Re: genomic locus

2017-12-21 Thread Gene Selkov
e I don’t know enough. Here’s an example of how I imagine a composite genomic locus (conventionally represented as text ‘:’ integer ‘-‘ integer): CREATE TYPE locus AS (contig text, coord int4range); CREATE TABLE test_locus ( pos locus, ref text, alt text, id text ); CREATE INDEX test_lo

Re: genomic locus

2017-12-21 Thread Gene Selkov
Nice work, Andrew! I wish I knew about it earlier. > On Dec 16, 2017, at 8:53 AM, Andrew Dunstan > wrote: > > I keep most of the out-of-tree extensions I maintain green by building > and testing them in a buildfarm member. That way I become aware pretty > quickly if any API change has broken t

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 15, 2017, at 4:50 PM, Michael Paquier > wrote: > If you wish to fix seg in some way, you could always > patch them. But I am not sure what you are trying to fix, so more > details would be welcome. I was contemplating how much functionality I could borrow from seg to build another int

Re: genomic locus

2017-12-19 Thread Andrey Zhidenkov
Uncertain type is a great idea. I needed type like this to store information about premiere date or people birth date in movie database. Finally I made two columns: and . Precocious could me 'year', 'month' and so on and if precocious was 'year' the date should always had to be like '-01-01'.

Re: genomic locus

2017-12-19 Thread Oleg Bartunov
On Fri, Dec 15, 2017 at 10:49 PM, Gene Selkov wrote: > Greetings everyone, Привет ! > > I need a data type to represent genomic positions, which will consist of a > string and a pair of integers with interval logic and access methods. Sort > of like my seg type, but more straightforward. Why no

Re: genomic locus

2017-12-18 Thread Craig Ringer
On 16 December 2017 at 03:49, Gene Selkov wrote: > Greetings everyone, > > I need a data type to represent genomic positions, which will consist of a > string and a pair of integers with interval logic and access methods. Sort > of like my seg type, but more straightforward. > > I noticed somebod

Re: genomic locus

2017-12-18 Thread PostgreSQL - Hans-Jürgen Schönig
hello … maybe this one is also helpful: https://wiki.postgresql.org/images/1/1b/Postbis_pgcon_eu_2012.pdf it seems they have put a lot of work into that. regards, hans > On 15 Dec 2017, at 20:49, Gene Selkov wrote: > > Greetings everyone, > > I need a data type to r

Re: genomic locus

2017-12-17 Thread Robert Haas
On Fri, Dec 15, 2017 at 2:49 PM, Gene Selkov wrote: > I need a data type to represent genomic positions, which will consist of a > string and a pair of integers with interval logic and access methods. Sort > of like my seg type, but more straightforward. > > I noticed somebody took a good care of

Re: genomic locus

2017-12-16 Thread Andrew Dunstan
On 12/15/2017 05:50 PM, Michael Paquier wrote: > >> I have seen a lot of bit rot in other extensions (never contributed) that I >> have not maintained since 2009 and I now I am unable to fix some of them, so >> I wonder how much of old knowledge is still applicable. In other words, is >> what I s

Re: genomic locus

2017-12-15 Thread Michael Paquier
On Sat, Dec 16, 2017 at 4:49 AM, Gene Selkov wrote: > I noticed somebody took a good care of seg while I was away for the last 20 > years, and I am extremely grateful for that. I have been using it. In the > meantime, things have changed and now I am almost clueless about how you > deal with contr

genomic locus

2017-12-15 Thread Gene Selkov
Greetings everyone, I need a data type to represent genomic positions, which will consist of a string and a pair of integers with interval logic and access methods. Sort of like my seg type, but more straightforward. I noticed somebody took a good care of seg while I was away for the last 20 year