scanpy.read_10x_h5#
- scanpy.read_10x_h5(filename, *, genome=None, gex_only=True, backup_url=None)[source]#
Read 10x-Genomics-formatted hdf5 file.
- Parameters:
- filename
PathLike[str] |str Path to a 10x hdf5 file.
- genome
str|None(default:None) Filter expression to genes within this genome. For legacy 10x h5 files, this must be provided if the data contains more than one genome.
- gex_only
bool(default:True) Only keep ‘Gene Expression’ data and ignore other feature types, e.g. ‘Antibody Capture’, ‘CRISPR Guide Capture’, or ‘Custom’
- backup_url
str|None(default:None) Retrieve the file from an URL if not present on disk.
- filename
- Return type:
- Returns:
Annotated data matrix, where observations/cells are named by their barcode and variables/genes by gene name. Stores the following information:
XThe data matrix is stored
obs_namesCell names
var_namesGene names for a feature barcode matrix, probe names for a probe bc matrix
var['gene_ids']Gene IDs
var['feature_types']Feature types
obs[filtered_barcodes]filtered barcodes if present in the matrix
varAny additional metadata present in /matrix/features is read in.