plotFeatureBoxplot | R Documentation |
Plot a boxplot of the (transformed) values for a particular gene, separated by cluster
## S4 method for signature 'ClusterExperiment,character'
plotFeatureBoxplot(object, feature, whichCluster = "primary", ...)
## S4 method for signature 'ClusterExperiment,numeric'
plotFeatureBoxplot(
object,
feature,
whichCluster = "primary",
plotUnassigned = FALSE,
unassignedColor = NULL,
missingColor = NULL,
main = NULL,
whichAssay = 1,
...
)
object |
a ClusterExperiment object |
feature |
identification of feature to plot, either row name or index |
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 |
... |
arguments passed to |
plotUnassigned |
whether to plot the unassigned samples as a cluster (either -1 or -2) |
unassignedColor |
If not NULL, should be character value giving the
color for unassigned (-2) samples (overrides |
missingColor |
If not NULL, should be character value giving the color
for missing (-2) samples (overrides |
main |
title of plot. If NULL, given default title. |
whichAssay |
numeric or character specifying which assay to use. See
|
A plot is created. The output of boxplot is returned (see
boxplot
), with additional elements colors
and
clusterIds
that gives the colors and internal ids that match
each boxplot (pulled from clusterLegend
but in the order of plot)
boxplot
data(simData)
#Create a ClusterExperiment object
cl <- clusterMany(simData, nReducedDims=c(5, 10, 50), reducedDim="PCA",
clusterFunction="pam", ks=2:4, findBestK=c(TRUE,FALSE),
removeSil=c(TRUE,FALSE), makeMissingDiss=TRUE)
#give names to the clusters
cl<-renameClusters(cl, whichCluster=1,
value=letters[1:nClusters(cl)[1]])
plotFeatureBoxplot(cl,feature=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.