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
.mtxand.tsvfiles. The directory should contain three files:count matrix: “matrix.mtx” or “matrix.mtx.gz”.
features: “genes.tsv”, or “genes.tsv.gz”, or “features.tsv”, or “features.tsv.gz”.
barcodes: “barcodes.tsv”, or “barcodes.tsv.gz”.
storage (
str) – File name of the output “.h5ad” file.prefix (
Optional[str]) – Any prefix beforematrix.mtx,genes.tsvandbarcodes.tsv. For instance, if the files are namedpatientA_matrix.mtx,patientA_genes.tsvandpatientA_barcodes.tsv, then the prefix ispatientA_.
- Returns
An AnnData object.
- Return type