Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/processAnnotations.R
For each file in the list extract all identifiers that belong to each GO or pathway category in the list of identifiers. An identifier “belongs” to a GO or pathway category if it is annotated at the category itself or any of its children in the GO graph.
1 2 | processAnnotation(file.list, AnnotIDlist, data.file.name = NULL, printFiles = FALSE,
format = c("compact","long"), datafile.ignore.cols = 1, aggregateFun="sum")
|
file.list |
A list of files |
AnnotIDlist |
A list of GO/pathway identifiers |
data.file.name |
A list containing additional data such as abundance information |
printFiles |
TRUE/FALSE If true an annotation summary file is generated for each input file |
format |
One of “compact” by default or or “long”, the format of the annotation files. See details. |
datafile.ignore.cols |
How many columns in the abundance file to ignore. By default assume the first only, containing identifiers. |
aggregateFun |
Either "sum" or "product"; the aggregation operation for abundance data |
The format is for the GO/pathway files is “compact” by default, meaning a text file containing ID's in the first column, and GO/pathway 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 spaces, containing an identifier, followed by a GO/pathway id, followed optionally by other columns which are ignored. The GO/pathway id's will first be aggregated for each identifier.
A list of the same length as the list of files submitted. Each list element is
the result of processGoFile
or processPathFile
.
D. Pascovici, J.Wu
processGoFile
, processPathFile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # For GO analysis
# choose two simple GO categories
termList <- c("response to stimulus", "transport")
GOIDmap <- getGoID(termList)
GOIDlist <- names(GOIDmap)
path <- system.file("files", package = "PloGO2")
file.names <- file.path(path, c("00100.txt", "01111.txt", "10000.txt",
"11111.txt", "Control.txt"))
# summarize annotation
res.list <- processAnnotation(file.names, GOIDlist)
# files in long format
longFormat <- file.path(path, "goRetOutput.txt")
processAnnotation(longFormat, GOIDlist, format = "long")
# For KEGG pathway analysis
fname <- file.path(path,"PWFiles", "red.txt")
datafile <- file.path(path,"Abundance_data.csv")
AnnotIDlist <- c("osa01100","osa01110","osa01230","osa00300","osa00860")
res.list <- processAnnotation(fname, AnnotIDlist, data.file.name = datafile)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.