read.annot.file {PloGO2} | R Documentation |
Accepts GO id's separated by space or semicolon
read.annot.file(fname, format = c("compact","long"))
fname |
The file name containing GO annotation |
format |
Either |
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.
A data frame with two columns, ID's and GO separated by spaces
T. Keighley, D.Pascovici
# 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")