add_expression.gosummaries {GOsummaries} | R Documentation

## Add expression data to gosummaries object

### Description

Function to add expression data and its annotations to a gosummaries object.

### Usage

    add_expression.gosummaries(gosummaries, exp, annotation = NULL)

### Arguments

`gosummaries` | a gosummaries object
`exp` | an expression matrix, with row names corresponding to the names in the Gene_lists slot
`annotation` | a `data.frame` describing the samples, its row names should match with column names of `exp`

### Details

The data is added to the object in a "long" format so it would be directly usable by the ggplot2 based panel drawing functions `panel_boxplot` etc. For each component it produces a data frame with columns:

- x : sample IDs for the x axis, their factor order is the same as on the columns of input matrix

- y : expression values from the matrix

- . . . : sample annotation columns from the annotation table that can be displayed on figure as colors.

### Author(s)

Raivo Kolde <raivo.kolde@eesti.ee>

### Examples

    ## Not run:
    data(gs_limma)
    data(tissue_example)

    # Add just expression without annotations
    gs_limma_exp1 = add_expression.gosummaries(gs_limma, exp =
    tissue_example$exp)

    print(gs_limma_exp1)

    # Add expression with annotations
    gs_limma_exp2 = add_expression.gosummaries(gs_limma, exp =
    tissue_example$exp, annotation = tissue_example$annot)

    print(gs_limma_exp1)

    ## End(Not run)

[Package GOsummaries version 2.30.0 Index]