dcAlgoPropagate
is supposed to propagate ontology annotations,
given an input file. This input file contains original annotations
between domains/features and ontology terms, along with the
hypergeometric scores (hscore) in support for their annotations. The
annotations are propagated to the ontology root (either retaining the
maximum hscore or additively accumulating the hscore). After the
propogation, the ontology terms of increasing levels are determined
based on the concept of Information Content (IC) to product a slim
version of ontology. It returns an object of S3 class "HIS" with three
components: "hscore", "ic" and "slim".
dcAlgoPropagate(input.file, ontology = c(NA, "GOBP", "GOMF", "GOCC",
"DO",
"HPPA", "HPMI", "HPON", "MP", "EC", "KW", "UP"), propagation = c("max",
"sum"), output.file = "HIS.RData", verbose = T,
RData.ontology.customised = NULL,
RData.location =
"https://github.com/hfang-bristol/RDataCentre/blob/master/dcGOR")
RData.ontology.customised
below)HIS
object as
an RData-formatted file (see 'Value' for details). If NULL, this file
will be saved into "HIS.RData" in the current working local directory.
If NA, there will be no output filedcBuildOnto
for
how to creat this objectdcRDataLoader
for detailsHIS
, with following components:
hscore
: a list of features, each with a term-named vector
containing hscore
ic
: a term-named vector containing information content
(IC). Terms are ordered first by IC and then by longest-path level,
making sure that for terms with the same IC, parental terms always come
first
slim
: a list of four slims, each with a term-named vector
containing information content (IC). Slim '1' for very general terms,
'2' for general terms, '3' for specific terms, '4' for very specific
terms
dcRDataLoader
, dcConverter
,
dcAlgo
, dcList2Matrix
## Not run:
# # build an "HIS" object for GO Molecular Function
# input.file <-
# "http://dcgor.r-forge.r-project.org/data/Feature/Feature2GO.sf.txt"
# Feature2GOMF.sf <- dcAlgoPropagate(input.file=input.file,
# ontology="GOMF", output.file="Feature2GOMF.sf.RData")
# names(Feature2GOMF.sf)
# Feature2GOMF.sf$hscore[1]
# Feature2GOMF.sf$ic[1:10]
# Feature2GOMF.sf$slim[1]
#
# # extract hscore as a matrix with 3 columns (Feature_id, Term_id, Score)
# hscore <- Feature2GOMF.sf$hscore
# hscore_mat <- dcList2Matrix(hscore)
# colnames(hscore_mat) <- c("Feature_id", "Term_id", "Score")
# dim(hscore_mat)
# hscore_mat[1:10,]
# ## End(Not run)
Run the code above in your browser using DataLab