Manual annotation and quantification of IMC pseudoimages
- Install the latest version of Python, taking care to ADD PYTHON TO PATH
- If not already installed you will need to install Microsoft C++ Build Tools (warning 6.7Gb!)
- Video showing installation here.
- Open a command prompt (e.g. Start->cmd)
- Use Python package installer to install some packages:
pip install numpy matplotlib pillow tifffile scikit-image pandas scipy
- Navigate to src directory
- Within src directory create two subdirectories: MCDs and MultiTIFFs
- Copy all .mcd files into MCDs directory
- Open each one using Fluidigm's MCD viewer
- Export contents of each .mcd file as a scaled, 16bit, multi-page .tiff file, into the MultiTIFFs directory
- Navigate to src directory
- Download and save
explore.py
into this directory (right-click link and choose "Save link as..." to download) - Execute
explore.py
(e.g. by double-clicking onexplore.py
) - Will create a new directory in src: PreviewImages
- Will also create subdirectories corresponding to each multipage TIFF in MultiTIFFS
- Will also write two types of 8bit, compressed preview images, derived from multipage TIFF files found in MultiTIFFs, to subdirectories in PreviewImages
- Files named e.g. PATID_laminin_Q.jpg are contrast stretched by stretching histogram to truncate the intensity of the brightest 5% pixels
- Files named e.g. PATID_laminin.jpg are contrast stretched by adaptive equalization
- Will also create sub-directories named geojson_annotations within each PreviewImages directory, to store any annotations
- Download and install QuPath
- Open one of the preview images
- Generate some annotations
- Export the annotations into the relevant geojson_annotations directory
- File->Object data->Export as GeoJSON...
- Choose "All objects" in the Export dropdown menu
- OK -> Write file to the relevant geojson_annotations directory
- Navigate to src directory
- Download and save
annotation.py
into this directory (right-click link and choose "Save link as..." to download) - Execute
annotation.py
(e.g. by double-clicking onannotation.py
) - Generates further versions of preview images highlighting numbered, annotated areas (calculated from .geojson files)
- Generates an overall summary .csv file containing area of each ROI, along with area of positive signal from each channel within each ROI and average positive intensity within each ROI
- Generates correlation matrix, showing Pearson's pairwise correlations between all intensities in positive pixels from all pairs of channels. Note that AB correlation is not equal to BA correlation because of different "positive" pixels in each case.