testUsage: do test for dPDUI

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/testUsage.R

Description

do test for dPDUI

Usage

1
2
3
4
5
6
7
testUsage(CPsites, coverage, genome, utr3, BPPARAM=NULL, 
          method=c("limma", "fisher.exact", 
                    "singleSample", "singleGroup"),
          normalize=c("none", "quantiles", "quantiles.robust",
                        "mean", "median"),
          design, contrast.matrix, coef=1, robust=FALSE, ..., 
          gp1, gp2)

Arguments

CPsites

outputs of CPsites

coverage

coverage for each sample, outputs of coverageFromBedGraph

genome

an object of BSgenome

utr3

output of utr3Annotation

BPPARAM

An optional BiocParallelParam instance determining the parallel back-end to be used during evaluation, or a list of BiocParallelParam instances, to be applied in sequence for nested calls to bplapply.

method

test method. see singleSampleAnalyze,singleGroupAnalyze, fisher.exact.test,limmaAnalyze

normalize

normalization method

design

the design matrix of the experiment, with rows corresponding to arrays and columns to coefficients to be estimated. Defaults to the unit vector meaning that the arrays are treated as replicates. see model.matrix

contrast.matrix

numeric matrix with rows corresponding to coefficients in fit and columns containing contrasts. May be a vector if there is only one contrast. see makeContrasts

coef

column number or column name specifying which coefficient or contrast of the linear model is of interest. see more 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.

gp1

tag names involved in group 1

gp2

tag names involved in group 2

Details

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

Value

a list with test results. the output of test results is a matrix.

Author(s)

Jianhong Ou

See Also

singleSampleAnalyze,singleGroupAnalyze, fisher.exact.test,limmaAnalyze

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
    library(limma)
    path <- file.path(find.package("InPAS"), "extdata")
    load(file.path(path, "CPs.MAQC.rda"))
    load(file.path(path, "coverage.MAQC.rda"))
    library(BSgenome.Hsapiens.UCSC.hg19)
    data(utr3.hg19)
    tags <- names(coverage)
    g <- factor(gsub("\\..*$", "", tags))
    design <- model.matrix(~-1+g)
    colnames(design) <- c("Brain", "UHR")
    contrast.matrix<-makeContrasts(contrasts="Brain-UHR",levels=design)
    res <- testUsage(CPsites=CPs, 
                 coverage=coverage, 
                 genome=BSgenome.Hsapiens.UCSC.hg19,
                 utr3=utr3.hg19, 
                 method="limma",
                 design=design,
                 contrast.matrix=contrast.matrix)

InPAS documentation built on Nov. 8, 2020, 5:03 p.m.