stereo.io.read_gem#

stereo.io.read_gem(file_path, sep='\\t', bin_type='bins', bin_size=100, is_sparse=True, bin_coor_offset=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, when bin_type is set to 'bins'.

  • is_sparse (bool) – the expression matrix is sparse matrix, if True, otherwise np.ndarray.

  • bin_coor_offset (bool) – if set it to True, the coordinates of bins are calculated as ((gene_coordinates - min_coordinates) // bin_size) * bin_size + min_coordinates + bin_size/2

  • 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, set gene_name_index to True to set column geneName as index, otherwise, set column geneID, if a v0.1 gem file, gene_name_index will be ignored and column geneID is set as index.

Return type:

An object of StereoExpData.