# Query associated loci for a list of UKBB endophenotypes

**URL:** <https://community.opentargets.org/t/query-associated-loci-for-a-list-of-ukbb-endophenotypes/337>\
**Category:** Data downloads\
**Tags:** ot-platform\
**Created:** [2 September 2021 17:21 UTC](https://community.opentargets.org/t/query-associated-loci-for-a-list-of-ukbb-endophenotypes/337 "2021-09-02T17:21:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![esebesty](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@esebesty](https://community.opentargets.org/u/esebesty)\
**Post date:** [2 September 2021 17:22 UTC](https://community.opentargets.org/t/query-associated-loci-for-a-list-of-ukbb-endophenotypes/337/1 "2021-09-02T17:22:00Z")

</div>

Hi,

I just downloaded the full Open Targets dataset in Parquet format, and set up sparklr with R. The [demo](https://platform-docs.opentargets.org/data-access/datasets#accessing-and-querying-datasets) script is working ok. However, I’m a bit lost how to do a systematic query with a list of UKBB endophenotypes, and get a data.frame or tibble with association information. Practically the “Association Information” table that is available, for example [here](https://genetics.opentargets.org/study/NEALE2_30070_raw), using " Red blood cell (erythrocyte) distribution width" as query.

Is there a more detailed description of the data structure somewhere or more detailed example scripts?

Thanks for any pointers!

---

<div class="post-metadata">

**Author:** ![ochoa](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/ochoa/32/189_2.png) [@ochoa](https://community.opentargets.org/u/ochoa)\
**Post date:** [3 September 2021 09:22 UTC](https://community.opentargets.org/t/query-associated-loci-for-a-list-of-ukbb-endophenotypes/337/2 "2021-09-03T09:22:19Z")

</div>

Hi esebesty,

It does look like you almost have the answer.

Something we are [currently working on](https://github.com/opentargets/platform/issues/1704) is the best way to communicate what fields are available (or relevant) for each dataset.

In the meantime, you can see what fields are available for each datasource in our [json schema](https://github.com/opentargets/json_schema/blob/2b5dcd9b6d4eb07cf6d821c44f1b1b53d8869798/opentargets.json#L644). You will be interested in the “ot\_genetics\_portal” dataset fields. The “projectId” will for example tell you which entries come from UKBB GWAS.

Keep in mind that what you can see through the Open Targets Platform are all the GWAS-significant loci with an L2G score \> 0.05. This is the best dataset if your analysis focuses in potentially causal genes. If instead, your focus is on the actual signals you should probably consider accessing the genetics portal data directly.

I hope this helps

David

---

<div class="post-metadata">

**Author:** ![esebesty](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@esebesty](https://community.opentargets.org/u/esebesty)\
**Post date:** [6 September 2021 07:32 UTC](https://community.opentargets.org/t/query-associated-loci-for-a-list-of-ukbb-endophenotypes/337/3 "2021-09-06T07:32:13Z")

</div>

Thanks, that was useful. However, I’m still missing some information. In particular, the “Credible Set Size” and “LD Set Size” columns from the study summary page, and the Gene Prioritization details, like “Variant Pathogenicity”, “Distance”, etc columns. I guess they are present in some other datasources. Thanks!

---

<div class="post-metadata">

**Author:** ![ochoa](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/ochoa/32/189_2.png) [@ochoa](https://community.opentargets.org/u/ochoa)\
**Post date:** [9 September 2021 09:54 UTC](https://community.opentargets.org/t/query-associated-loci-for-a-list-of-ukbb-endophenotypes/337/4 "2021-09-09T09:54:35Z")

</div>

The Open Targets Platform does not provide that level of granularity. Instead, you can find this information accessing the Open Targets Genetics data. More information on how to access this data can be found in the [documentation](https://genetics-docs.opentargets.org/data-access/data-download).
