# Cohort

## Overview

Cohort data model hosts information about any cohort.

### Summary

| Field            |                                         Create                                        |                                         Update                                        |                                         Unique                                        |                                        Required                                       |
| ---------------- | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: |
| id               | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |
| uuid             |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| type             | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| creationDate     | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| modificationDate | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| description      | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| samples          | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| numSamples       | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| release          | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| status           | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| internal         | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| attributes       | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |

## Data Model

### Cohort

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/cohort/Cohort.java).

| Field                                                                                                                                           | Description                                                                                                                                               |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>id</strong><br><em>String</em><br></p>                                                                                               | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.                                                      |
| <p><strong>uuid</strong><br><em>String</em><br></p>                                                                                             | Unique 32-character identifier assigned automatically by OpenCGA.                                                                                         |
| <p><strong>type</strong><br><em>CohortType</em><br></p>                                                                                         | Cohort type that can have the values CASE\_CONTROL, CASE\_SET, CONTROL\_SET, PAIRED, PAIRED\_TUMOR, AGGREGATE, TIME\_SERIES, FAMILY, TRIO and COLLECTION. |
| <p><strong>creationDate</strong><br><em>String</em><br></p>                                                                                     | Autogenerated date following the format YYYYMMDDhhmmss containing the date when the entry was first registered.                                           |
| <p><strong>modificationDate</strong><br><em>String</em><br><br><em>since</em>: 1.0</p>                                                          | Autogenerated date following the format YYYYMMDDhhmmss containing the date when the entry was last modified.                                              |
| <p><strong>description</strong><br><em>String</em><br></p>                                                                                      | Users may provide a description for the entry.                                                                                                            |
| <p><strong>samples</strong><br><em>List<</em><a href="https://docs.opencga.opencb.org/data-models/sample"><em>Sample</em></a><em>></em><br></p> | List of cohort samples.                                                                                                                                   |
| <p><strong>numSamples</strong><br><em>int</em><br></p>                                                                                          | Number of samples.                                                                                                                                        |
| <p><strong>release</strong><br><em>int</em><br></p>                                                                                             | An integer describing the current data release.                                                                                                           |
| <p><strong>status</strong><br><a href="https://docs.opencga.opencb.org/data-models/cohort#status"><em>Status</em></a><br></p>                   | Object to set a custom status.                                                                                                                            |
| <p><strong>internal</strong><br><a href="https://docs.opencga.opencb.org/data-models/cohort#cohortinternal"><em>CohortInternal</em></a><br></p> | Internal field for manage the object.                                                                                                                     |
| <p><strong>attributes</strong><br><em>Map\<String,Object></em><br></p>                                                                          | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes.                               |

### CohortInternal

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/cohort/CohortInternal.java).

| Field                                                                                                                                         | Description                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| <p><strong>status</strong><br><a href="https://docs.opencga.opencb.org/data-models/cohort#internalstatus"><em>InternalStatus</em></a><br></p> | Status of the internal object.                        |
| <p><strong>registrationDate</strong><br><em>String</em><br></p>                                                                               | Registration date of the internal object.             |
| <p><strong>lastModified</strong><br><em>String</em><br></p>                                                                                   | Date of the last modification of the internal object. |

### Status

You can find the Java code [here](https://github.com/opencb/biodata/tree/develop/biodata-models/src/main/java/org/opencb/biodata/models/common/Status.java).

### InternalStatus

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/common/InternalStatus.java).


---

# 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.opencga.opencb.org/develop-2/data-models/cohort.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.
