How to find shared drugs for two diseases?

Dear Team,

I am wondering is there any easy to find shared drugs for two diseases or several diseases?



Hi Shicheng

Using the data hosted in Big Query we can get a list of all the drugs associated with a specific set of diseases with the query:

  SELECT drugId, array_agg(DISTINCT diseaseId) as diseases 
  FROM `open-targets-prod.platform.evidence`
  WHERE diseaseId IN ('EFO_0000339', 'MONDO_0000873')
  GROUP BY drugId 
WHERE array_length(diseases) >= 2 AND drugId IS NOT NULL

Which gives us:


row drugId diseases
1 CHEMBL1642 [EFO_0000339, MONDO_0000873]
2 CHEMBL1750 [EFO_0000339, MONDO_0000873]
3 CHEMBL98 [EFO_0000339, MONDO_0000873]
4 CHEMBL1096882 [EFO_0000339, MONDO_0000873]

and more rows
You can add more diseases of your choice in the query, remembering to update the required length count.

1 Like