Skip to main content

Module modelmatrix

Module modelmatrix 

Source
Expand description

Port of limma’s modelMatrix / uniqueTargets (modelmatrix.R): construct the design matrix for a two-color (Cy3/Cy5) microarray experiment from a table of target names. Each array contributes a log-ratio Cy5 − Cy3, and the design expresses those log-ratios in terms of either a common-reference parametrization or a caller-supplied parameter matrix.

Target names are sorted by byte order (matching R’s sort() for the usual ASCII target labels); the makeContrasts companion lives in crate::contrasts.

Structs§

ModelMatrix
Two-color design matrix and its coefficient (column) names.

Enums§

ModelParam
How a two-color design’s coefficients are defined.

Functions§

model_matrix
Port of modelMatrix(targets, parameters=, ref=). cy3/cy5 are the green and red channel target names for each array. Returns the design matrix zapsmall(t(solve(crossprod(P), crossprod(P, J))), 14), where J[t,a] is +1 if target t is the Cy5 sample of array a, -1 if it is the Cy3 sample, and P is the parameter matrix.
unique_targets
Sorted, de-duplicated target names across the Cy3 and Cy5 columns — the uniqueTargets helper.