plotFeatureBoxplot {clusterExperiment}R Documentation

Plot boxplot of feature values by cluster

Description

Plot a boxplot of the (transformed) values for a particular gene, separated by cluster

Usage

## S4 method for signature 'ClusterExperiment,character,ANY'
plotFeatureBoxplot(object,
  whichCluster, feature, ...)

## S4 method for signature 'ClusterExperiment,missing,ANY'
plotFeatureBoxplot(object,
  whichCluster, feature, ...)

## S4 method for signature 'ClusterExperiment,numeric,character'
plotFeatureBoxplot(object,
  whichCluster, feature, ...)

## S4 method for signature 'ClusterExperiment,numeric,numeric'
plotFeatureBoxplot(object,
  whichCluster, feature, plotUnassigned = FALSE, unassignedColor = NULL,
  missingColor = NULL, main = NULL, assay = NULL, ...)

Arguments

object

a ClusterExperiment object

whichCluster

which clusters to show on the plot

feature

identification of feature to plot, either row name or index

...

arguments passed to boxplot

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 clusterLegend) default.

missingColor

If not NULL, should be character value giving the color for missing (-2) samples (overrides clusterLegend) default.

main

title of plot. If NULL, given default title.

assay

Identifies which assay in the object should be used for the data to be plotted.

Value

A plot is created. The output of boxplot is returned

See Also

boxplot

Examples

#clustering using pam: try using different dimensions of pca and different k
data(simData)

cl <- clusterMany(simData, nReducedDims=c(5, 10, 50), reducedDim="PCA",
clusterFunction="pam", ks=2:4, findBestK=c(TRUE,FALSE),
removeSil=c(TRUE,FALSE))
clusterLegend(cl)[[1]][,"name"]<-letters[1:nClusters(cl,ignoreUnassigned = FALSE)[1]]
plotFeatureBoxplot(cl,feature=1)

[Package clusterExperiment version 2.0.2 Index]