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...:   7%|▋         | 14.3k/213k [00:00<00:02, 90.8kB/s]
Downloading...:  19%|█▉        | 41.0k/213k [00:00<00:01, 146kB/s]
Downloading...:  52%|█████▏    | 111k/213k [00:00<00:00, 301kB/s]
Downloading...: 100%|██████████| 213k/213k [00:00<00:00, 425kB/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