scanpy.read_10x_h5

scanpy.read_10x_h5(filename, genome=None, gex_only=True)

Read 10x-Genomics-formatted hdf5 file.

Parameters:
filename : str | Path

Filename.

genome : str, optional (default: None)

Filter expression to this genes within this genome. For legacy 10x h5 files, this must be provided if the data contains more than one genome.

gex_only : bool, optional (default: True)

Only keep ‘Gene Expression’ data and ignore other feature types, e.g. ‘Antibody Capture’, ‘CRISPR Guide Capture’, or ‘Custom’

Returns:

adata – Annotated data matrix, where obsevations/cells are named by their barcode and variables/genes by gene name. The data matrix is stored in adata.X, cell names in adata.obs_names and gene names in adata.var_names. The gene IDs are stored in adata.var['gene_ids']. The feature types are stored in adata.var['feature_types']

Return type:

AnnData