scalpelStep2 {scalpel}R Documentation

Perform Step 2 of SCALPEL.

Description

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.

Usage

scalpelStep2(step1Output, cutoff = 0.18, omega = 0.2, maxSizeToCluster = 3000)

Arguments

step1Output

An object of class scalpel or scalpelStep1, which result from running the scalpel or scalpelStep1 functions, respectively.

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 omega=1, only spatial information is used. The default value is 0.2.

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 maxSizeToCluster and then cluster together the representatives from the first stage. Finally, we recalculate the representatives using all of the preliminary dictionary elements in the final clusters. The default value is 3000. If maxSizeToCluster is set to NULL, single-stage clustering is done, regardless of the size of the overlapping sets. Memory issues may result when using this option to force single-stage clustering if the size of the largest overlapping set of preliminary dictionary elements is very large (e.g., >10,000).

Details

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.

Value

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.

See Also

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.

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

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

#run Step 2 of SCALPEL
Step2Out = scalpelStep2(step1Output = Step1Out)
summary(Step2Out)

## End(Not run)

[Package scalpel version 1.0.3 Index]