@@ -75,13 +75,11 @@ Utility_GatingPlots <- function(x, sample.name, removestrings,
7575
7676 # Pulling Gating Information
7777 if (! is.null(gtFile )){
78- TheXYZgates <- gtFile | > pull(alias )
78+ TheXYZgates <- gtFile | > pull(alias )
7979 if (" *" %in% TheXYZgates ){
8080 gtFile <- TemplateConverter(gtFile )
8181 TheXYZgates <- gtFile | > pull(alias )
82- }
83-
84- } else {
82+ }} else {
8583 message(" No gating reference file provided, returning provided arguments" )
8684 TheXYZgates <- NULL }
8785
@@ -107,6 +105,8 @@ Utility_GatingPlots <- function(x, sample.name, removestrings,
107105 TheDF <- data.frame (df , check.names = FALSE )
108106 x2 <- x
109107
108+ # x <- TheXYZgates[1]
109+ # data <- x2
110110 CompiledPlots <- map(.x = TheXYZgates , .f = GatePlot , data = x2 , TheDF = TheDF ,
111111 gtFile = gtFile , bins = bins , clearance = clearance , name = name )
112112 } else {
@@ -250,12 +250,13 @@ GatePlot <- function(x, data, TheDF, gtFile, bins=270, clearance = 0.2,
250250 theYmax <- theYmax + (clearance * theYmax )}
251251
252252 if (! exists(" theYmax" ) || ! exists(" theXmax" )){
253- Plot <- as.ggplot( ggcyto(data , aes(x = .data [[xValue ]], y = .data [[yValue ]]),
253+ Plot <- ggcyto(data , aes(x = .data [[xValue ]], y = .data [[yValue ]]),
254254 subset = theSubset ) + geom_hex(bins = bins ) + geom_gate(theGate ) + theme_bw() +
255255 labs(title = name ) + theme(strip.background = element_blank(),
256256 strip.text.x = element_blank(), panel.grid.major = element_line(
257257 linetype = " blank" ), panel.grid.minor = element_line(linetype = " blank" ),
258- axis.title = element_text(size = 10 , face = " bold" ), legend.position = " none" ))
258+ axis.title = element_text(size = 10 , face = " bold" ), legend.position = " none" )
259+ Plot <- Luciernaga.as.ggplot(Plot )
259260 } else {
260261 Plot <- as.ggplot(ggcyto(data , aes(x = .data [[xValue ]], y = .data [[yValue ]]), subset = theSubset )) +
261262 geom_hex(bins = bins ) +
0 commit comments