# Atlas vs BigQuery cohorts

There are different ways to construct a cohort within Sandbox. You can construct your cohort by following steps [here](/working-in-the-sandbox/which-tools-are-available/atlas/detailed-guide/how-to-define-a-cohort-in-atlas.md) wit [Atlas](/working-in-the-sandbox/which-tools-are-available/atlas.md) in Sandbox. You can also construct your cohort using [BigQuery data tables](/working-in-the-sandbox/which-tools-are-available/bigquery-relational-database.md).

For the cohort constructed basically using same criteria in Atlas and BigQuery, you will see that there will be difference in sample numbers due to the following reasons.

**One of the reasons** is that not all medical codes present in [service sector detailed longitudinal](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/service-sector-data.md) data are present in the[ medical vocabularies](/working-in-the-sandbox/which-tools-are-available/atlas/detailed-guide/code-sets-in-atlas.md).

Imagine, you are looking for Asthma ICD-8 diagnosis code `49320` present in [service sector BigQuery table](/working-in-the-sandbox/which-tools-are-available/bigquery-relational-database.md). The same ICD-8 diagnosis code is absent in the [medical vocabularies](/working-in-the-sandbox/which-tools-are-available/atlas/detailed-guide/code-sets-in-atlas.md) thereby will not pull any such `FINNGENIDs` in cohort constructed in Atlas.

**Another reason** is that when a visit (refers to a row in service sector data) is considered the current OMOP conversion takes into account all the medical codes in that visit.

Imagine, you are looking for Asthma ICD-10 diagnosis code `J45.9` present in the [service sector BigQuery table](/working-in-the-sandbox/which-tools-are-available/bigquery-relational-database.md) as `CODE1` and `I10` as `CODE2`. The current OMOP conversion process takes in the combination of both `CODE1` and `CODE2` together thereby making the code `J45.9+I10` which is absent in [medical vocabularies](/working-in-the-sandbox/which-tools-are-available/atlas/detailed-guide/code-sets-in-atlas.md) and will also be absent in the cohort constructed in Atlas.

**Another reason** is that when important information about which medical vocabulary a code should belong to is missing then OMOP conversion will miss such visits.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finngen.fi/working-in-the-sandbox/which-tools-are-available/atlas-vs-bigquery-cohorts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
