# Data Loading

There are two ways of loading data into MedCo. The first, using the provided loader, allows to encrypt and load the encrypted data into the MedCo database. The second loads directly pre-generated data into the database without encrypting data.

## Load pre-generated data

Pre-generated cleartext synthetic data following the SPO (Swiss Personalized Oncology) ontology is available, [follow those instructions to load them.](/medco-documentation/v2.0.1/system-administrators/data-loading/synthetic-spo-data.md)

## Encrypt and load data with the loader

The current version of the loader offers two different loading alternatives: (*v0*) loading of clinical and genomic data based on MAF datasets; and (*v1*) loading of generic i2b2 data. Currently these two loaders support each one dataset:

* *v0*: a genomic dataset (*tcga\_cbio* publicly available in [cBioPortal](http://www.cbioportal.org/))
* *v1*: the [i2b2 demodata](https://www.i2b2.org/webclient/).

Future releases of this software will allow for other arbitrary data sources, given that they follow a specific structure (e.g. BAM format).

### Pre-Requisite: Download test data

Execute the download script to download the test datasets.

```bash
cd ${MEDCO_SETUP_DIR}/test/data
bash download.sh i2b2
bash download.sh genomic_orig
bash download.sh genomic_fake
bash download.sh genomic_small
```

### Dummy Generation

The provided example data set files come with dummy data pre-generated. Those data are random dummy entries whose purpose is to prevent frequency attacks. In a future release, the generation will be done dynamically by the loader.


---

# 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://ldsec.gitbook.io/medco-documentation/v2.0.1/system-administrators/data-loading.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.
