# #设置,包括= FALSE ----------------------------------------------------- knitr: opts_chunk美元集(echo = TRUE,结果=“标记”,消息= FALSE,警告= FALSE ) ## ----------------------------------------------------------------------------- 库(ncdfFlow)库(flowWorkspace)图书馆(CytoML) dataDir <执行(“extdata”,包=“flowWorkspaceData”)#加载原始FCS fs < - load_cytoset_from_fcs (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”)gatingset_to_cytobank (gs、输出文件)# # - eval = FALSE --------------------------------------------------------------- # 输出文件< - tempfile (fileext =“.wsp”)# gatingset_to_flowjo (gs、输出文件)