# Explore endpoint overlaps with CO

The cohort operations (CO) tool can be used to **compare two or more cohorts** [uploaded to the CO workbench](/working-in-the-sandbox/which-tools-are-available/cohort-operations-tool-co/upload-cohorts-to-co.md). In addition to custom-made cohorts, cohorts from FinnGen endpoints can be uploaded to the CO workbench allowing users to compare FinnGen endpoints to custom endpoints.

As an example, we will use a custom-made cohort of excessive earwax and compare it to case cohorts of two FinnGen endpoints for hearing loss. The uploading of these cohorts to CO is described [here](/working-in-the-sandbox/which-tools-are-available/cohort-operations-tool-co/upload-cohorts-to-co.md). See also a tutorial video about CO available from [FinnGen data users meeting 25th Jan 2022](https://www.finngen.fi/en/members/recordings/finngen-data-users-meeting-25th-jan-2022) at 16'35" and [FinnGen data users' meeting 28th June 2022](https://www.finngen.fi/en/members/recordings/finngen-data-users-meeting-28th-june-2022) at 28'55". See an [Example workflow for survival time/endpoint analysis](/working-in-the-sandbox/general-workflows-for-the-most-common-analyses.md).

Check that all needed cohorts are uploaded on the `Cohorts workbench`. Then select `Compare Cohorts` page on the left sidebar. Guidance for each step is available from ![](/files/PDJK4KYsyJnnBycg1FUM).

![](/files/0iH2sTGWXoJmtpK740Yp)

Compare cohorts offers two comparison tools: **patient overlap** and **patient counts**. The first uses an upset plot to visualize the overlap of patients in the selected cohorts. Here, for example, we can see that most of the patients in the custom cohort of excessive earwax (22410) are not found in the two FinnGen hearing loss endpoints while only 1015 patients belong to both hearing loss endpoints and the excessive earwax cohort.

![](/files/eyK7TCNxAFgmg3xP4su0)

**The Patients counts tool** shows the total number of patients in each cohort stratified by different parameters. Patient counts can be stratified by age, sex, and/or calendar year. The y-scale limit can be set to the highest value in a cohort (the default) or set to the same scale by tapping the `use same y-scale` box at the top right. The grouping may help to visualize possible differences or similarities between cohorts/endpoints. Here, as grouped by age and sex, the distribution of individuals shows a similar trend in the custom cohort of excessive earwax and in the two FinnGen hearing loss endpoints.

![](/files/sblge1jKMyzmVgBDfHS3)

By default `Age` and `Calendar Year` refer to the cohort start date. However, this can also be changed to cohort end date, date of birth, or date of death.

![](/files/Vyij6WAt6pB0MAQyDu8z)


---

# 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/cohort-operations-tool-co/explore-endpoint-overlaps-with-co.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.
