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.
See also
- 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]) – In a gef file whose version is 3 or lower, there is only a column called geneName which is the gene name, but in the version higher than 3, additional column called geneID is added, which is the ID for genes, When being higher version, settinggene_name_indexto True means setting column geneName as index, otherwise, setting column geneID as index and the column geneName is stored indata.real_gene_names, if lower version,gene_name_indexwill be ignored and the column geneID will be set as index, regardless of lower or higher version, the column set as index is stored indata.gene_names, the index mentioned here is the index ofdata.genes.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.