snapatac2.read_10x_mtx#

snapatac2.read_10x_mtx(path, storage, prefix=None)[source]#

Read 10x-Genomics-formatted mtx directory.

Parameters
  • path (str) –

    Path to directory for .mtx and .tsv files. The directory should contain three files:

    1. count matrix: “matrix.mtx” or “matrix.mtx.gz”.

    2. features: “genes.tsv”, or “genes.tsv.gz”, or “features.tsv”, or “features.tsv.gz”.

    3. barcodes: “barcodes.tsv”, or “barcodes.tsv.gz”.

  • storage (str) – File name of the output “.h5ad” file.

  • prefix (Optional[str]) – Any prefix before matrix.mtx, genes.tsv and barcodes.tsv. For instance, if the files are named patientA_matrix.mtx, patientA_genes.tsv and patientA_barcodes.tsv, then the prefix is patientA_.

Returns

An AnnData object.

Return type

AnnData