export_annotations {ontoFAST} | R Documentation |
Export annotation data
Description
This function converts character annotations stored in shiny_in object to table format.
Usage
export_annotations(
ontology,
annotations = "auto",
incl.names = FALSE,
sep.head = ", ",
sep.tail = NULL,
collapse = NULL
)
Arguments
ontology |
Ontology |
annotations |
which annotations to use: "auto" means automatic annotations, "manual" means manual ones. Alternatively, any othe list element containing annotations can be specified. |
incl.names |
if TRUE includes terms' names and IDs, otherwise includes just IDs. |
sep.head |
if incl.names=TRUE, this is a separator attached to the begining of term's ID |
sep.tail |
if incl.names=TRUE, this is a separator attached to the end of term's ID |
collapse |
if NULL all annotations of a term placed in separate columns, if a value is specified (e.g., "; ") then all anotations are collapsed in one line given that values |
Value
Returns a table
Examples
data(Sharkey_2011)
data(HAO)
hao_obo<-onto_process(HAO, Sharkey_2011[,1], do.annot = FALSE)
ontofast <- new.env(parent = emptyenv())
ontofast$shiny_in <- make_shiny_in(hao_obo)
# runOntoFast(is_a = c("is_a"), part_of = c("BFO:0000050"), shiny_in="shiny_in" )
tb<-export_annotations(ontofast$shiny_in, annotations="manual", incl.names=TRUE,collapse="; ")
tb<-export_annotations(ontofast$shiny_in, annotations="auto", incl.names=TRUE,collapse="; ")
tb<-export_annotations(ontofast$shiny_in, annotations="auto", incl.names=TRUE,collapse=NULL)
# save annotations in csv
# write.csv(tb, "annotated_characters.csv")
[Package ontoFAST version 1.0.0 Index]