degPlotCluster {DEGreport} | R Documentation

## Plot clusters from degPattern function output

### Description

This function helps to format the cluster plots from `degPatterns()`. It allows to control the layers and it returns a ggplot object that can accept more ggplot functions to allow customization.

### Usage

    degPlotCluster(table, time, color = NULL, points = TRUE,
      boxes = TRUE, smooth = TRUE, lines = TRUE, facet = TRUE)

### Arguments

`table` | `normalized` element from `degPatterns()` output.
`time` | column name to use in the x-axis.
`color` | column name to use to color and divide the samples.
`points` | Add points to the plot.
`boxes` | Add boxplot to the plot.
`smooth` | Add regression line to the plot.
`lines` | Add gene lines to the plot.
`facet` | Split figures based on cluster ID.

### Value

ggplot2 object.

### Examples

    data(humanGender)
    library(SummarizedExperiment)
    library(ggplot2)
    ma <- assays(humanGender)[[1]][1:100,]
    des <- colData(humanGender)
    des[["other"]] <- sample(c("a", "b"), 85, replace = TRUE)
    res <- degPatterns(ma, des, time="group", col = "other", plot = FALSE)
    degPlotCluster(res$normalized, "group", "other")
    degPlotCluster(res$normalized, "group", "other", lines = FALSE)

[Package DEGreport version 1.18.1 Index]