spectralplot | R Documentation |
This function loads a flowFrame of flowSet and invokes the plotting function. Choose a theme: 'viridis', 'bigfoot', or 'aurora'. Viridis is colourblind accessible. Choose to save to the working directory or display in current session. Choose the number of bins (granularity) of the data. You can normalize to the max median signal for "clean" files. If you misspell an option it will give an error.
spectralplot(
flowfile,
theme = "viridis",
save = FALSE,
bins = 512,
normalize = FALSE,
params = NULL,
guessPop = FALSE,
unstained = NULL
)
flowfile |
A flowSet or flowFrame. |
theme |
Choose a theme: 'viridis' (default), 'bigfoot', or 'aurora'. |
save |
FALSE: in console (default). TRUE : as png file in working directory. |
bins |
Choose the granularity of the data. Between 200 and 1000 works well for most data. |
normalize |
Normalize the data to the max median signal (only for clean signals). TRUE or FALSE (default). |
params |
Specify parameters (in order) to plot. If NULL (default), parameters will be selected based on the cytometer model. |
guessPop |
Try to select only the positive spectral signal (200 events). It is recommend to set normalize to TRUE when using guessPop. |
unstained |
flowFrame of the negative data, only needed if guessPop = TRUE |
Images of full spectrum
Christopher Hall, Babraham Institute
spectralplottingtool
## flowSpectrum has one demo file that can be loaded.
ff <- read.FCS(system.file("extdata", "PE.fcs", package = "flowSpectrum"))
## create plots using spectralplot().
spectralplot(ff, theme='viridis', save=FALSE, bins=512, normalize=FALSE, params=NULL)
## load flowSet and run spectralPlot()
fs <- read.flowSet(list.files('C:/Users/Chris/testspectra', full.names = TRUE))
spectralPlot(fs)
## If the parameters are out of order, or you want a custom order, you need to create a character vector
params <- grep("-W|-H|Time|SC",ff@parameters@data$name,value = TRUE, invert=TRUE)
## If the spectra is "unclean"
spectralPlot(fs, guessPop = TRUE, normalize = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.