read.annot.file {PloGO2}R Documentation

Function to read an annotation file.

Description

Accepts GO id's separated by space or semicolon

Usage

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



# 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")




[Package PloGO2 version 1.5.0 Index]