Plot top genes allowing more variables to color and shape points

degPlot(dds, xs, res = NULL, n = 9, genes = NULL, group = NULL,
  batch = NULL, metadata = NULL, ann = c("external_gene_name", "symbol"),
  slot = 1L, log2 = TRUE, xsLab = xs, groupLab = group,
  batchLab = batch)

Arguments

dds

DESeq2::DESeqDataSet object or SummarizedExperiment or Matrix or data.frame.

xs

Character, colname in colData that will be used as X-axes.

res

DESeq2::DESeqResults object.

n

Integer number of genes to plot.

genes

Character of gene names matching rownames of count data.

group

Character, colname in colData to color points and add different lines for each level.

batch

Character, colname in colData to shape points, normally used by batch effect visualization.

metadata

Metadata in case dds is a matrix.

ann

Columns in rowData (if available) used to print gene names.

slot

Name of the slot to use to get count data.

log2

Whether to apply or not log2 transformation.

xsLab

Character, alternative label for x-axis (default: same as xs).

groupLab

Character, alternative label for group (default: same as group).

batchLab

Character, alternative label for batch (default: same as batch).

Value

ggplot showing the expresison of the genes

Examples

data(humanGender) library(DESeq2) idx <- c(1:10, 75:85) dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) dse <- DESeq(dse)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 #> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
degPlot(dse, genes = rownames(dse)[1:10], xs = "group")
#> No genes were mapped to rowData. check ann parameter values.
#> Using gene as id variables