Jupyter notebooks

TissUUmaps can easily be used inside a Jupyter Notebook or Jupyter Lab.

Simple example to load an image in TissUUmaps:

import tissuumaps.jupyter as tj
viewer = tj.loaddata(["image.png"])

viewer.screenshot()

tissuumaps.jupyter

Module used to run TissUUmaps from a Jupyter Notebook or from Jupyter Lab.

tissuumaps.jupyter.opentmap(path, port=5100, host='localhost', height=700)[source]

Open a tmap project

Parameters
  • path (str) – The path to a tmap file

  • port (int) – The port to run the TissUUmaps server

  • host (str) – The host to run the TissUUmaps server

  • height (int) – The height of the jupyter iframe

Returns

The TissUUmaps viewer

Return type

TissUUmapsViewer

tissuumaps.jupyter.loaddata(images=[], csvFiles=[], xSelector='x', ySelector='y', keySelector=None, nameSelector=None, colorSelector=None, piechartSelector=None, shapeSelector=None, scaleSelector=None, fixedShape=None, scaleFactor=1, colormap=None, compositeMode='source-over', boundingBox=None, port=5100, host='localhost', height=700, tmapFilename='_project', plugins=[])[source]

Load data in TissUUmaps

Parameters
  • images (list | str) – List of images or single image to display

  • csvFiles (list | str) – List of csv files or single csv file to display

  • xSelector (str) – Name of the csv column defining the X coordinates

  • ySelector (str) – Name of the csv column defining the Y coordinates

  • keySelector (str) – Name of the csv column defining the grouping key

  • nameSelector (str) – Name of the csv column defining the group name

  • colorSelector (str) – Name of the csv column defining the group color

  • piechartSelector (str) – Name of the csv column defining pie-charts

  • shapeSelector (str) – Name of the csv column defining markers’ shape

  • scaleSelector (str) – Name of the csv column defining markers’ scale

  • fixedShape (int) – Name of the markers’ shape

  • scaleFactor (int) – Global scale of markers

  • colormap (str) – Name of the colormap used if colorSelector is set

  • compositeMode – (str): Composite mode used for images

  • boundingBox (list) – [X,Y,W,H] of the bounding box to display

  • port (int) – The port to run the TissUUmaps server

  • host (str) – The host to run the TissUUmaps server

  • height (int) – The height of the jupyter iframe

  • tmapFilename (str) – Name of the project file that will be created

  • plugins (list) – List of plugins to add to the tmap project

Returns

The TissUUmaps viewer

Return type

TissUUmapsViewer

class tissuumaps.jupyter.TissUUmapsViewer(server, image, height=700)[source]

Class representing a TissUUmaps viewer instance

screenshot()[source]

Capture the TissUUmaps viewport and display image in the Notebook.

class tissuumaps.jupyter.TissUUmapsServer(slideDir, port=5000, host='0.0.0.0')[source]

Class representing a TissUUmaps server instance