Query by GeneID and Phenotype to get L2G scores

Hi! I need to get the L2G scores for several genes in several diseases and I can’t manage to get a query that works. For example need to get L2G scores for genes ENSG00000181915, ENSG00000243509, and ENSG00000134470 for the following Diseases IDs: Atopic Dermatitis (EFO: EFO_0000274), Asthma (EFO: MONDO_0004979) and IBD ( EFO: EFO_0003767). I need the L2G scores for all studies available.

Any help would be greatly appreciated!

Thanks

Hi,

Welcome to the OpenTargets community! You can get all associated loci for a gene on a gene page in the locus to gene table. However, you need to filter for those studies further for the right disease. It is not too straightforward as no disease ontology is used on the GeneticsPortal. You will need to iterate over your list of genes, fetch the l2g table for all, then filter for trait of interest (it is possible to do via API requests as well).

Alternatively, I can also recommend to use the flat files from ftp: ftp://ftp.ebi.ac.uk/pub/databases/opentargets/genetics/22.09

You will need to connect study, variant to disease (v2d) and locus to gene (l2g) tables. These tables contain EFO mappings of the studied traits and Ensembl gene identifiers as well. As a slight complication, you will need to work with parquet files.

Try to give it a go and let us know if you face any difficulty. We’ll help.

Best,
Daniel