Skip to main content

TissueTag: Jupyter Image Annotator

TissueTag consists of two major components:

  1. Jupyter-based image annotation tool: Utilizing the Bokeh Python library (http://www.bokeh.pydata.org) empowered by Datashader (https://datashader.org/index.html) and holoviews (https://holoviews.org/index.html) for pyramidal image rendering. This tool offers a streamlined annotation solution with subpixel resolution for quick interactive annotation of various image types (e.g., brightfield, fluorescence). TissueTag produces labeled images (e.g., cortex, medulla) and logs all tissue labels, and annotation resolution and colors for reproducibility.
  2. Mapping annotations to data: This component facilitates the migration of annotations to spots/cells based on overlap with annotated structures. It also logs the minimum Euclidean distance of each spot/cell to the discrete annotations, offering continuous annotation. This contains spatial neighborhood information, adding to the x-y coordinates of a given spot or cell, and is foundational for calculating a morphological axis (OrganAxis, see tutorials).

Note: A labeled image is an integer array where each pixel value (0,1,2,...) corresponds to an annotated structure.

Tools

  1. Annotator: Enables interactive annotation of predefined anatomical objects via convex shape filling.
  2. Scribbler: Designed for broadly labeling an image. It uses these labels to train a pixel classifier on the remainder of the image. (will be reomved in next versions)
  3. Poly Annotator: Suited for labeling discrete, repetitive objects (e.g., lobules or separate compartments), this tool creates polygons around objects and labels them based on the object count (e.g., lobule_0, lobule_1). (will be reomved in next versions)

We envision this tool as a foundational starting point as its simplicity and transparent nature allows for many potential enhancements, additions and spinoffs. So contributions and suggestions are highly appreciated!

Installation

  1. You need to install either jupyter-lab or jupyter-notebook
  2. Install TissueTag using pip:
pip install tissue-tag

How to use

We supply some examples of usage for TissueTag annotations:

  1. visium spatial transcriptomics -
    in this example we annotate a postnatal thymus dataset by calling the major anatomical regions in multiple ways (based on marker gene expression or sprse manual annotations) then training a random forest classifier for initial prediction followed by manual corrections visium annotation tutorial and migration of the annotations back to the visium anndata object mapping annotations to visium. We also show how to calulcate a morphological axis (OrganAxis) in 2 ways.
  2. IBEX single cell multiplex protein imaging - in this example we annotate a postnatal thymus image by calling the major anatomical regions and training a random forest classifier for initial prediction followed by manual corrections IBEX annotation tutorial. Next, we show how one can migrate these annotations to segmented cells and calulcate a morphological axis (OrganAxis) IBEX mapping annotations tutorial.

Usage on a cluster vs local machine

Bokeh interactive plotting required communication between the notebook instance and the browser. We have tested the functionality of TissueTag with jupyter lab or jupyter notebooks but have not yet implemented a solution for jupyter hub. In addition SSH tunnelling is not supported as well but if you are accessing the notebook from outside your institute, VPN access should work fine.

How to cite:

please cite the following preprint - https://www.biorxiv.org/content/10.1101/2023.10.25.562925v1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tissue-tag-0.2.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tissue_tag-0.2.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file tissue-tag-0.2.0.tar.gz.

File metadata

  • Download URL: tissue-tag-0.2.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tissue-tag-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ede7111adfd0762fa96cd071d3e1072410aa04b7962f8bfe79a791a3f9bfede2
MD5 98f7e0598ddc8586fa49c67968589a8d
BLAKE2b-256 a7f057e740fef1942455755541e67aaf50f3a74a2c35f9ea14a183487b914215

See more details on using hashes here.

File details

Details for the file tissue_tag-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tissue_tag-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tissue_tag-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bd4c4fcc47fa05e803a265dac3776e976080f104d3bc2c7d85ee2c6375ebb78
MD5 044bb3b5b8a620625d07787e58ac12ad
BLAKE2b-256 f2e671d8d535d0e8646b0c2e664e8310c1a7d098e708b8b41136074c293511ba

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.2

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page