Skip to main content

Convert PhenoImager output .tif tiles to a single OME-TIFF with correct metadata

Project description

phenoimager2mc

Formatting PhenoImager .tif output files to be compatible with the MCMCIRO pipeline and ASHLAR.

Description

Raw data: The PhenoImager software outputs one float32 .tif file per tile and cycle containing all channels. The metadata is unstandardized. Goal: For analysing the data within MCMCIRO (initial registration with ASHLAR), one stacked ome-tif file per channel containing all tiles and cycles is required. Steps in this module:

  • Extraction of metadata from unstandardized tif files
  • Creation of stacked and correct ome-tiff files readable for ASHLAR
  • Conversion from float32 to uint16
  • Normalization to max or 99th percentile (user's choice)

Usage

CLI

Input

The CLI script scripts/phenoimager2mc.py requires 3 inputs

  • The path to the folder containing all .tif files from one cycle with -i or --input
  • The number of markers that was used in this cycle with -m or --num_markers
  • The normalization method that the intensities per cycle should be normalized with. Either 99th or max with -n or --normalization

Output

  • Output .tif file containing all tiles and channels of one cycle with -o or --output

Docker usage

If you want to run the module directly from a pre-configured container with all the required packages, you can either build the docker container yourself or pull it from the Github container registry.

To build the container run:

git clone https://github.com/SchapiroLabor/phenoimager2mc.git
docker build -t phenoimager2mc:latest .
docker run phenoimager2mc:latest python phenoimager2mc.py

To pull the container from the Github container registry (ghcr.io):

## Login to ghcr.io
docker login ghcr.io

## Pull container
docker pull ghcr.io/schapirolabor/phenoimager2mc:latest

Installation

Option 1: Install from PyPI

pip install phenoimager2mc
phenoimager2mc --help

Option 2: Docker

Pull the image:

docker pull ghcr.io/schapirolabor/phenoimager2mc:latest

and run the tool directly, mounting your input and output directories:

docker run --rm -v $(pwd):/data ghcr.io/schapirolabor/phenoimager2mc:latest \
    phenoimager2mc \
    -i /data/input_dir \
    -o /data/output.ome.tif \
    -n 6 \
    -m 99th

Option 3: Development/Conda environment

For development or reproducible research setups:

git clone https://github.com/SchapiroLabor/phenoimager2mc.git
cd Background_subtraction
conda env create -f environment.yml
conda activate phenoimager2mc_env

pip install -e .

run

phenoimager2mc --help

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

phenoimager2mc-0.3.2.tar.gz (43.2 kB view details)

Uploaded Source

Built Distribution

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

phenoimager2mc-0.3.2-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file phenoimager2mc-0.3.2.tar.gz.

File metadata

  • Download URL: phenoimager2mc-0.3.2.tar.gz
  • Upload date:
  • Size: 43.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for phenoimager2mc-0.3.2.tar.gz
Algorithm Hash digest
SHA256 0726705a5ac204ed13845f294a8d1da471b1e42e4771f68bb158e8c0e7deb3b4
MD5 e60bbb101358985b75170efe2d5f5165
BLAKE2b-256 ae61112566116ba929603b1692fa4c46eace7f1c314dbe96774f1dc9d9589145

See more details on using hashes here.

Provenance

The following attestation bundles were made for phenoimager2mc-0.3.2.tar.gz:

Publisher: python-publish.yml on SchapiroLabor/phenoimager2mc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phenoimager2mc-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: phenoimager2mc-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for phenoimager2mc-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97771e21bf824fc23209d19524aaad1ba1e6cc297a2be7bf1896e7e296474953
MD5 8d25c46b842538f7e3841d7198f58c6d
BLAKE2b-256 cee23576d5d2979edf7bcbf891181a42939a564a8a83d20f0704c0fcca3195ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for phenoimager2mc-0.3.2-py3-none-any.whl:

Publisher: python-publish.yml on SchapiroLabor/phenoimager2mc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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