stereo.io.read_gem¶
- stereo.io.read_gem(file_path, sep='\\t', bin_type='bins', bin_size=100, is_sparse=True, center_coordinates=False, gene_name_index=False)[source]¶
Read the Stereo-seq GEM file, and generate the StereoExpData object.
See also
- Parameters:
file_path (
str) – the path to input file.sep (
str) – the separator string.bin_type (
str) – the bin type includes'bins'or'cell_bins', default to'bins'.bin_size (
int) – the size of bin to merge, whenbin_typeis set to'bins'.is_sparse (
bool) – the expression matrix is sparse matrix, ifTrue, otherwisenp.ndarray.center_coordinates (
bool) – if set it to True, the coordinate of each bin will be the center of the bin, otherwise, the coordinate of each bin will be the left-top corner of the bin.gene_name_index (
bool) – In a v0.1 gem file, the column geneID actually is the gene name, but in v0.2, geneID is just the ID for genes and there is an additional column called geneName which is the gene name, When being v0.2, 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 v0.1,gene_name_indexwill be ignored and the column geneID will be set as index, regardless of v0.1 or v0.2, the column set as index is stored indata.gene_names, the index mentioned here is the index ofdata.genes.
- Return type:
An object of StereoExpData.