buildBasisSplineMatrix: Build Basis Spline Matrix

Description Usage Arguments Author(s) Examples

Description

Evaluations splines at RNA concentrations and returns their values

Usage

1
buildBasisSplineMatrix(M, basisSplineFunction)

Arguments

M

Matrix of pooled estimated RNA concentrations. The pooling strategy is defined by the nbins parameter. The element in position i,j is equal to the average RNA concentration on array j of the probes' whose average concentration is in the region spanned by bin i.

basisSplineFunction

B-spline basis function defined by buildBasisFunction

Author(s)

Brig Mecham <brig.mecham@sagebase.org>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (M, basisSplineFunction) 
{
    lnp <- dim(M)[1]
    bSM <- apply(M, 2, function(x) {
        predict(basisSplineFunction, x)
    })
    bSM.model <- sapply(1:(dim(basisSplineFunction)[2]), function(x) {
        pos <- (x - 1) * lnp + 1
        as.numeric(bSM[pos:(pos + lnp - 1), ])
    })
    colnames(bSM.model) <- paste("Bt", 1:dim(bSM.model)[2], sep = "")
    bSM.model
  }

Sage-Bionetworks/snm documentation built on May 9, 2019, 12:14 p.m.