This code repository has been mainly done to provide code to reproduce our analyses from the paper.
If you are looking for actual code examples how to do compensation, please look into:
- Flow Mass Cytometry: CATALYST https://bioconductor.org/packages/release/bioc/html/CATALYST.html
- Imaging Mass Cytometry: imcRtools + CATALYST: https://bodenmillergroup.github.io/IMCDataAnalysis/spillover-correction.html
This repository contains scripts used to reproduce a majority of figures from the paper "Compensation of signal spillover in suspension and imaging mass cytometry" by Stéphane Chevrier*, Helena L. Crowell*, Vito R.T. Zanotelli*, Stefanie Engler, Mark D. Robinson, and Bernd Bodenmiller which is published in 'Cell Systems' as "Compensation of Signal Spillover in Suspension and Imaging Mass Cytometry" (http://www.cell.com/cell-systems/abstract/S2405-4712(18)30063-2)
The bioRxiv version was made available under the name "Channel crosstalk correction in suspension and imaging mass cytometry": https://www.biorxiv.org/content/early/2017/09/07/185744
The raw data is available from Mendeley data under the DOI code 10.17632/v58yj49pfr The CATALYST package developed specifically to allow a user friendly usage of the developped spillover estimation and compensation approach can be found for download at: http://bioconductor.org/packages/CATALYST A link to the light version of the web app, installation instructions, example datasets, and vignettes for CATALYST are available from the project page: https://catalyst-project.github.io/.
The repository is organized in the following scripts:
- retrieve_data.R:
Retrieves the data from the Mendeley repository. If you want to run the scripts below this needs to be run first.
- dilution_series.Rmd:
code
markdown
html
Assesses the linearity of spillover based on a dilution series of antibody staining This will reproduce, among other plots, the following figures from the paper:
- Figure 1, C
- even_odd.Rmd:
code
markdown
html
Assessment of compensation accuracy for single stained beads vs. multiplexed cells. Reproduces:
- Figure 2, C
- bc_titration.Rmd:
code
markdown
html
Support for our hypothesis that the difference observed in spillover between single-stained beads and multiplexed-stained cells is due to saturation effects. Reproduces:
- Figure 2, D+E
- correlation_analysis.Rmd:
code
markdown
html
Explore how spillover and compensation affect correlations and phenograph clusters in a cyTOF dataset. This will reproduce, among other plots, the following figures from the paper:
- Figure 3, A-E
- Figure S4, A-C
- spillmat_estimation_stability.Rmd:
code
markdown
html
Comparison and stability analysis of spillover matrices obtained from 11 single stained bead replicates, 2 IMC measurements, and Fluidigm. Reproduces:
- Figure S3, B-E
- Figure S5, B-E
- method_comparison.Rmd:
code
markdown
html
Compares different methods for spillover estimation. Reproduces:
- Figure S2, C-F
- plotting-wrappers.R:
code
Contains helper functions to plot the results of the above scripts.
- imc_generatespillmat_long.Rmd:
code
markdown
html
A detailed step by step script to calculate a spillover matrix from a single stain experiment. Reproduces:
- Figure S5, A
- Figure 4, A
-
imc_generatespillmat_short.Rmd:
code
markdown
html
A short version of a script to generate a spillover matrix from an IMC single stain experiment in one step using a convenience function -
imc_preprocessing.ipynb:
code
A script to convert & process IMC images for segmentation. Adapted from: https://github.com/BodenmillerGroup/ImcSegmentationPipeline The CellProfiller & ilastik pipelines that were used for the IMC image analysis can be found in the data/IMC_image/pipelines
The segmentation output produced by the IMC image analysis is then analysed in script 7). The compensated images saved were used in ImageJ to reproduce Figure 4, B
-
imc_adaptsm.Rmd:
code
markdown
html
Adapts the spillover matrix and saves it as a TIFF for usage in the CellProfiller pipeline. -
imc_cpoutput_analysis.Rmd:
code
markdown
html
Script that was used to compensate the CellProfiller output and display the segmented data on the masks. Reproduces:
- Figure 3, D and produces the mask images visualized in Fig 4 C using ImageJ
- spillover_imc_helpers.R:
code
Contains various helper functions used in the scripts above.
Bonus scripts:
- imc_comp_txt_example.Rmd:
code
markdown
html
A supplemenatry script that shows how to directly compensate an IMC .txt raw data file and save it back as a .txt This was requested in the imc-forum: https://www.imc-forum.org/viewtopic.php?f=4&p=30#p13