merquaco.pixel_classification.create_transcripts_image

merquaco.pixel_classification.create_transcripts_image(transcripts: DataFrame, transcripts_image_path: str | Path = '')

Creates transcripts image from transcripts via 2D histogram

Parameters:
  • transcripts (pd.DataFrame) – Transcripts table

  • transcripts_image_path (str or Path, optional) – Path at which to save transcripts image. Default is ‘’.

Returns:

  • img (np.ndarray) – Histogram of samples in x and y

  • mask_x_bins (np.ndarray) – Array of bin edges in x

  • mask_y_bins (np.ndarray) – Array of bin edges in y