degPatterns {DEGreport} | R Documentation

## Make groups of genes using expression profile. Note that this function doesn't calculate significant difference between groups, so the matrix used as input should be already filtered to contain only genes that are significantly different.

### Description

Make groups of genes using expression profile. Note that this function doesn't calculate significant difference between groups, so the matrix used as input should be already filtered to contain only genes that are significantly different.

### Usage

    degPatterns(ma, metadata, minc = 15, summarize = "merge", time = "time",
      col = NULL, consensusCluster = FALSE, reduce = FALSE, cutoff = 0.7,
      scale = TRUE, pattern = NULL, groupDifference = NULL,
      eachStep = FALSE, plot = TRUE, fixy = NULL)

### Arguments

`ma` | log2 normalized count matrix
`metadata` | data frame with sample information. Rownames should match `ma` column names row number should be the same length than p-values vector.
`minc` | integer minimum number of genes in a group that will be return
`summarize` | character column name in metadata that will be used to group replicates. If the column doesn't exist it'll merge the `time` and the `col` columns, if `col` doesn't exist it'll use `time` only. For instance, a merge between summarize and time parameters: control_point0 ... etc
`time` | character column name in metadata that will be used as variable that changes, normally a time variable.
`col` | character column name in metadata to separate samples. Normally control/mutant
`consensusCluster` | Indicates whether using ConsensusClusterPlus or `cluster::diana()`
`reduce` | boolean reduce number of clusters using correlation values between them.
`cutoff` | integer threshold for correlation expression to merge clusters (0 - 1)
`scale` | boolean scale the `ma` values by row
`pattern` | numeric vector to be used to find patterns like this from the count matrix. As well, it can be a character indicating the genes inside the count matrix to be used as reference.
`groupDifference` | Minimum abundance difference between the maximum value and minimum value for each feature. Please, provide the value in the same range than the `ma` value ( if `ma` is in log2, `groupDifference` should be inside that range).
`eachStep` | Whether apply `groupDifference` at each stem over `time` variable. This only work properly for one group with multiple time points.
`plot` | boolean plot the clusters found
`fixy` | vector integers used as ylim in plot

### Details

It would be used `cluster::diana()` function to detect a value to cut the expression based clustering at certain height or ConsensusClusterPlus. It can work with one or more groups with 2 or more several time points. The different patterns can be merged to get similar ones into only one pattern. The expression correlation of the patterns will be used to decide whether some need to be merged or not.

### Value

list wiht two items:

- `df` is a data.frame with two columns. The first one with genes, the second with the clusters they belong.

- `pass` is a vector of the clusters that pass the `minc` cutoff.

- `plot` ggplot figure.

- `hr` clustering of the genes in hclust format.

- `profile` normalized count data used in the plot.

- `raw` data.frame with values used for the plots.

### Examples

    data(humanGender)
    library(SummarizedExperiment)
    ma <- assays(humanGender)[[1]][1:100,]
    des <- colData(humanGender)
    res <- degPatterns(ma, des, time="group")

[Package DEGreport version 1.16.0 Index]