Build model matrices for differential expression
Builds the model matrices for testing for differential expression by comparing a model with a grouping factor versus one without it. It adjusts for the confounders specified and the median coverage of each sample. The resulting models can be used in calculateStats.
Per sample library size adjustments calculated with sampleDepth.
A vector or matrix specifying the variables to test. For
example, a factor with the group memberships when testing for differences
across groups. It's length should match the number of columns used from
Optional matrix of adjustment variables (e.g. measured confounders, output from SVA, etc.) to use in fitting linear models to each nucleotide. These variables have to be specified by sample and the number of rows must match the number of columns used. It will also work if it is a vector of the correct length.
A list with two components.
The alternative model matrix.
The null model matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## Collapse the coverage information collapsedFull <- collapseFullCoverage(list(genomeData$coverage), verbose=TRUE) ## Calculate library size adjustments sampleDepths <- sampleDepth(collapsedFull, probs=c(0.5), nonzero=TRUE, verbose=TRUE) ## Build the models group <- genomeInfo$pop adjustvars <- data.frame(genomeInfo$gender) models <- makeModels(sampleDepths, testvars=group, adjustvars=adjustvars) names(models) models
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.