# #设置,包括= FALSE ------------------------------------------------ knitr: opts_chunk美元集(echo = TRUE,结果=“标记”,消息= FALSE,警告= FALSE ) ## ------------------------------------------------------------------------ 库(flowWorkspace)库(CytoML) dataDir < -执行(“extdata”,包=“flowWorkspaceData”)#加载原始FCS fs < - read.ncdfFlowSet (file.path (dataDir“CytoTrol_CytoTrol_1.fcs”))gs < - GatingSet (fs ) ## ------------------------------------------------------------------------ # 补偿comp < -溢出(fs[[1]])[[“泄漏”]]chnls < - colnames (comp) comp (comp) gs < < -补偿补偿(gs,comp) #transform trans <- flowJo_biexp_trans() trans <- transformerList(chnls, trans) gs <- transform(gs, trans) ## ----warning=FALSE------------------------------------------------------- library(openCyto) #加载tcell面板的原始模板tbl <- data.table::fread(system.file("extdata/gating_template/tcell.csv", package = "openCyto")) #修改一些参数以适应当前数据范围tbl[5, gating_args:= "gate_range = c(1e3, 3e3)"] tbl[c(8,11), gating_args:= "gate_range = c(2e3, 3e3)"] #将新模板写入磁盘gtFile <- tempfile() write.csv(tbl, file = gtFile) ##重新加载新模板gt <- gatingTemplate(gtFile, autostart = 1L) #运行浇注浇注(gt, gs) #隐藏不感兴趣的闸门切换。helperGates (gt, gs) #可视化盖茨图书馆(ggcyto) autoplot (gs [[1 ]]) ## ------------------------------------------------------------------------ 输出文件< - tempfile (fileext =“xml”)GatingSet2cytobank (gs、输出文件 ) ## ------------------------------------------------------------------------ 输出文件< - tempfile (fileext =“.wsp”)GatingSet2flowJo (gs、输出文件)