Description Usage Arguments Details Value See Also Examples
Assigns the unassigned samples in a cluster to the nearest cluster based on distance to the medians of the clusters.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## S4 method for signature 'ClusterExperiment'
assignUnassigned(
object,
whichCluster = "primary",
clusterLabel,
makePrimary = TRUE,
whichAssay = 1,
reduceMethod = "none",
...
)
## S4 method for signature 'ClusterExperiment'
removeUnassigned(object, whichCluster = "primary")
|
object |
A Cluster Experiment object |
whichCluster |
argument that can be a single numeric or character value
indicating the single clustering to be used. Giving values that result in more than one clustering will result in an error. See details of |
clusterLabel |
if missing, the current cluster label of the cluster will be appended with the string "_AllAssigned". |
makePrimary |
whether to make the added cluster the primary cluster
(only relevant if |
whichAssay |
which assay to use to calculate the median per cluster and take dimensionality reduction (if requested) |
reduceMethod |
character. A method (or methods) for reducing the size of
the data, either by filtering the rows (genes) or by a dimensionality
reduction method. Must either be 1) must match the name of a built-in
method, in which case if it is not already existing in the object will be
passed to |
... |
arguments passed to |
The function assignUnassigned
calculates the median values of
each variable for each cluster, and then calculates the euclidean distance
of each unassigned sample to the median of each cluster. Each unassigned
sample is assigned to the cluster for which it closest to the median.
All unassigned samples in the cluster are given a clustering, regardless of whether they are classified as -1 or -2.
removeUnclustered
removes all samples that are unclustered
(i.e. -1 or -2 assignment) in the designated cluster of object
(so
they may be unclustered in other clusters found in
clusterMatrix(object)
).
The function assignUnassigned
returns a
ClusterExperiment
object with the unassigned samples assigned to one
of the existing clusters.
The function removeUnassigned
returns a
ClusterExperiment
object with the unassigned samples removed.
1 2 3 4 5 6 7 8 | #load CE object
data(rsecFluidigm)
smallCE<-rsecFluidigm[,1:50]
#assign the unassigned samples
assignUnassigned(smallCE, makePrimary=TRUE)
#note how samples are REMOVED:
removeUnassigned(smallCE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.