Usage
xSocialiser(data, annotation, g, measure = c("BM.average", "BM.max",
"BM.complete", "average", "max"), method.term = c("Resnik", "Lin",
"Schlicker", "Jiang", "Pesquita"), rescale = TRUE, force = TRUE,
fast = TRUE, parallel = TRUE, multicores = NULL,
path.mode = c("all_paths", "shortest_paths", "all_shortest_paths"),
true.path.rule = TRUE, verbose = T)
Arguments
data
an input vector containing a list of genes or SNPs of
interest between which pair-wise semantic similarity is
calculated/socialized
annotation
the vertices/nodes for which annotation data are
provided. It can be a sparse Matrix of class "dgCMatrix" (with
variants/genes as rows and terms as columns), or a list of nodes/terms
each containing annotation data, or an object of class 'GS' (basically
a list for each node/term with annotation data)
g
an object of class "igraph" to represent DAG. It must have
node/vertice attributes: "name" (i.e. "Term ID"), "term_id" (i.e. "Term
ID"), "term_name" (i.e "Term Name") and "term_distance" (i.e. Term
Distance: the distance to the root; always 0 for the root itself)
measure
the measure used to derive semantic similarity between
genes/SNPs from semantic similarity between terms. Take the semantic
similartity between SNPs as an example. It can be "average" for average
similarity between any two terms (one from SNP 1, the other from SNP
2), "max" for the maximum similarity between any two terms,
"BM.average" for best-matching (BM) based average similarity (i.e. for
each term of either SNP, first calculate maximum similarity to any term
in the other SNP, then take average of maximum similarity; the final
BM-based average similiary is the pre-calculated average between two
SNPs in pair), "BM.max" for BM based maximum similarity (i.e. the same
as "BM.average", but the final BM-based maximum similiary is the
maximum of the pre-calculated average between two SNPs in pair),
"BM.complete" for BM-based complete-linkage similarity (inspired by
complete-linkage concept: the least of any maximum similarity between a
term of one SNP and a term of the other SNP). When comparing BM-based
similarity between SNPs, "BM.average" and "BM.max" are sensitive to the
number of terms involved; instead, "BM.complete" is much robust in this
aspect. By default, it uses "BM.average"
rescale
logical to indicate whether the resulting values are
rescaled to the range [0,1]. By default, it sets to true
force
logical to indicate whether the only most specific terms
(for each SNP) will be used. By default, it sets to true. It is always
advisable to use this since it is computationally fast but without
compromising accuracy (considering the fact that true-path-rule has
been applied when running xDAGanno
) fast
logical to indicate whether a vectorised fast computation
is used. By default, it sets to true. It is always advisable to use
this vectorised fast computation; since the conventional computation is
just used for understanding scripts
parallel
logical to indicate whether parallel computation with
multicores is used. By default, it sets to true, but not necessarily
does so. Partly because parallel backends available will be
system-specific (now only Linux or Mac OS). Also, it will depend on
whether these two packages "foreach" and "doMC" have been installed. It
can be installed via:
source("http://bioconductor.org/biocLite.R");
biocLite(c("foreach","doMC"))
. If not yet installed, this option will
be disabled
multicores
an integer to specify how many cores will be
registered as the multicore parallel backend to the 'foreach' package.
If NULL, it will use a half of cores available in a user's computer.
This option only works when parallel computation is enabled
path.mode
the mode of paths induced by vertices/nodes with input
annotation data. It can be "all_paths" for all possible paths to the
root, "shortest_paths" for only one path to the root (for each node in
query), "all_shortest_paths" for all shortest paths to the root (i.e.
for each node, find all shortest paths with the equal lengths)
true.path.rule
logical to indicate whether the true-path rule
should be applied to propagate annotations. By default, it sets to
true
verbose
logical to indicate whether the messages will be
displayed in the screen. By default, it sets to true for display