writeAnnotation: Function to print GO/pathway annotation to files

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/writeAnnotation.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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")

PloGO2 documentation built on Nov. 8, 2020, 5:40 p.m.