Description Usage Arguments Details Value See Also Examples
View source: R/SCALPEL_stepFunctions.R
This step involves refinement of the spatial component dictionary from Step 1. We eliminate redundancy in the spatial component dictionary by clustering together preliminary dictionary elements that represent the same neuron, based on spatial and temporal information.
1 | scalpelStep2(step1Output, cutoff = 0.18, omega = 0.2, maxSizeToCluster = 3000)
|
step1Output |
An object of class |
cutoff |
A value in [0,1] indicating where to cut the dendrogram that results from hierarchical clustering of the preliminary dictionary elements. The default value is 0.18. |
omega |
A value in [0,1] indicating how to weight spatial vs. temporal information in the dissimilarity metric
used for clustering. If |
maxSizeToCluster |
Optional advanced user argument: The maximum number of preliminary dictionary elements to cluster at once. We attempt to cluster each
overlapping set of preliminary dictionary elements, but if one of these sets is very large (e.g., >10,000), memory issues may
result. Thus we perform a two-stage clustering in which we first cluster together random sets of size
approximately equaling |
Several files containing data from this step and a summary of the step are saved in the folder
"outputFolder/Step1_version/Step2_omega_omega_cutoff_cutoff" where version
is a 5-digit unique
identifier that is automatically generated in Step 1 and omega
and cutoff
are the user-supplied parameters.
An object of class scalpelStep2
, which can be summarized using summary
, used to run SCALPEL Step 3 using scalpelStep3
,
or can be used with the plotting functions plotCluster
and plotSpatial
.
A
: A matrix containing the dictionary elements, where the ith column of A
is a vector of 1's and 0's, indicating whether each pixel is contained in the ith dictionary element.
repComps
: A vector where the ith element indicates which preliminary dictionary element is the ith representive
component. That is, A[,i]=step1Output$Azero[,repComps[i]]
.
clusterID
: A vector whose ith element indicates which of the dictionary elements in A
is the
representative for the ith preliminary dictionary element.
overlapSetID
: A vector indicating which preliminary dictionary elements overlap, with the ith element
giving the group index for the ith preliminary dictionary element.
treeList
: A list of length max(overlapSetID)
with the ith element containing an object of class protoclust
corresponding
to prototype clustering for the preliminary dictionary elements with overlapSetID=i
. If two-stage clustering was done for a
particular set, then the element will be NULL
.
Other elements: As specified by the user or returned from a previous step.
The entire SCALPEL pipeline can be implemented using the scalpel
function. The
other steps in the pipeline can be run using the scalpelStep0
, scalpelStep1
, scalpelStep3
functions.
Results from this step can be summarized using summary
, loaded at a later time using getScalpelStep2
, and plotted using
plotCluster
and plotSpatial
.
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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 "scalpelStep1" function
#run Step 2 of SCALPEL
Step2Out = scalpelStep2(step1Output = Step1Out)
summary(Step2Out)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.