Re: genomic locus

From: Andrey Zhidenkov <pensnarik(at)gmail(dot)com>
To: obartunov(at)gmail(dot)com
Cc: Gene Selkov <selkovjr(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: genomic locus
Date: 2017-12-19 20:37:52
Message-ID: CAN=gQ4CZDS7zgjSo=Wo5h+YVpp9dPeMHroMrkFkp69jWfV9pAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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: <date> and <precocious>. Precocious could me
'year', 'month' and so on and if precocious was 'year' the date should
always had to be like 'yyyy-01-01'. I have just read your presentation from
2011 and have a question - is it possible to compare two uncertain dates
like 'January 2017' and 'year 2017'?

On 19 Dec. 2017 23:22, "Oleg Bartunov" <obartunov(at)gmail(dot)com> wrote:

On Fri, Dec 15, 2017 at 10:49 PM, Gene Selkov <selkovjr(at)gmail(dot)com> 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 not use composite type ? For simple interval approach it's worked for us
(see attached hdate.sql). If you need to specify distribution
function, than it may be
worth to see orion project http://orion.cs.purdue.edu/index.html
6 years ago we was thinking about implementation special UNCERTAINTY data
type
(http://www.sai.msu.su/~megera/postgres/talks/big_uncertain_data.pdf), but
never
started :( It'd be nice if you start this very interesting for science
project.

btw, now you can use range data type, check
https://wiki.postgresql.org/images/7/73/Range-types-pgopen-2012.pdf

>
> 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 contributed modules and what steps I should take once I get it
to
> work. Also, is it a good idea to clone and fix seg for this purpose, or is
> there a more appropriate template? Or maybe just building it from scratch
> will be a better idea?
>
> 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 see in new code just a change of macros or the change of
principles?

nothing special, copy, modify, compile

>
> Thanks,
>
> --Gene

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-12-19 20:43:58 Re: [HACKERS] replace GrantObjectType with ObjectType
Previous Message Robert Haas 2017-12-19 20:30:07 Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com