This script has not yet been adapted to the LFBCR Compendium repository! Please contact the author ksankaran@wisc.edu if you are trying to preprocess the data on your own.

library(tidyverse)
library(LFBCR)
raw_data <- load_mibi(params$data_dir, 41, n_lev = params$k_channels - 1)
tiff_paths <- raw_data$tiffs
exper <- raw_data$mibi
raw_data$levels

While we generally observed similar enrichments across patients (e.g., enrichment of PD-1 expression on T cells), we identified several pronounced differences between patients in the cell types expressing different regulatory proteins (Figures S6G and S6H). We found that some patients have predominantly PD1+ CD4+ T cells, whereas others have predominantly PD1+ CD8+ T cells. For example, patient 35 has 368 PD1+ immune cells. Of these, 68% are CD4+ and 8% are CD8+ . Similarly, patient 14 has 390 PD1+ cells. However, of these, 7% are CD4+ and 78% are CD8+ (Figure 5A).

bname <- tiff_paths[params$j] %>%
  basename() %>%
  str_extract("p[0-9]+")
out_dir <- file.path(params$out_dir, "tiles")
dir.create(out_dir, recursive = TRUE)
extract_patches(tiff_paths[params$j], exper, out_dir = out_dir, qsize = params$qsize, basename = bname)


krisrs1128/MSLF documentation built on March 21, 2023, 10:21 a.m.