test_dPDUI {InPAS} | R Documentation

## do test for dPDUI

### Description

do test for dPDUI

### Usage

    test_dPDUI(
      eset,
      method = c("limma", "fisher.exact", "singleSample", "singleGroup"),
      normalize = c("none", "quantiles", "quantiles.robust", "mean", "median"),
      design,
      contrast.matrix,
      coef = 1,
      robust = FALSE,
      ...,
      sqlite_db
    )

### Arguments

`eset` | An object of UTR3eSet. It is an output of `get_UTR3eSet()`
`method` | A character(1), indicating the method for testing dPDUI. It can be "limma", "fisher.exact", "singleSample", or "singleGroup"
`normalize` | A character(1), indicating the normalization method. It can be "none", "quantiles", "quantiles.robust", "mean", or "median"
`design` | a design matrix of the experiment, with rows corresponding to samples and columns to coefficients to be estimated. Defaults to the unit vector meaning that the samples are treated as replicates. see `stats::model.matrix()`. Required for limma-based analysis.
`contrast.matrix` | a numeric matrix with rows corresponding to coefficients in fit and columns containing contrasts. May be a vector if there is only one contrast. see `limma::makeContrasts()`. Required for limma-based analysis.
`coef` | column number or column name specifying which coefficient or contrast of the linear model is of interest. see more `limma::topTable()`. default value: 1
`robust` | logical, should the estimation of the empirical Bayes prior parameters be robustified against outlier sample variances?
`...` | other arguments are passed to lmFit
`sqlite_db` | A path to the SQLite database for InPAS, i.e. the output of setup_sqlitedb().

### Details

if method is "limma", design matrix and contrast is required. if method is "fisher.exact", gp1 and gp2 is required.

### Value

An object of UTR3eSet, with the last element `testRes` containing the test results in a matrix.

### Author(s)

Jianhong Ou, Haibo Liu

### See Also

`run_singleSampleAnalysis()`, `run_singleGroupAnalysis()`, `run_fisherExactTest()`, `run_limmaAnalysis()`

### Examples

    library(limma)
    path <- system.file("extdata", package = "InPAS")
    load(file.path(path, "eset.MAQC.rda"))
    tags <- colnames(eset@PDUI)
    g <- factor(gsub("\\..*$", "", tags))
    design <- model.matrix(~ -1 + g)
    colnames(design) <- c("Brain", "UHR")
    contrast.matrix <- makeContrasts(contrasts = "Brain-UHR",
                                     levels = design)
    res <- test_dPDUI(eset = eset,
                      method = "limma",
                      normalize = "none",
                      design = design,
                      contrast.matrix = contrast.matrix)

[Package InPAS version 2.2.0 Index]