Learn R Programming

tmod (version 0.44)

mtx2mset: Convert between matrix representation of modules and tmod objects

Description

Converts a matrix where columns correspond to modules and rows to individual variables into an tmod object ("mset") represenation and back

Usage

mtx2mset(x)

mset2mtx(x)

Arguments

x

for mtx2mset, a numeric matrix with named rows and columns; for mset2mtx, an object of the class tmod

Details

A matrix mapping genes onto modules and vice versa can be converted with mtx2mset into a tmod object. The numeric matrix either only contains '0' and '1' values indicating presence or absence of a variable (gene) in a module (gene set), or any other numbers which are treated as weights. In the latter case, '0' and only '0' is interpreted as absence of a variable in a module; any other value is interpreted as a weight and stored in the WEIGHTS slot of the tmod object.

The mset2mtx function does the reverse.

See Also

tmod-class