cytoqc -- A QC tool for openCyto

cytoqc performs pre-cleaning, pre-gating and post-gating QC checks.

The alternative workflow:

  1. Run cqc_check to see the summary
  2. Manually provide the standard parameter names and cqc_match for selected groups
  3. cqc_fix based on the solution or cqc_drop_groups for unsolvable issues
library(knitr)
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
icuSetCollate(locale="en_US")
library(flowCore)
library(flowWorkspace)
library(cytoqc)
# prepare the test data
data("GvHD")
fs <- GvHD
data_dir <- tempfile()
dir.create(data_dir)
write.flowSet(fs, data_dir)

Load the FCS

files <- list.files(data_dir, ".fcs", full.names = TRUE)
cqc_data <- cqc_load_fcs(files)
cqc_data

QC for marker

#simulate channel discrepancy

cf <- cqc_data[[1]]
cf_rename_marker(cf, "CD15 FITC", "cd15")
cf_rename_marker(cf, "CD33 APC", "apc cd33")


#redundant
cf <- cqc_data[[2]]
markernames(cf) <- c(`FL2-A` = "markerA")
#summarise marker groups
groups <- cqc_check(cqc_data, "marker")
groups

Match against the references

res <- cqc_match(groups, ref = c("cd15", "cd45", "cd14", "cd33"))
res
cqc_fix(res)

update checks

groups <- cqc_check(cqc_data, "marker")
groups


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