plotVideoVariance: Plot a summary of the fluorescence in the video.

Description Usage Arguments Value See Also Examples

Description

We plot a heat map of the variance of each pixel across the frames.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotVideoVariance(
  scalpelOutput,
  neuronSet = "",
  videoType = "processed",
  neuronsToOutline = "all",
  shrinkLargest = FALSE,
  shrinkQuantile = 0.95,
  title = "",
  Y = NULL
)

Arguments

scalpelOutput

An object returned by one of the SCALPEL functions: scalpel, scalpelStep0, scalpelStep1, scalpelStep2, or scalpelStep3.

neuronSet

This argument is ignored unless the class of scalpelOutput is scalpel or scalpelStep3, and neuronsToOutline is not "none". It gives which set of neurons should be plotted: use "A" for those resulting from scalpelStep2 and saved as scalpelOutput$A, or use "Afilter" for those resulting from scalpelStep3 and saved as scalpelOutput$Afilter.

videoType

Specify whether to plot the processed data from Step 0 (default; videoType="processed") or raw data (videoType="raw"). This is ignored if Y is provided.

neuronsToOutline

Specify whether to plot outlines of all neurons (default; neuronsToOutline="all"), none of the neurons (neuronsToOutline="none"), or outlines of only the neurons kept using a previous call to reviewNeurons or reviewNeuronsInteractive (neuronsToOutline="kept"). If scalpelOutput is not of the class scalpel, scalpelStep2, or scalpelStep3, this argument is ignored.

shrinkLargest

Logical value indicating whether the values above shrinkQuantile should be shrunk when plotting. Shrinking these values allows us to better visualize the areas with the highest variance fluorescence.

shrinkQuantile

The quantile value above which pixel values will be shrunk. By default, this is the 95th quantile.

title

Label for the title.

Y

An object of class scalpelY, which results from running the getY function. When not specified, Y is automatically read in, but specifying Y is recommended when the user would like to call this function many times, as this avoids reading the video into memory repeatedly.

Value

None

See Also

scalpelStep0, scalpel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
### many of the functions in this package are interconnected so the
### easiest way to learn to use the package is by working through the vignette,
### which is available at ajpete.com/software

#assumes you have run the example for the "scalpel" function

#simplest example with default parameters:
plotVideoVariance(scalpelOutput = scalpelOutput, neuronSet = "Afilter")

#example with optional parameters:
#previous showed summary of processed data,
#can instead show raw data, not outline the neurons found, and add a title
plotVideoVariance(scalpelOutput = scalpelOutput, videoType = "raw",
                 neuronsToOutline = "none", title = "Raw Data")

#if you have video data read in already using 'getY' function, you can provide it
rawY = getY(scalpelOutput = scalpelOutput, videoType = "raw")
plotVideoVariance(scalpelOutput = scalpelOutput, neuronSet = "Afilter", Y = rawY)

## End(Not run)

scalpel documentation built on Feb. 3, 2021, 9:05 a.m.