Re: Combinatorial problem

Поиск
Список
Период
Сортировка
Искать
От
Marcus Engene
Тема
Re: Combinatorial problem
Дата
Msg-id
438DB8CE.9090003@engene.se
Ответ на
Re: Combinatorial problem (Srinivas Iyyer)
Список
Дерево обсуждения
8.0.2 Install Problems on Win XP Peter George <peter@logicalware.com>
Re: 8.0.2 Install Problems on Win XP <operationsengineer1@yahoo.com>
Combinatorial problem Srinivas Iyyer <srini_iyyer_bio@yahoo.com>
Re: Combinatorial problem Michael Fuhr <mike@fuhr.org>
Re: Combinatorial problem Sean Davis <sdavis2@mail.nih.gov>
Re: Combinatorial problem Srinivas Iyyer <srini_iyyer_bio@yahoo.com>
Re: Combinatorial problem Sean Davis <sdavis2@mail.nih.gov>
Re: Combinatorial problem Srinivas Iyyer <srini_iyyer_bio@yahoo.com>
Re: Combinatorial problem Marcus Engene <mengpg@engene.se>
Re: Combinatorial problem Sean Davis <sdavis2@mail.nih.gov>
Re: Combinatorial problem Srinivas Iyyer <srini_iyyer_bio@yahoo.com>
Re: Combinatorial problem Marcus Engene <mengpg@engene.se>
Re: Combinatorial problem Srinivas Iyyer <srini_iyyer_bio@yahoo.com>
Re: Combinatorial problem Marcus Engene <mengpg@engene.se>
Re: Combinatorial problem Marcus Engene <mengpg@engene.se>
Re: Combinatorial problem Sean Davis <sdavis2@mail.nih.gov>
Srinivas Iyyer wrote:
> Sorry for being unclear.
> 
> As of now from the whole mess of data, I do not know
> which targets are acted unique by a drug.
> 
> For instance, Drug m134 is acting only on target T432,
> T438,T654. 
> these targets are affected only by drug m134 and
> nothing else. 
> 
> Similarly, two drugs, m23 and m45 are acting on a
> group of targets, T987, T12,T334, T543.
> 
> m2,m3 and m5 are acting on T439,3421,T4568,T31
> m2,m3 and m8 are acrting on T124, T1334,T446,T98.
> m5,m8 and m12 are acting on T088,T898,T329.
> 
> Now, I have no idea what combination of drugs are
> acting on set of targets. 
> 
> IS there any way to get set of drugs and set of
> targets that happening in the data.  
> 
> What I mean to ask is, does it need a program such as
> Pl/pgsql to solve. I am nervous, because if it has to
> be done like that it is going to take long long time
> because, I have to learn it first.
> 
> Thank you. 

Hi Srinivas,

Perhaps this is what you want:

select *
from (
select distinct
drug_id,
array (select cb2.target_id
        from comb cb2
        where cb2.drug_id = cb.drug_id) as the_arr
from comb cb
) as foo
order by the_arr, drug_id

Best regards,
Marcus
В списке pgsql-novice по дате отправления
От: Sean Davis
Дата:
Сообщение: Re: Combinatorial problem
От: Srinivas Iyyer
Дата:
Сообщение: Re: Combinatorial problem
FAQ