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

st.io.read_gef

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.

  • 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, setting gene_name_index to True means setting column geneName as index, otherwise, setting column geneID as index and the column geneName is stored in data.real_gene_names, if v0.1, gene_name_index will 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 in data.gene_names, the index mentioned here is the index of data.genes.

Return type:

An object of StereoExpData.