> For the complete documentation index, see [llms.txt](https://help.connected.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.connected.illumina.com/dragen-stratamap/dragen-spatial-transcriptome/outputs/results-folder/mtx-files.md).

# MTX Files

* The following outputs are produced for each sample:
  * Raw or un-binned matrix files
  * Grid-binned matrix files
  * Cell-binned matrix files
  * (Optional) Nuclei-binned matrix files

The following three files provide per-bin or per-cell gene expression information in the commonly used Matrix Market (`*.mtx`) format:

* `matrix.mtx.gz`
  * Count of unique molecules for each cell and gene pair, in sparse matrix format.
* `barcodes.tsv.gz`
  * Raw matrix files format: SBC:Y:X
  * Grid-binned format: bin10:Y:X
  * Cell-binned format: cellid:Y:X
  * NOTES:
    * All X and Y positions are reported in microns using the global substrate position.
    * Cell-binned and grid-binned data report the X:Y position of the center of the cell or bin.
* `features.tsv.gz`
  * Gene name and ID for each gene in the matrix.

### What are Matrix Market Files?

Matrix Market (`.mtx`) files are a standard sparse matrix format used in single-cell and spatial transcriptomics to efficiently store large gene expression matrices. The format is particularly efficient because spatial transcriptomics data is sparse (most genes are not expressed in most cells/bins).

### File Structure

A typical Matrix Market output consists of three files:

1. **`matrix.mtx.gz`** - The sparse expression matrix
   * Contains only non-zero values
   * Format: `row_index column_index value`
2. **`features.tsv.gz`** - Gene/feature information
   * One gene per line
   * Typically: `gene_id gene_name feature_type`
3. **`barcodes.tsv.gz`** - Cell, bin, or spatial barcode identifiers
   * One barcode per line
   * Can be spatial barcodes, cell IDs, or spatial bin identifiers

### Matrix Market File Format Example

**matrix.mtx header:**

```
%%MatrixMarket matrix coordinate integer general
%
30000 5000 1500000
1 1 5
1 234 3
2 1 12
...
```

* Line 1: Format specification.
* Line 2: Comment line.
* Line 3: `n_genes n_barcodes n_nonzero_entries`.
* Following lines: `gene_index barcode_index count`.

For help using these files with third-party tools, see [Third Party Tools](/dragen-stratamap/dragen-spatial-transcriptome/outputs/results-folder/third-party.md).


---

# 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://help.connected.illumina.com/dragen-stratamap/dragen-spatial-transcriptome/outputs/results-folder/mtx-files.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.
