Skip to main content

Convert Imaging Mass Cytometry (IMC) output .txt files to OME-TIFF

Project description

imc2mc

Formatting Imaging Mass Cytrometry (IMC) output files to be compatible with the MCMICRO pipeline.

Description

The Hyperion imaging system outputs one .mcd file per slide containing multiple acquisitions as well as one .txt file per acquisition. This script currently uses the .txt files to create a float32 .tif file with corresponding OME-XML metadata per acquisition. To transform the .txt. file to a .tif file we use the readimc package by BodenmillerGroup. Hot pixel filtering is based on the Steinbock pipeline.

Steps in this module:

  • create .tif file from .txt file
  • add OME-XML metadata to .tif file

Usage

CLI

Input

The CLI script imc2mc requires 3 inputs

  • The path to the acquisition .txt file with -i or --input
  • The pixel size in um with -p or --pixel_size
  • The output .tif file with -o or --output. Folder structure will be created if not present.

Optional input:

  • To apply hot pixel filtering, input an integer with -t or --hp_threshold. Based on Steinbock we recommend a threshold of 50.
  • The current version can be accessed with -vor --version

Installation

Option 1: Install from PyPI

pip install imc2mc
imc2mc --help

Option 2: Docker

Pull the image:

docker pull ghcr.io/schapirolabor/imc2mc:latest

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

docker run --rm -v $(pwd):/data ghcr.io/schapirolabor/imc2mc:latest \
    imc2mc \
    -i /data/input_dir \
    -o /data/output.ome.tif \
    -p 1 \
    -t 50

Option 3: Development/Conda environment

For development or reproducible research setups:

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

pip install -e .

run

imc2mc --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

imc2mc-0.0.3.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

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

imc2mc-0.0.3-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file imc2mc-0.0.3.tar.gz.

File metadata

  • Download URL: imc2mc-0.0.3.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imc2mc-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e7382e661fef454c18f2a6b454ef712d9658af049e2e4f6a47852a32a601dc6a
MD5 0837eaa9c3c88645b6b7dc1e0969099c
BLAKE2b-256 312a369ed013f356f073f9a4be6a5925dcd04f6fbaf5f94781956f75019a859c

See more details on using hashes here.

Provenance

The following attestation bundles were made for imc2mc-0.0.3.tar.gz:

Publisher: python-publish.yml on SchapiroLabor/imc2mc

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

File details

Details for the file imc2mc-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: imc2mc-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imc2mc-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d0994d98b574389993430f9786519f59e978600c963f40464d83ae50215e41aa
MD5 843b90f50db1a1ad178feda462816186
BLAKE2b-256 0751cc47a8c59867c0cb20fad9682d2c91aa4689fa423b85996433d709db077e

See more details on using hashes here.

Provenance

The following attestation bundles were made for imc2mc-0.0.3-py3-none-any.whl:

Publisher: python-publish.yml on SchapiroLabor/imc2mc

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