Deploy a Shiny app to modify the estimated gate cutoff placement.
Source:R/Coereba_App.R
Coereba_App.Rd
Deploy a Shiny app to modify the estimated gate cutoff placement.
Examples
library(flowCore)
library(flowWorkspace)
library(openCyto)
library(data.table)
File_Location <- system.file("extdata", package = "Coereba")
TheCSV <- file.path(File_Location, "GateCutoffsForNKs.csv")
FCS_Files <- list.files(path = File_Location, pattern = ".fcs", full.names = TRUE)
UnmixedFCSFiles <- FCS_Files[1]
UnmixedCytoSet <- load_cytoset_from_fcs(UnmixedFCSFiles,
truncate_max_range = FALSE, transformation = FALSE)
UnmixedGatingSet <- GatingSet(UnmixedCytoSet)
Markers <- colnames(UnmixedCytoSet)
KeptMarkers <- Markers[-grep("Time|FS|SC|SS|Original|-W$|-H$|AF", Markers)]
biex_transform <- flowjo_biexp_trans(channelRange = 256, maxValue = 1000000,
pos = 4.5, neg = 0, widthBasis = -1000)
TransformList <- transformerList(KeptMarkers, biex_transform)
flowWorkspace::transform(UnmixedGatingSet, TransformList)
#> A GatingSet with 1 samples
UnmixedGates <- fread(file.path(path = File_Location,
pattern = 'GatesUnmixed.csv'))
UnmixedGating <- gatingTemplate(UnmixedGates)
#> Adding population:singletsFSC
#> Adding population:singletsSSC
#> Adding population:singletsSSCB
#> Adding population:nonDebris
#> Adding population:lymphocytes
#> Adding population:live
gt_gating(UnmixedGating, UnmixedGatingSet)
#> Gating for 'singletsFSC'
#> done!
#> done.
#> Gating for 'singletsSSC'
#> done!
#> done.
#> Gating for 'singletsSSCB'
#> done!
#> done.
#> Gating for 'nonDebris'
#> done!
#> done.
#> Gating for 'lymphocytes'
#> The prior specification has no effect when usePrior=no
#> Using the serial version of flowClust
#> done!
#> done.
#> Gating for 'live'
#> done!
#> done.
#> finished.
# Coereba_App()