snapatac2.read_10x_mtx#
- snapatac2.read_10x_mtx(path, file=None, prefix=None)[source]#
Read 10x-Genomics-formatted mtx directory.
- Parameters:
path (
Path
) –Path to directory for
.mtx
and.tsv
files. 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”.
file (
Optional
[Path
]) – File name of the “.h5ad” file used to save the AnnData object. IfNone
, an in-memory AnnData object is returned.prefix (
Optional
[str
]) – Any prefix beforematrix.mtx
,genes.tsv
andbarcodes.tsv
. For instance, if the files are namedpatientA_matrix.mtx
,patientA_genes.tsv
andpatientA_barcodes.tsv
, then the prefix ispatientA_
.
- Returns:
An AnnData object.
- Return type: