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.
- 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 is the gene name actually, but in a v0.2, geneID just a ID for genes and there is an additional column called geneName where is the gene name, When the version of gem file is v0.2, setgene_name_indexto True to set column geneName as index, otherwise, set column geneID, if a v0.1 gem file,gene_name_indexwill be ignored and column geneID is set as index.
- Return type:
An object of StereoExpData.