Generate RGB composite single-cell images

Generate RGB composite single-cell images#

  • plot rgb single cell images
  • plot rgb single cell images
  • plot rgb single cell images
Downloading...:   0%|          | 0.00/213k [00:00<?, ?B/s]
Downloading...:   9%|▊         | 18.4k/213k [00:00<00:01, 137kB/s]
Downloading...:  22%|██▏       | 46.1k/213k [00:00<00:00, 194kB/s]
Downloading...:  63%|██████▎   | 133k/213k [00:00<00:00, 442kB/s]
Downloading...: 100%|██████████| 213k/213k [00:00<00:00, 582kB/s]

import matplotlib.pyplot as plt

from scportrait.data._single_cell_images import dataset2_h5sc
from scportrait.pl.vis import generate_composite

# select images you want to plot and colorize
h5sc = dataset2_h5sc()
images = h5sc.obsm["single_cell_images"][:, 2:5][[0, 2, 5]]

for _i, img in enumerate(images):
    plt.figure()
    plt.imshow(generate_composite(img))
    plt.axis("off")

Gallery generated by Sphinx-Gallery