Description Usage Arguments Details Value Examples
These functions are used to subset ClusterExperiment objects, either by removing samples, genes, or clusterings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## S4 method for signature 'ClusterExperiment'
removeClusterings(x, whichClusters)
## S4 method for signature 'ClusterExperiment'
removeClusters(
x,
whichCluster,
clustersToRemove,
makePrimary = FALSE,
clusterLabels = NULL
)
## S4 method for signature 'ClusterExperiment,ANY,character,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'ClusterExperiment,ANY,logical,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'ClusterExperiment,ANY,numeric,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'ClusterExperiment'
subsetByCluster(
x,
clusterValue,
whichCluster = "primary",
matchTo = c("name", "clusterIds")
)
|
x |
a ClusterExperiment object. |
whichClusters |
argument that can be either numeric or character vector
indicating the clusterings to be used. See details of |
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 |
clustersToRemove |
numeric vector identifying the clusters to remove (whose samples will be reassigned to -1 value). |
makePrimary |
whether to make the added cluster the primary cluster
(only relevant if |
clusterLabels |
label(s) for the clusters being added. If |
i, j |
A vector of logical or integer subscripts, indicating the rows and columns to be subsetted for |
... |
The arguments |
drop |
A logical scalar that is ignored. |
clusterValue |
values of the cluster to match to for subsetting |
matchTo |
whether to match to the cluster name
( |
removeClusterings
removes the clusters given by
whichClusters
. If the primaryCluster
is one of the clusters
removed, the primaryClusterIndex
is set to 1 and the dendrogram and
coclustering matrix are discarded and orderSamples is set to
1:NCOL(x)
.
removeClusters
creates a new cluster that unassigns samples
in cluster clustersToRemove
(in the clustering defined by
whichClusters
) and assigns them to -1 (unassigned)
Note that when subsetting the data, the dendrogram information and the co-clustering matrix are lost.
A ClusterExperiment
object.
removeClusterings
returns a ClusterExperiment
object,
unless all clusters are removed, in which case it returns a
SingleCellExperiment
object.
subsetByCluster
subsets the object by clusters in a clustering
and returns a ClusterExperiment object with only those samples
1 2 3 4 5 6 7 8 9 | #load CE object
data(rsecFluidigm)
# remove the mergeClusters step from the object
clusterLabels(rsecFluidigm)
test<-removeClusterings(rsecFluidigm,whichClusters="mergeClusters")
clusterLabels(test)
tableClusters(rsecFluidigm)
test<-removeClusters(rsecFluidigm,whichCluster="mergeClusters",clustersToRemove=c("m01","m04"))
tableClusters(test,whichCluster="mergeClusters")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.