> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/developer/walkthroughs/creating-a-mixed-phenotypic-assay-dataset.md).

# Creating a Mixed Phenotypic Assay Dataset

{% hint style="info" %}
An Apollo license is required to use the apps mentioned in this guide. Org approval may also be required. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

## Introduction

The following is an example of the process to create a mixed phenotypic and assay Apollo Dataset. You have an existing longitudinal clinical Dataset, "Initial Trial", and recently received three new sets of data from a lab experiment, "Experiment A". The three sets of data are two data files with information from the patient's (New data 1) visit and the visit's (New data 2) lab tests. You also have a gene expression matrix for the (New data 3) molecular data which measures mRNA expression levels from isolated tissues corresponding to the visit.

![](/files/uumeD6xXKj0uj6Sh16Nl)

As the data administrator, you want to add the two new sets of data to the existing Dataset and update your sample cohort, "Demo", to reference the newly expanded Dataset.

## Guide

### Step 1: Ingest the Lab Measurements

Since the new lab measurements are complex and contain information for visits and a series of measurements for each visit, use the [Data Model Loader](https://platform.dnanexus.com/app/data_model_loader_v2) app to [ingest the data](/developer/walkthroughs/guide-for-ingesting-a-four-table-dataset.md), ensuring that your "Visit" Entity contains a `patient_id`, and create a Dataset named "RNAseq study lab measurements". This Dataset contains two Entities.

![](/files/fiEF6OybrzEpovLXyQN6)

### Step 2: Ingest the Gene Expression Matrix

Using the [Molecular Expression Assay Loader](https://platform.dnanexus.com/app/molecular-expression-assay-loader) app, ingest the gene expression matrix and create a Dataset named "RNAseq gem". This Dataset contains Molecular Expression assay data, and a single Entity that contains sample ID information.

![](/files/FXxviBs9SrVS9ISSu1zV)

### Step 3: Add the Lab Measurements to the Initial Dataset

Using the [Clinical Dataset Merger](https://platform.dnanexus.com/app/clinical_dataset_merger) app, link the "RNAseq study lab measurements" Dataset to the target "Initial Trial" Dataset to create an output Dataset named "Initial trial with RNAseq (pheno only)". Do this by adding the "RNAseq study lab measurements" Dataset as the **Source Dataset** input parameter and the "Initial Trial" Dataset as the **Target Dataset** input parameter.

This new Dataset has the original two Entities and the two additional Entities merged in.

### Step 4: Add the Gene Expression Matrix to the Expanded Dataset

Using the [Assay Dataset Merger](https://platform.dnanexus.com/app/assay_dataset_merger) app, use the "RNAseq gem" Dataset as the **Source Dataset** input parameter and the "Initial trial with RNAseq (pheno only)" Dataset as the **Target Dataset** input parameter to create an output Dataset named "Initial trial with RNAseq". This new Dataset has the new measurements as Entities and the gene expression matrix linked as an assay.

![](/files/WfnZiWB9auNTTyT7T4Wz)

### Step 5: Rebase the Cohort on the New Dataset

Before sharing the Dataset you still need to update the "Demo" cohort so that it opens with the new Dataset. Using the [Rebase Cohorts And Dashboards](https://platform.dnanexus.com/app/rebase_cohorts_and_dashboards) app, rebase the "Demo" cohort onto the "Initial trial with RNAseq" Dataset using the **Cohorts** input parameter and generate a "Demo RNAseq" cohort with the suffix "RNAseq". The new Dataset, ingested databases, and cohort are ready to be shared and used for analysis.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.dnanexus.com/developer/walkthroughs/creating-a-mixed-phenotypic-assay-dataset.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
