DillonHammill / CytoExploreR

Interactive Cytometry Data Analysis
60 stars 13 forks source link

Warning about par(pars) argument 1 #150

Open rwbaer opened 2 years ago

rwbaer commented 2 years ago

Briefly describe what you hope to achieve: When applying a transform to my gating set, I seem to be getting a warning that I can't interpret. I don't know what the warning means so I don't know if it is serious. I also don't know how to address it

Any help on what this means and whether it is serious (i.e., likely to affect the analysis)?

Outline the steps taken to attempt to reach this goal (paste code below):

> gsSpill <- cyto_transform(gsSpill,
+                      type = "logicle")
Warning messages:
1: In par(pars) : argument 1 does not name a graphical parameter
2: In par(pars) : argument 1 does not name a graphical parameter

done Warning message: In par(pars) : argument 1 does not name a graphical parameter



**Include any associated screenshots or images here:**
rwbaer commented 2 years ago

I undoubtedly provided less than a repro example. Sorry. Here is a better attempt although perhaps still insufficient. If I can be clearer, just let me know how. The first place I encounter the warning is when trying to create the transformer list. I encounter it again when using cyto_plot_gating_scheme(). This prints out 3 graphs for All events, nonDebris, and singlets. Then it stops.


> library(CytoExploreR)
> library(flowCore)
> library(flowWorkspace)
> library(openCyto)
> 
> library(ggcyto)
> eDate = "2022-05-24"
> 
> # Create subdirectories for output in case they don't exist
> dir.create(file.path(".", "Figures"), showWarnings = FALSE)
> dir.create(file.path(".", "Reports"), showWarnings = FALSE)
> 
> 
> library(CytoExploreR)
> gsTest <- cyto_setup(path = "Samples",
+                      gatingTemplate = "Test-Template.csv",
+                      details = "Samples-Details.csv",
+                      restrict = TRUE)
Loading FCS files into a GatingSet...
Assigning markers to channels...
Experiment-Markers.csv found in working directory.
Updating experiment details...
Samples-Details.csv found in working directory.
Removing unassigned channels...
Setting Test-Template.csv as the active gatingTemplate...
Done!
> 
> # Apply compensation to samples, based on the spill matrix calculated with our calibration beads
> gsTest <- cyto_compensate(gsTest,
+                           spillover = "Spillover-Matrix.csv")
> ## Transform fluorescent channels - default is a logicle transformations 
> #         but this default did not work well here. Can't use line below.
> # gsTest = cytology_transform(gsTest)  ## can't use on this dataset
> 
> # Show us what we have
> cyto_channels(gsTest)
 [1] "TIME_MSW"   "TIME_LSW"   "FSC-HEIGHT" "FSC-AREA"   "FSC-WIDTH"  "SSC-HEIGHT" "SSC-AREA"   "SSC-WIDTH"  "FL1-AREA"  
[10] "FL3-AREA"  
> cyto_markers(gsTest)
     TIME_LSW    FSC-HEIGHT      FSC-AREA      SSC-AREA      FL1-AREA      FL3-AREA 
       "TIME"  "FSC-HEIGHT"    "FSC-AREA"    "SSC-AREA" "Violet-AREA" "Orange-AREA" 
> cyto_fluor_channels(gsTest)
[1] "FL1-AREA" "FL3-AREA"
> 
> # 
> transList <- cyto_transformer_arcsinh(gsTest)
Warning messages:
1: In par(pars) : argument 1 does not name a graphical parameter
2: In par(pars) : argument 1 does not name a graphical parameter
> 
> # Apply our arcsinh transform for better viewing of our data
> # never do this line more than once.  Start over if in doubt.
> gsTest = cyto_transform(gsTest, trans = transList)
Warning messages:
1: In par(pars) : argument 1 does not name a graphical parameter
2: In par(pars) : argument 1 does not name a graphical parameter
> 
> # Note that "root" is the only node
> gs_get_pop_paths(gsTest, path = "auto")
[1] "root"
> 
> # Apply the automatic gating template
> cyto_gatingTemplate_apply(gsTest)
Applying Test-Template.csv to the GatingSet...
Gating for 'nonDebris'
done!
done.
Gating for 'singlets'
done!
done.
Gating for 'Mel'
done!
done.
Gating for 'FL3-AREA+'
done!
done.
Population 'FL3-AREA-'
done!
done.
Gating for 'Mac'
done!
done.
Gating for 'FL1-AREA+'
done!
done.
Population 'FL1-AREA-'
done!
done.
finished.
A GatingSet with 12 samples
> 
> # Now an entire gating tree is present
> gs_get_pop_paths(gsTest, path = "auto")
[1] "root"      "nonDebris" "singlets"  "Mel"       "FL3-AREA+" "FL3-AREA-" "Mac"       "FL1-AREA+" "FL1-AREA-"
> plot(gsTest) 
> cyto_plot_gating_scheme(gsTest)
Error in if (channels[1] == channels[2] | (!.empty(channels[1]) & .empty(channels[2]))) { : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In par(pars) : argument 1 does not name a graphical parameter
2: In par(pars) : argument 1 does not name a graphical parameter
3: In par(pars) : argument 1 does not name a graphical parameter

Test-Template.csv