Skip to main content

Python library and runners for tglow pipeline, interfacing with plate/row/col/field.ome.tiff images and Revity Opera Phenix and Operetta exports

Project description

Tglow: Core Python component of the tglow imaging pipeline

tglow-core is the Python core component of the Tglow high-content imaging (HCI) analysis pipeline. It provides utilities to index and read multi-well plate images and parsers for PerkinElmer (Opera Phenix / Operetta) exports. The package is used by the tglow-pipeline workflows to load, preprocess and write OME-TIFF images arranged in the common /plate/row/col/field.ome.tiff (CYZX) layout.

Key features

  • Read and write CYZX / ZYX / YX image arrays via AICSImageReader / AICSImageWriter (wrappers around aicsimageio)
  • Parse Revity/PerkinElmer Index.xml exports (PerkinElmerParser) and convert to a simple, Python-friendly index
  • Convert large Revity/PerkinElmer exports to a much lower number of /plate/row/col/field.ome.tiff files
  • Index and query plate/row/col/field image layouts using an ImageQuery object
  • Utilities for registration, flatfield correction and numeric conversions designed to work with tglow-pipeline

Installation

I recommend installing the published PyPI release where possible:

pip install tglow-core

To install the latest development version from the repository (editable install):

git clone https://github.com/TrynkaLab/tglow-core
cd tglow-core
pip install -e .

Basic usage

Build an index from a PerkinElmer export and read a single image:

from tglow.io.tglow_io import PerkinElmerRawReader
from tglow.io.image_query import ImageQuery

reader = PerkinElmerRawReader('path/to/Index.xml', '/data/exports')
iq = ImageQuery.from_plate_well('plate1', 'A01')
image = reader.read_image(iq)  # returns a numpy array

Read and write an OME-TIFF stack organized by plate/row/col/field:

from tglow.io.tglow_io import AICSImageReader, AICSImageWriter
from tglow.io.image_query import ImageQuery

reader = AICSImageReader('/data/plates')
writer = AICSImageWriter('/output/plates')
iq = ImageQuery('plate1', 1, 1, 'field001')
stack = reader.read_stack(iq)
writer.write_stack(stack, iq)

Notes and migration to BioIO

  • This package currently wraps aicsimageio. As that project has been superseded by newer tooling, consider migrating to bioio or equivalent in future releases.

Known issues

There is a known issue with BaSiCpy (https://github.com/peng-lab/BaSiCPy/issues/162). This requires using specific, older versions of hyperactive and gradient-free-optimizers, which can in turn require an older pandas version. The same goes for aicsimageio. The dependency chain can be inconvenient; I'll update this project and migrate to BioIO libraries as newer releases become available.

Acknowledgements

  • Martin Prete: initial XML parsing code adapted for this project

References

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

tglow_core-0.1.2.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

tglow_core-0.1.2-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file tglow_core-0.1.2.tar.gz.

File metadata

  • Download URL: tglow_core-0.1.2.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tglow_core-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b5117a7aad0c857fa27ba66833d2042fa9ad62e78d922d9cc4dc738395cb8bae
MD5 42220b2a86a498af015f11f683fdb646
BLAKE2b-256 c18e0115f5e0a84f4b67407dd3d0a9185e0b5dc6364ad9fa6d35999bc4c94f17

See more details on using hashes here.

File details

Details for the file tglow_core-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tglow_core-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tglow_core-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a1ed4e25e54e2c1e8767bad393ddd12ebf0f56b9d1afd1a14cff793da3bdf21
MD5 b11562f712d3232f49631859fba06bb4
BLAKE2b-256 4c53ade0c38ecf37b32bd4c715009956ba8066d3b32f6a04028aa7c52b265fc7

See more details on using hashes here.

Supported by

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