How to export FinnGen IDs from Atlas

At this time, the Atlas UI does not provide a feature to extract FINNGENIDs from Atlas.

Exporting IDs from Atlas is needed for downstream analysis like GWAS. Exploring new cohorts with tools designed for the purpose is highly recommended before moving to downstream analysis. For further instructions see Cohort Characterizations in Atlas, Cohort Operations tool, Trajectory Visualization tool, and Custom GWAS tool. See also General workflows for the most common analyses researchers are conducting with the FinnGen data in the Sandbox.

Exporting cohort from Atlas using the Cohort Operation tool

The easiest way to export FinnGen IDs along with other data like birth date, death date, and sex from an Atlas cohort is by using the Cohort Operations tool.

Alternatively, you can also export the FinnGen IDs from an Atlas cohort using GUI SuperSet as follows.

Exporting cohort (FINNGENIDs) from Atlas using the database GUI SuperSet

Open Superset

Step 1:

Select SQL Lab

Step 2:

SQL Editor

Step 3:

Paste the SQL-query (below) to the Superset editor. Change the "cohort_definition_id" in the SQL-query with the cohort ID in Atlas (pic below)*

Step 4:

To extract the whole cohort set the row limit larger than the total N of the cohort.

SQL-query for R6 data (The query can be similarly modified for other data releases):

SELECT cohort_definition_id, person_source_value, cohort_start_date, cohort_end_date, gender_source_value, birth_DATETIME
FROM finngen_omop_result_r6.cohort
LEFT JOIN finngen_omop_r6.person
ON cohort.subject_id = person.person_id
WHERE cohort_definition_id = 2

*Replace the number 2 in "cohort__definition__id" (above pic) with the cohort ID in Atlas (pic below)

SQL-query for R7 data (The query can be similarly modified for other data releases):

SELECT cohort_definition_id, person_source_value, cohort_start_date, cohort_end_date, gender_source_value, birth_DATETIME
FROM finngen_omop_result_r7.cohort
LEFT JOIN finngen_omop_r7.person
ON cohort.subject_id = person.person_id
WHERE cohort_definition_id = 2

*Replace the number number 2 in "cohort__definition__id" (above pic) with the cohort ID in Atlas (pic below)

*You can check the cohort ID number from Atlas. For example, the Atlas ID for the test cohort in the figure below is 1006.

You can also use your Atlas cohorts in the custom GWAS tool.

Step 1:

Custom GWAS tool works so that in UI/Atlas, a user can create a cohort and click “run analysis”.

Step 2:

UI/Atlas will then spit out a phenotype file with IDs and a binary status indicator along with the analysis configuration, which will be automatically picked up for execution without having to go through the current pipelines.

Step 3:

The user will automatically be sent an email when the analysis is ready.

Last updated