> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mantlebio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demultiplexing Element AVITI base calls with the Bases2Fastq pipeline on Mantle

## Introduction

Sequencing runs with the Element AVITI output base calls and quality scores in bases files. The first step in analyzing the results of your AVITI sequencing run is to convert the bases files to FASTQ files through the Element Biosciences Bases2Fastq pipeline.

We have adapted the Bases2Fastq pipeline to read and write data to your Mantle Database.

## Managing AVITI sequencing run data

In your [Mantle Database](/features/database), data is stored as entities, which have properties that can be files or metadata. AVITI sequencing run data can be stored in Mantle as entities of the `element_bases` data type. Expand to view the properties of `element_bases` entities:

<Accordion title="Properties">
  <ParamField query="run_directory" type="file" required>
    Directory containing outputs from an AVITI sequencing run
  </ParamField>

  <ParamField query="run_manifest" type="file">
    Used as an input to Bases2Fastq. Optional CSV file that specifies demultiplexing settings, FASTQ file settings, and sample information. If not provided, the default output run manifest from the run directory is used. See the [Bases2Fastq documentation](https://docs.elembio.io/docs/bases2fastq/#run-manifest) for more information.
  </ParamField>
</Accordion>

## Converting bases files to FASTQ files

<Frame>
  <img src="https://mintcdn.com/mantlebio/LUzPTXQRsMt8_AfM/workflows/assets/bases2fastq_pipeline_run_page.png?fit=max&auto=format&n=LUzPTXQRsMt8_AfM&q=85&s=a8e6542531b0159cc14ce60e1cd64585" width="3802" height="1432" data-path="workflows/assets/bases2fastq_pipeline_run_page.png" />
</Frame>

The Mantle `bases2fastq` pipeline adapts the Element Biosciences Bases2Fastq pipeline to allow it to take a Mantle `element_bases` entity as input and to create a `element_fastqs_directory` entity with the results directory. Additionally, when you run the Mantle `bases2fastq` pipeline, the QC report is displayed on the pipeline run page. All pipeline results files can also be browsed on the pipeline run page. Learn more about the pipeline in the [Element Biosciences Bases2Fastq documentation](https://docs.elembio.io/docs/bases2fastq).
