> For the complete documentation index, see [llms.txt](https://docs.cosap.bio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cosap.bio/fundamentals/getting-set-up.md).

# Getting Set Up

<details>

<summary>Step 0: Requirements</summary>

COSAP currently only supports Linux-based operating systems.\
For other operating systems, consider using COSAP via Docker.

Mapping tasks require at least 16 GB of RAM.

Excluding annotation, data required by COSAP can take up to 50 GB in disk space.

For a typical FASTQ-processing pipeline, it is recommended that you have 3-4 times as much free disk space on your system as the size of your compressed input FASTQ files.

</details>

<details>

<summary>Step 1: Install Miniforge</summary>

COSAP requires [Miniforge](https://github.com/conda-forge/miniforge#download).

Download the script for your system and run it. For example:

```bash
bash Miniforge3-Linux-x86_64.sh
```

</details>

<details>

<summary>Step 2: Install COSAP</summary>

Create a Conda environment with Python 3.9 and COSAP as follows:

```bash
mamba create \
--name cosap \
--channel conda-forge \
--channel bioconda \
python=3.9 \
cosap
```

Then activate the environment:

```
mamba activate cosap
```

</details>

<details>

<summary>Step 3: Download Reference Files</summary>

COSAP requires the hg38 reference genome, its indexes, and several known variants sources. The following command will download files necessary for mapping and variant calling:

```bash
cosap --download-data
```

If you wish, you can also obtain required files yourself and place them at \~/cosap\_data or the location you specified for COSAP\_LIBRARY\_PATH. If you wish for certain files to not be tracked by COSAP, you can specify them in a YAML file placed in the data directory:

{% code title="tracked\_files.yaml" %}

```yaml
ignore:
- file_1.ext
- file_2.ext
```

{% endcode %}

Any files previously present in the data directory will automatically be ignored when the COSAP downloader is run.

</details>

## Setting up Environment Variables

<table><thead><tr><th width="261.3333333333333">Variable</th><th>Description</th><th>Default Value</th></tr></thead><tbody><tr><td>COSAP_LIBRARY_PATH</td><td>Path to directory containing hg38 resources and other required data such as ENSEMBL-VEP cache.</td><td>~/cosap_data</td></tr><tr><td>COSAP_RAMDISK_PATH</td><td>Path to RAM disk directory.</td><td>/dev/shm</td></tr><tr><td>COSAP_THREADS_PER_JOB</td><td>Number of threads usable by tasks. Set to 0 or do not specify for maximum value.</td><td>All available</td></tr><tr><td>COSAP_IN_MEMORY_MODE</td><td>Sets run mode. If true all intermediary files will be kept in memory. Be aware that this mode increase memory consumption significantly. </td><td>False</td></tr></tbody></table>
