Skip to content

Commit 148be26

Browse files
authored
Merge pull request #25 from BodenmillerGroup/devel
More infos and how to write out compensated images
2 parents ce68df1 + 496f46c commit 148be26

File tree

4 files changed

+51
-18
lines changed

4 files changed

+51
-18
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
"distill", "openxlsx", "ggrepel", "patchwork", "mclust",
3333
"RColorBrewer", "uwot", "Rtsne", "harmony", "Seurat", "SeuratObject", "cowplot",
3434
"kohonen", "caret", "randomForest", "ggridges", "cowplot", "gridGraphics",
35-
"scales"))'
35+
"scales", "tiff"))'
3636
- name: Install Bioconductor dependencies
3737
run: Rscript -e 'BiocManager::install(c("CATALYST", "scuttle", "scater", "dittoSeq", "tidyverse", "BiocStyle", "batchelor", "bluster",
3838
"scran", "lisaClust", "spicyR"))'

05-spillover_matrix.Rmd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,21 @@ For convenience, we will re-set the `channelNames` to their biological targtes:
369369
channelNames(images_comp) <- rownames(spe)
370370
```
371371

372+
## Write out compensated images
373+
374+
In the final step, the compensated images are written out as 16-bit TIFF
375+
files:
376+
377+
```{r write-images, message=FALSE, results='hide'}
378+
library(tiff)
379+
dir.create("data/comp_img")
380+
lapply(names(images_comp), function(x){
381+
writeImage(as.array(images_comp[[x]])/(2^16 - 1),
382+
paste0("data/comp_img/", x, ".tiff"),
383+
bits.per.sample = 16)
384+
})
385+
```
386+
372387
## Save objects
373388

374389
For further downstream analysis, the compensated `SpatialExperiment` and

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ R workflow highlighting analyses approaches for imaging mass cytometry (IMC; or
88

99
## Scope
1010

11-
**This project is under development and will change on a regular basis**
1211

13-
Upon release, this workflow highlights the use of common R/Bioconductor packages to pre-process and analyse single-cell data obtained from segmented IMC images.
12+
This workflow explains the use of common R/Bioconductor packages to pre-process and analyse single-cell data obtained from segmented IMC images.
1413
While we use IMC data as an example, the concepts presented here can be applied to images obtained by other technologies (e.g. CODEX, MIBI, mIF, etc.).
1514
The workflow can be largely divided into the following parts:
1615

17-
1. Preprocessing (reading in the data, spillover correctio)
18-
2. Metrics for quality control
19-
3. Low-dimensional visualization, clustering and/or cell-type classification
20-
4. Visualization of cell- and pixel-level information
21-
5. Spatial analyses
16+
1. Preprocessing (reading in the data, spillover correction)
17+
2. Image- and cell-level quality control, low-dimensional visualization
18+
3. Sample/batch effect correction
19+
4. Cell phenotyping via clustering or classification
20+
5. Image visualization
21+
6. Spatial analyses
2222

2323
## Usability
2424

2525
After cloning the repository, the code can be run as is.
26-
It is continously tested on a ubuntu system using the newest release versions of the used packages.
26+
It is continously tested on a ubuntu system using the newest release versions of the used R packages.
2727

2828
## Contribution
2929

@@ -32,4 +32,23 @@ You can also add sections by forking the repo, adding your changes and issuing a
3232

3333
## Maintainer
3434

35-
[Nils Eling](https://github.com/nilseling)
35+
[Nils Eling](https://github.com/nilseling)
36+
37+
## Contributors
38+
39+
[Vito Zanotelli](https://github.com/votti)
40+
[Daniel Schulz](https://github.com/SchulzDan)
41+
[Jonas Windhager](https://github.com/jwindhager)
42+
[Michelle Daniel](https://github.com/michdaniel)
43+
44+
## Citation
45+
46+
The workflow is currently under development for final publication.
47+
In the meantime please refer to the
48+
[preprint](https://www.biorxiv.org/content/10.1101/2021.11.12.468357v1)
49+
which you can site as follows:
50+
51+
```
52+
Jonas Windhager, Bernd Bodenmiller, Nils Eling (2020). An end-to-end workflow for multiplexed image processing and analysis.
53+
bioRxiv, doi: 10.1101/2021.11.12.468357
54+
```

index.Rmd

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ description: "This bookdown project highlights possible down-stream analyses per
1313

1414
# IMC Data Analysis Workflow {#preamble}
1515

16-
**This project is under development and will change on a regular basis**
17-
18-
Upon release, this workflow highlights the use of common R/Bioconductor packages
16+
This workflow highlights the use of common R/Bioconductor packages
1917
to analyze single-cell data obtained from segmented imaging mass cytometry (IMC)
2018
images. We will not perform multi-channel image processing and segmentation in R
2119
but rather link to available approaches in Section \@ref(processing). While we
@@ -30,11 +28,12 @@ strategies to extract single-cell data from IMC images in Section
3028
Reproducible code written in R is available from Section \@ref(prerequisites)
3129
onwards and the workflow can be largely divided into the following parts:
3230

33-
1. Pre-processing (reading in the data, spillover correction)
34-
2. Metrics for quality control
35-
3. Low-dimensional visualization, clustering and/or cell-type classification
36-
4. Visualization of cell- and pixel-level information
37-
5. Spatial analyses
31+
1. Preprocessing (reading in the data, spillover correction)
32+
2. Image- and cell-level quality control, low-dimensional visualization
33+
3. Sample/batch effect correction
34+
4. Cell phenotyping via clustering or classification
35+
5. Image visualization
36+
6. Spatial analyses
3837

3938
## Feedback and contributing
4039

0 commit comments

Comments
 (0)