read.annot.file: Function to read an annotation file.

Description Usage Arguments Details Value Author(s) Examples

View source: R/read.annot.file.R

Description

Accepts GO id's separated by space or semicolon

Usage

1
read.annot.file(fname, format = c("compact","long"))

Arguments

fname

The file name containing GO annotation

format

Either "compact" or "long"; see details

Details

The format is "compact" by default, meaning a text file containing ID's in the first column, and GO identifiers in the second, separated by spaces or semicolons. This is the same as the "Wego native format". A "long" format is also accepted, meaning a text file with two or more columns separated by tabs, containing an identifier, followed by a GO id, followed optionally by other columns which are ignored. The GO id's will first be aggregated for each identifier. GO files in long format can be obtained using for instance biomart, or GoRetriever.

Value

A data frame with two columns, ID's and GO separated by spaces

Author(s)

T. Keighley, D.Pascovici

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# use one of the stored files
dir <- system.file("files", package="PloGO2")
fname <- paste(dir,"00100.txt", sep="/")

# Example with GoRetriever download
longFormat <- paste(dir,"goRetOutput.txt", sep="/")
read.annot.file(fname)
read.annot.file(longFormat, format="long")

# Example with biomart download
biomartDownload <- paste(dir,"mart_export.txt", sep="/")
read.annot.file(biomartDownload, format="long")

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