annotationPlot {PloGO2} | R Documentation

## Function to summarize and plot extracted GO or pathway annotation

### Description

Summarize the information from the GO or pathway annotation list into a table of counts and percentages, and possibly print a few images.

### Usage

    annotationPlot(res.list, percentages = FALSE, plot = TRUE, trimzero = FALSE, type=c("GO", "pathway"))

### Arguments

`res.list` | The list of summarized annotation as generated by `processAnnotation`.
`percentages` | TRUE or FALSE.
`plot` | TRUE or FALSE: should plots be printed.
`trimzero` | TRUE or FALSE: should GO categories with no counts be removed. This is not really relevant when a small number of GO categories has been selected.
`type` | The type of annotation.

### Value

`counts` | A matrix of counts, GO categories (rows) by samples (cols).
`percentages` | A matrix of percentages, GO categories (rows) by samples (cols).

### Author(s)

D. Pascovici

### See Also

See Also `processAnnotation`

### Examples

    ## Not run:
    # get list of ID's
    GOIDlist <- GOTermList("BP", 2)

    # find existing files
    dir <- system.file("files", package="PloGO2")
    file.names <- paste(dir,c("00100.txt", "01111.txt", "10000.txt",
    			"11111.txt","Control.txt"), sep="/")

    # summarize annotation
    res.list <- processAnnotation(file.names, GOIDlist)

    annotationPlot(res.list, plot=FALSE)

    ## End(Not run)
    # KEGG pathway
    dir <- system.file("files", package="PloGO2")
    fname <- file.path(dir,"PWFiles", c("red.txt", "blue.txt", "yellow.txt", "green.txt", "turquoise.txt") )
    datafile <- file.path(dir,"Abundance_data.csv")

    AnnotIDlist <- c("osa01100","osa01110","osa01230","osa00300","osa00860")

    res.list <- processAnnotation(fname, AnnotIDlist,  data.file.name = datafile)

    annotationPlot(res.list, plot=TRUE, type="pathway")

[Package PloGO2 version 1.4.0 Index]