Skip to main content

Tissue Tag: jupyter image annotator

Project description

TissueTag: Jupyter Image Annotator

TissueTag consists of two major components:

  1. Jupyter-based image annotation tool:Utilising 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 labelled images* (e.g., cortex, medulla) and logs all tissue labels, and annotation resolution and colours for reproducibility.

  2. Mapping annotations to data: This components converts the pixel based annotations to an hexagonal grid to allow calculation of distances between morphological structures offering continuous annotation. This calculation is dependent of the grid sampling frequency and the number of grid spots that we define as a spatial neighborhood. This 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.

Annotator: Enables interactive annotation of predefined anatomical objects via convex shape filling while toggling between reference and annotation image.

We envision this tool as a starting point, 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 two 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 sparse manual annotations) then training a random forest pixel 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 calculate 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 found a solution that works 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

Project details


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.1.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

tissue_tag-0.2.1-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file tissue_tag-0.2.1.tar.gz.

File metadata

  • Download URL: tissue_tag-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e65b68fad2829ba79cb17e1c8995c743ed9aece992aff4ba6a09d7560cc84496
MD5 5b89ae2fe073b0206d00353eb839f9e9
BLAKE2b-256 c79ffafc631883dd5028b1a76f900903b195d3086cece53ca47cd8379d12dd95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tissue_tag-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e47a26f09d7332e5143f2e328149356e73c32a889dade2b43b8f5a12260cdff
MD5 c56ae54b3e37a074cd66dca818b84d35
BLAKE2b-256 eaf25d8a16450e484c7480c91f2d14c51a457dc281951fdebbf38189c6fa6579

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page