Skip to main content

Tissue Tag jupyter image annotator

A jupyter-based image annotation tool - TissueTag is powered by the Bokeh python library (http://www.bokeh.pydata.org) and provides a simple annotation solution with subpixel resolution for fast interactive annotation of any image type or kind (brightfield, fluorescence, etc) as well as spatial omics. TissueTag generates discrete annotations (e.g. cortex, medulla etc) but can also output the euclidean distance of each spot/cell to the closest part of a given morphological structure, enabling continuous annotation. This thus holds spatial neighbourhood information that goes beyond the x-y coordinates of a given spot or cell.

Tools

  1. Annotator: This tool allows for the interactive annotation of predefined anatomical objects through convex shape filling.
  2. Scribbler: Aimed at "scribbling" broad labels on an image, this tool uses these labels to subsequently train a pixel classifier on the rest of the image.
  3. Poly Annotator: Designed for labeling discrete, repetitive objects (e.g., lobules or separate compartments or cells), this tool generates polygons around objects and assigns labels to the discrete structures based on the number of objects (e.g., lobule_0, lobule_1, etc.).

We see this tool as a basic start and feel there are many useful applications that could be added, so we welcome any contribution and look forward to suggestions!

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 3 examples of usage for TissueTag annotations:

  1. visium spatial transcriptomics (manual) -
    in this simple example we annotate a postnatal thymus dataset by calling the major anatomical regions manually and migration of the annotations back to the visium anndata object. visium manual tutorial
  2. visium spatial transcriptomics (semi automated) - in this more advanced sample we annotate a postnatal thymus dataset by calling the major anatomical regions based on marker gene expression, then training a random forest classifier for initial prediction followed by manual corrections and migration of the annotations back to the visium anndata object. visium semi-automated tutorial
  3. 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 fluorescent 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.

When using a local machine the show function from bokeh should work with: show(app,notebook_url='localhost:8888')

When running on a cluster, you need to set the port (e.g., 5011) you are using to get it plot properly in the correct place. when using a cluster job with an interactive jupyter lab or jupyter notebook you should use this: show(app,notebook_url=f'{socket.gethostname()}:'+host) where host is your port number e.g. 5011

How to cite:

preprint coming! stay tuned

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.1.8.tar.gz (19.8 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.1.8-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tissue-tag-0.1.8.tar.gz
Algorithm Hash digest
SHA256 cee2e71bd03976b142b156f11ba0904dbd534b12ddb1eb9318ddd45640771e90
MD5 65afc824366ddc3648e653f1dfa7ab6b
BLAKE2b-256 110c37feeb6a6ad669d5e924cb6875810cf80393cd7d6e47f1694ce8019d72be

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tissue_tag-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 18a741fdc0c562d36ac74b478708758910650f77ac6d0f4016e3ecfc60c9598f
MD5 b09e3b98510e0ac025b7d81b68a4d8ab
BLAKE2b-256 a8cba8a0d4f7519829612cd50244c41dd46123c5980735f9d5bf566d2e06c662

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.8 This release

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