Skip to content

Conversion utility/package for imaging mass cytometry (IMC) data

License

Notifications You must be signed in to change notification settings

STTARR/imc-converter

Repository files navigation

background

This package was written as an internal tool at STTARR to interact with Fluidigm imaging mass cytometry files in .txt or .mcd format and write them out as TIFF or OME-TIFF images, which have the advantages of being much smaller in file size because of image compression (neither TXT or MCD files use any sort of compression, despite the fact that MCD files are not human-readable) and usable in other software (e.g. digital pathology platforms for downstream analysis). In comparison, for Fluidigm's official MCD Viewer:

  • The exports to OME-TIFF do not actually follow the OME-TIFF standard:
    • Exported 16-bit OME-TIFFs do not contain the necessary OME-XML
    • Exported 32-bit OME-TIFFs fail to specify required OME-XML attributes for the image dimensions, resulting in image channels being interpreted as time-series images by Fiji/Bio-Formats (and software dependent on it, like QuPath) instead of multichannel images
  • MCD Viewer silently ignores missing data values in TXT files by removing the row entirely

This package exists as both a module for interacting with IMC data in Python (as xarray DataArrays), but also includes a script for batch IMC conversion with an optional graphical interface built using Gooey.

DataArray objects were chosen since they maintain the channel name information, which makes any downstream analysis easier to read compared to a standard numpy array, while still allowing a numpy representation to be accessed (using the .values property), thus being compatible with the standard scientific Python ecosystem.

usage

installation through pip

pip install git+https://github.com/STTARR/imc-converter.git#egg=imc-converter[GUI]

The conversion utility can be accessed using the comand imcconv-gui (for GUI interface, recommended) or imcconv-gui-console --ignore-gooey (command-line script). If this utility is not required, then you can omit the [GUI] flag in the pip command. On Linux, you may need to install the wxPython dependency for Gooey from your package manager or inside of a conda environment (on Windows and Mac, it's available as a wheel on PyPi, so it should be downloaded when invoking pip).

pyinstaller binary

A portable Windows executable generated using pyinstaller is available here.

It can be generated by running: pyinstaller build-win.spec (for --onefile mode) or pyinstaller build-win-onedir.spec (for --onedir mode). Often --onefile mode is slower to start up, since the bootloader needs to then decompress all the data to a temporary directory, which is why this is distributed in --onedir mode.

About

Conversion utility/package for imaging mass cytometry (IMC) data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages