combineScores: Combining values

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/combineScores.R

Description

Combine several similarities into one using several methods.

Usage

1
2
3
4
combineScores(scores, method = c("max", "avg", "rcmax", "rcmax.avg",
  "BMA", "reciprocal"), round = FALSE, t = 0)

combineScoresPar(scores, method, subSets = NULL, BPPARAM = NULL, ...)

Arguments

scores

Matrix of scores to be combined

method

one of c("avg", "max", "rcmax", "rcmax.avg", "BMA", "reciprocal"), see Details.

round

Should the resulting value be rounded to the third digit?

t

Numeric value to filter scores below this value. Only used in the reciprocal method.

subSets

List of combinations as info in other functions.

BPPARAM

BiocParallel back-end parameters. By default (NULL) a for loop is used.

...

Other arguments passed to combineScores

Details

The input matrix can be a base matrix or a matrix from package Matrix. The methods return:

avg

The average or mean value

max

The max value

rcmax

The max of the column means or row means

rcmax.avg

The sum of the max values by rows and columns divided by the number of columns and rows

BMA

The same as rcmax.avg

reciprocal

The double of the sum of the reciprocal maximal similarities (above a threshold) divided by the number of elements. See equation 3 of the Tao et al 2007 article

Value

A numeric value as described in details.

Note

combineScores is a version of the function of the same name in package GOSemSim (combineScores) with optional rounding and some internal differences.

Author(s)

Lluís Revilla based on Guangchuang Yu

References

Ying Tao, Lee Sam, Jianrong Li, Carol Friedman, Yves A. Lussier; Information theory applied to the sparse gene ontology annotation network to predict novel gene function. Bioinformatics 2007; 23 (13): i529-i538. doi: 10.1093/bioinformatics/btm195

See Also

register in BiocParallel about the arguments accepted by BPPARAM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
(d <- structure(c(0.4, 0.6, 0.222222222222222, 0.4, 0.4, 0, 0.25, 0.5,
                  0.285714285714286), .Dim = c(3L, 3L),
                .Dimnames = list(c("a", "b", "c"), c("d", "e", "f"))))
e <- d
sapply(c("avg", "max", "rcmax", "rcmax.avg", "BMA", "reciprocal"),
       combineScores, scores = d)
d[1,2] <- NA
sapply(c("avg", "max", "rcmax", "rcmax.avg", "BMA", "reciprocal"),
       combineScores, scores = d)
colnames(e) <- rownames(e)
combineScoresPar(e, list(a= c("a", "b"), b = c("b", "c")),
                 method = "max")

BioCor documentation built on Nov. 1, 2018, 3:34 a.m.