writeAnnotation {PloGO2} | R Documentation

## Function to print GO/pathway annotation to files

### Description

Prints available GO or pathway annotation and abundance (if existing) in a long format or an adjacency matrix type format.

### Usage

    writeAnnotation(res.list, datafile = NULL, datafile.ignore.cols = 1, format = c("list","matrix"),outFolder=tempdir())

### Arguments

`res.list` | The result of processAnnotation
`datafile` | A CSV file with additional experimental information, if any
`datafile.ignore.cols` | The number of columns to ignore in the data file
`format` | Either `"matrix"` or `"list"`.
`outFolder` | The output files folder

### Details

The GO/pathway information and abundance will be printed to files. If the format is `"list"`, then the files will be text files, and each category will be printed in turn, with all the identifiers and data underneath. If the format is `"matrix"`, then the data will be printed in matrix format, identifiers (rows) by GO categories (columns), with the abundance data appended.

### Value

The path of the annotation folder.

### Author(s)

D. Pascovici

### See Also

`processAnnotation`

### Examples

    # choose two simple GO categories
    termList <- c("response to stimulus", "transport", "signaling")
    GOIDmap <- getGoID(termList)
    GOIDlist <- names(GOIDmap)

    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)

    # write to "matrix" or alternatively "list" format
    writeAnnotation(res.list, format="matrix")

[Package PloGO2 version 1.6.0 Index]