stereo.io.read_gef¶
- stereo.io.read_gef(file_path, bin_type='bins', bin_size=100, is_sparse=True, gene_list=None, region=None, gene_name_index=False, num_threads=-1)[source]¶
Read the GEF (.h5) file, and generate the StereoExpData object.
- Parameters:
file_path (
str) – the path to input file.bin_type (
str) – the bin type includes'bins'or'cell_bins'.bin_size (
int) – the size of bin to merge, which only takes effect when thebin_typeis set as'bins'.is_sparse (
bool) – the matrix is sparse matrix, ifTrue, otherwisenp.ndarray.gene_list (
Optional[list]) – select targeted data based on the gene list.region (
Optional[list]) – restrict data to the region condition, like [minX, maxX, minY, maxY].gene_name_index (
Optional[bool]) –Trueto set gene name as index if the version of gef file is 4 or greater, otherwise to set gene id, if the version is 3 or less,gene_name_indexwould be forced toTruebecause there is no gene id in this case.num_threads (
int) – the number of threads to read the data, only available whenbin_typeis'bins'. -1 means to use all the cores of the machine.
- Return type:
An object of StereoExpData.