Runs PaCMAP via Basilisk
Usage
Utility_PaCMAP(
x,
sample.name,
removestrings,
subset,
columns = NULL,
notcolumns = NULL,
subsample = NULL,
export = FALSE,
outpath = NULL,
...
)
Arguments
- x
A gating set object
- sample.name
Keyword for which sample name is stored
- removestrings
A list of things to remove from sample.name
- subset
The subset of interest from gating hierarchy
- columns
A subset of columns to pass instead
- notcolumns
A subset of columns to remove
- subsample
If downsampling is wanted.
- export
When set to TRUE returns fcs files to specified outpath
- outpath
Location to store new .fcs files
- ...
Additional arguments passed to PaCMAP for fine tuning
Examples
library(BiocGenerics)
library(flowCore)
library(flowWorkspace)
library(openCyto)
library(data.table)
File_Location <- system.file("extdata", package = "Luciernaga")
FCS_Files <- list.files(path = File_Location, pattern = ".fcs",
full.names = TRUE)
Unmixed_FullStained <- FCS_Files[grep("Unmixed", FCS_Files)]
UnmixedFCSFiles <- Unmixed_FullStained[1]
UnmixedCytoSet <- load_cytoset_from_fcs(UnmixedFCSFiles[1],
truncate_max_range = FALSE,transformation = FALSE)
UnmixedGatingSet <- GatingSet(UnmixedCytoSet)
Markers <- colnames(UnmixedCytoSet)
KeptMarkers <- Markers[-grep("Time|FS|SC|SS|Original|-W$|-H$|AF", Markers)]
MyBiexponentialTransform <- flowjo_biexp_trans(channelRange = 256,
maxValue = 1000000,pos = 4.5, neg = 0, widthBasis = -1000)
TransformList <- transformerList(KeptMarkers, MyBiexponentialTransform)
UnmixedGatingSet <- flowWorkspace::transform(UnmixedGatingSet, TransformList)
FileLocation <- system.file("extdata", package = "Luciernaga")
UnmixedGates <- fread(file.path(path = FileLocation, 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.
removestrings <- c("DTR_", ".fcs")
StorageLocation <- file.path("C:", "Users", "JohnDoe", "Desktop")
Markers <- colnames(UnmixedCytoSet)
KeptMarkers <- Markers[-grep("Time|FS|SC|SS|Original|-W$|-H$|AF", Markers)]
SubsetMarkers <- c("BUV496-A", "BUV805-A", "Pacific Blue-A", "BV711-A",
"BV786-A", "Spark Blue 550-A", "PE-A", "APC-Fire 750-A")