basisMat: Methylation Levels to Basis Function Values

Description Usage Arguments Value See Also Examples

Description

Methylation Levels to Basis Function Values

Usage

1
basisMat(M, pos, nbasis, start = NULL, end = NULL, ...)

Arguments

M

A matrix of methylation levels with dimensions n by K (n subjects, K CpG sites).

pos

A vector of CpG locations (in base pairs). Elements should be of the same order as the columns of M.

nbasis

The number of B-spline basis functions (default is cubic splines). Note that nbasis should not be smaller than norder (default is 4).

start

Start location of the region.

end

End location of the region.

...

Optional arguments for create.bspline.basis.

Value

A matrix of basis function values with dimensions n by Kb, where Kb is the number of basis functions.

See Also

create.bspline.basis

Examples

1
2
3
4
Y <- bs_dense$trait
methyl <- bs_dense$methyl
pos <- bs_dense$pos
X <- basisMat(methyl, pos, nbasis = 10)

cxystat/AFb documentation built on June 17, 2021, 7:30 p.m.