sequenceDesignMatrix: Create design matrix for sequences

Description Usage Arguments Details Value Examples

View source: R/utils-general.R

Description

Creates design matrix for sequences.

Usage

1

Arguments

seqs

character vector of 25-mers.

Details

This assumes all sequences are 25bp long.

The design matrix is often used when the objecive is to adjust intensities by sequence.

Value

Matrix with length(seqs) rows and 75 columns.

Examples

1
2
3
4
5
6
7
8
9
genSequence <- function(x)
    paste(sample(c("A", "T", "C", "G"), 25, rep=TRUE), collapse="", sep="")
seqs <- sapply(1:10, genSequence)
X <- sequenceDesignMatrix(seqs)
Y <- rnorm(10, mean=12, sd=2)
Ydemean <- Y-mean(Y)
X[1:10, 1:3]
fit <- lm(Ydemean~X)
coef(fit)

Bioconductor-mirror/oligo documentation built on July 28, 2017, 5:23 a.m.