A group version of the heatmap option from Luciernaga_Plots
Source:R/Luciernaga_GroupHeatmap.R
Luciernaga_GroupHeatmap.Rd
A group version of the heatmap option from Luciernaga_Plots
Examples
library(flowCore)
library(flowWorkspace)
library(openCyto)
library(data.table)
library(dplyr)
library(purrr)
File_Location <- system.file("extdata", package = "Luciernaga")
FCS_Files <- list.files(path = File_Location, pattern = ".fcs", full.names = TRUE)
UnstainedFCSFiles <- FCS_Files[grep("Unstained", FCS_Files)]
UnstainedCells <- UnstainedFCSFiles[-grep(
"Beads", UnstainedFCSFiles)]
MyCytoSet <- load_cytoset_from_fcs(UnstainedCells[c(1,3,5)],
truncate_max_range = FALSE,transformation = FALSE)
MyGatingSet <- GatingSet(MyCytoSet)
MyGates <- fread(file.path(path = File_Location, pattern = 'Gates.csv'))
MyGatingTemplate <- gatingTemplate(MyGates)
#> Adding population:singletsFSC
#> Adding population:singletsSSC
#> Adding population:singletsSSCB
#> Adding population:nonDebris
#> Adding population:lymphocytes
gt_gating(MyGatingTemplate, MyGatingSet)
#> 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
#> The prior specification has no effect when usePrior=no
#> Using the serial version of flowClust
#> The prior specification has no effect when usePrior=no
#> Using the serial version of flowClust
#> done!
#> done.
#> finished.
removestrings <- c("DR_", "Cells", ".fcs", "-", " ")
StorageLocation <- file.path("C:", "Users", "JohnDoe", "Desktop")
FileLocation <- system.file("extdata", package = "Luciernaga")
pattern = "AutofluorescentOverlaps.csv"
AFOverlap <- list.files(path=FileLocation, pattern=pattern, full.names = TRUE)
reports <- map(.x=MyGatingSet[1:3], .f=Luciernaga_QC, subsets="lymphocytes",
removestrings=removestrings, sample.name="GROUPNAME",
unmixingcontroltype = "cells", Unstained = TRUE,
ratiopopcutoff = 0.001, Verbose = FALSE, AFOverlap = AFOverlap,
stats = "median", ExportType = "data", SignatureReturnNow = FALSE,
outpath = TemporaryFolder, Increments=0.1, SecondaryPeaks=2,
experiment = "Lymphocytes", condition = "Ctrl",
Subtraction = "Internal", SCData="subtracted",
NegativeType="default")
plot <- Luciernaga_GroupHeatmap(reports=reports, nameColumn="Sample",
cutoff=0.02, returntype = "plot")