scalpelStep0 {scalpel} | R Documentation |
Perform Step 0 of SCALPEL.
Description
This step involves data pre-processing. We read in the raw data version of Y and perform standard pre-processing techniques in order to smooth the data both temporally and spatially, remove the bleaching effect, and calculate a standardized fluorescence.
Usage
scalpelStep0(
outputFolder,
rawDataFolder,
videoHeight,
fileType = "R",
processSeparately = TRUE
)
Arguments
outputFolder |
The existing directory where the results should be saved. |
rawDataFolder |
The directory where the raw data version of Y is saved. The data should be a
PxT matrix, where P is the total number of pixels per image frame and T
the number of frames of the video, for which the (i,j)th element contains the
fluorescence of the ith pixel in the jth frame. To create Y, you should
vectorize each 2-dimensional image frame by concatenating the columns of the image frame. If the data is
saved in a single file, it should be named "Y_1.mat", "Y_1.rds", "Y_1.txt", or "Y_1.txt.gz" (depending on |
videoHeight |
The height of the video (in pixels). |
fileType |
Indicates whether raw data is an .rds (default value; |
processSeparately |
Logical scalar giving whether the multiple raw data files should be
processed individually, versus all at once. Processing the files separately may be preferable for larger videos.
The default value is |
Details
Several files containing data from this step and a summary of the step are saved in "outputFolder".
Value
An object of class scalpelStep0
, which can be summarized using summary
, used to run SCALPEL Step 1 using scalpelStep1
,
or can be used with the plotting functions plotFrame
, plotThresholdedFrame
, and plotVideoVariance
.
minRaw, maxRaw, minDeltaf, maxDeltaf
: Minimum and maximum values for the raw and processed videos.partsRaw, partsDeltaf
: Vectors indicating the indices of the raw and processed data files, respectively.nFramesRaw, nFramesDeltaf
: The number of frames in each part of the raw and processed data.lowThreshold, highThreshold
: The default lowest and highest threshold values for image segmentation that may be used in Step 1.Other elements: As specified by the user.
See Also
The entire SCALPEL pipeline can be implemented using the scalpel
function. The
other steps in the pipeline can be run using the scalpelStep1
, scalpelStep2
, scalpelStep3
functions.
Results from this step can be summarized using summary
, loaded at a later time using getScalpelStep0
, and plotted using
plotFrame
, plotThresholdedFrame
, and plotVideoVariance
.
Examples
## 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
#existing folder to save results (update this to an existing folder on your computer)
outputFolder = "scalpelResultsStepByStep"
#location on computer of raw data in R package to use
rawDataFolder = gsub("Y_1.rds", "", system.file("extdata", "Y_1.rds", package = "scalpel"))
#video height of raw data in R package
videoHeight = 30
#run Step 0 of SCALPEL
Step0Out = scalpelStep0(outputFolder = outputFolder,
rawDataFolder = rawDataFolder, videoHeight = videoHeight)
summary(Step0Out)
## End(Not run)