getMI: Functions to calculate mutual information

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

View source: R/getMI.R

Description

Functions to calculate mutual information using B-spline method.

Usage

1
2
getMI(x, y, bin=6, so=3, rankBased=FALSE, normalize=TRUE, negateMI=FALSE)
getAllMIWz(data, x, bin=6, so=3, rankBased=FALSE, normalize=TRUE, sorting=FALSE, negateMI=FALSE)

Arguments

x, y

A vector of expression values

data

An expression matrix with genes in the rows, samples in the columns.

bin

Number of bins used when estimate mutual information (default=6).

so

Spline order used when estimate mutual information (default=3).

rankBased

When TRUE, convert the expression values into ranks.

normalize

When TRUE, normalize the mutual information by dividing the value by the maximum of the self-mutual information of the two variables max(getMI(x, x), getMI(y, y)).

sorting

Whether sort the output vector of MI's.

negateMI

When TRUE, negate the mutual information if the two vectors have negative momentum.

Details

getMI evaluate the mutual information between two vectors using B-spline functions. The function calls a C function implemented by Daub. The default setting uses six bins and third-order B-splines. getAllMIWz evaluates the mutual information between every row in data and the given vector x. The output vector of mutual information will be sorted if sorting is TRUE.

The normalize option normalizes the mutual information by dividing the value by the maximum of the self-mutual information of the two variables. It makes all the MI's between 0 and 1 and thus beneficial to calculation of Attractor Metagenes.

Value

getMI returns the mutual information between two vectors. getAllMIWz returns a vector of mutual information between each row of data and the vector x.

Note

Missing values are not allowed as the input to the function in the current version.

Author(s)

Wei-Yi Cheng

References

Carsten O Daub, Ralf Steuer, Joachim Selbig and Sebastian Kloska, Estimating mutual information using B-spline functions - an improved similarity measure for analysing gene expression data. BMC Bioinformatics 2004, 5:118.

Wei-Yi Cheng, Tai-Hsien Ou Yang and Dimitris Anastassiou, Biomolecular events in cancer revealed by attractor metagenes, PLoS Computational Biology, Vol. 9, Issue 2, February 2013.

See Also

findAttractor for finding attractor using mutual information. getCorr, getAllCorWz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load the toy dataset extracted from TCGA OV data
data(ov)
#==============
# First example: find the mutual information between CENPA and MELK
#==============
x <- ov["CENPA",]
y <- ov["MELK",]
mi <- getMI(x, y)

#==============
# Second example: evaluate the mutual information between every gene in the dataset and CENPA
#==============
mis <- getAllMIWz(ov, x, sorting=TRUE)

weiyi-bitw/cafr documentation built on May 4, 2019, 4:18 a.m.