QC for DC panel

library(knitr)
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(kableExtra)
library(flowCore)
library(flowWorkspace)
library(cytoqc)
# devtools::load_all()
path <- "~/remote/fh/fast/gottardo_r/mike_working/lyoplate_out/parsed"
centers <- c('BIIR','CIMR','Miami','NHLBI','Stanford','UCLA','Yale')

Load gs

panel <- "DC"
gslist <- sapply(centers, function(center) {
  message("Center: ", center)
  gs <- load_gs(file.path(path, center, panel), select = 1)
})

Check marker

cqc_data <- cqc_gs_list(gslist)
check_res <- cqc_check(cqc_data, "marker")
check_res

Match reference

match_res <- cqc_match(check_res, ref = 7)
match_res

Apply the match

cqc_fix(match_res)
cqc_check(cqc_data, "marker")

Check panel

res <- cqc_check(cqc_data, "panel", by = "marker")
res

Standarize the panel

res <- cqc_match(res, ref = 2)
res
cqc_fix(res)
cqc_check(cqc_data, "panel")

check gates

res <- cqc_check(cqc_data, "gate")
res
diff(res)
match_res <- cqc_match(res, ref = 2)
match_res

Singlets are not important for analysis thus can be safely deleted (actually hidden)

cqc_fix(match_res)

Check channel again

res <- cqc_check(cqc_data, "channel")
res
match_res <- cqc_match(res, ref = 4)
match_res

W/H scatter are for singlets gate thus can be safely removed

cqc_fix(match_res)

Merge the standarized data

gs <- merge_list_to_gs(gslist)
gs


RGLab/cytoqc documentation built on Jan. 25, 2023, 11:05 p.m.