PlotFileScatters {FlowSOM} | R Documentation |
Make a scatter plot per channel for all provided files
PlotFileScatters( input, channels = NULL, yMargin = NULL, yLabel = c("marker"), names = NULL, groups = NULL, color = NULL, legend = FALSE, maxPoints = 50000, ncol = NULL, nrow = NULL, plotFile = "FileScatters.png" )
input |
Either a flowSet, a flowFrame (output from the
|
channels |
Vector of channels that need to be plotted, if NULL (default), all channels from the input will be plotted |
yMargin |
Optional parameter to specify the margins of the y-axis |
yLabel |
Determines the label of the y-axis. Can be "marker" and\or "channel". Default = "marker". |
names |
Optional parameter to provide filenames. If |
groups |
Optional parameter to specify groups of files, should have
the same length as the |
color |
Optional parameter to provide colors. Should have the same
lengths as the number of groups (or 1 if |
legend |
Logical parameter to specify whether the group levels
should be displayed. Default is |
maxPoints |
Total number of data points that will be plotted per channel, default is 50000 |
ncol |
Number of columns in the final plot, optional |
nrow |
Number of rows in the final plot, optional |
plotFile |
Path to png file, default is "FileScatters.png". If
|
List of ggplot objects if plot
is FALSE
,
otherwise filePlot
with plot is created.
# Preprocessing fileName <- system.file("extdata", "68983.fcs", package = "FlowSOM") ff <- flowCore::read.FCS(fileName) ff <- flowCore::compensate(ff, flowCore::keyword(ff)[["SPILL"]]) ff <- flowCore::transform(ff, flowCore::transformList(colnames(flowCore::keyword(ff)[["SPILL"]]), flowCore::logicleTransform())) flowCore::write.FCS(ff[1:1000, ], file = "ff_tmp1.fcs") flowCore::write.FCS(ff[1001:2000, ], file = "ff_tmp2.fcs") flowCore::write.FCS(ff[2001:3000, ], file = "ff_tmp3.fcs") # Make plot PlotFileScatters(input = c("ff_tmp1.fcs", "ff_tmp2.fcs", "ff_tmp3.fcs"), channels = c("Pacific Blue-A", "Alexa Fluor 700-A", "PE-Cy7-A"), maxPoints = 1000)