getAdjustedPValues: Retrieve the stage-wise adjusted p-values.

Description Usage Arguments Details Value Methods (by class) References Examples

Description

This functions returns the stage-wise adjusted p-values for an object from the stageRClass class. Note, that the p-values should have been adjusted with the stageWiseAdjustment,stageR,character,numeric-method function prior to calling this function.

Usage

1
2
3
4
5
6
7
8
9
getAdjustedPValues(object, onlySignificantGenes, order, ...)

## S4 method for signature 'stageR,logical,logical'
getAdjustedPValues(object,
  onlySignificantGenes, order, ...)

## S4 method for signature 'stageRTx,logical,logical'
getAdjustedPValues(object,
  onlySignificantGenes, order, ...)

Arguments

object

an object of the stageRClass class.

onlySignificantGenes

logical. If FALSE (default), all genes are returned. If TRUE, only the genes significant for the screening hypothesis are returned.

order

logical. If TRUE (default), the returned matrix of adjusted p-values are ordered based on the screening hypothesis adjusted p-value.

...

Other arguments passed to .getAdjustedP or .getAdjustedPTx

Details

The function returns FDR adjusted p-values for the screening hypothesis and stage-wise adjusted p-values for the confirmation hypothesis p-values. For features that were not significant in the screening hypothesis, the confirmation stage adjusted p-values are set to NA. The adjusted p-values in the output of getAdjustedPValues can directly be compared to alpha, the OFDR level specified in stageWiseAdjustment, to flag significant features.

Value

For complex DGE experiments (stageR object), a matrix of adjusted p-values where every row corresponds to a gene, and every column corresponds to a contrast. The first column will be the BH FDR adjusted p-value from the screening step. For transcript-level experiments (stageRTx object), a matrix of adjusted p-values where every row corresponds to a transcript.

Methods (by class)

References

Van den Berge K., Soneson C., Robinson M.D., Clement L. (2017). stageR: a general stage-wise method for controlling the gene-level false discovery rate in differential expression and differential transcript usage. Genome Biology 18:151. https://doi.org/10.1186/s13059-017-1277-0

Examples

1
2
3
4
5
6
7
pScreen=c(seq(1e-10,1e-2,length.out=100),seq(1e-2,.2,length.out=100),seq(.2,1,length.out=100))
names(pScreen)=paste0("gene",1:300)
pConfirmation=matrix(runif(900),nrow=300,ncol=3)
dimnames(pConfirmation)=list(paste0("gene",1:300),c("H1","H2","H3"))
stageRObj <- stageR(pScreen=pScreen, pConfirmation=pConfirmation)
stageRObj <- stageWiseAdjustment(stageRObj, method="holm", alpha=0.05)
head(getAdjustedPValues(stageRObj, onlySignificantGenes=TRUE, order=TRUE))

Example output

Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package:MatrixGenericsThe following objects are masked frompackage:matrixStats:

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: S4Vectors

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package:BiobaseThe following object is masked frompackage:MatrixGenerics:

    rowMedians

The following objects are masked frompackage:matrixStats:

    anyMissing, rowMedians


Attaching package:stageRThe following object is masked frompackage:methods:

    getMethod

The returned adjusted p-values are based on a stage-wise testing approach and are only valid for the provided target OFDR level of 5%. If a different target OFDR level is of interest,the entire adjustment should be re-run. 

      padjScreen       H1      H2        H3
gene1 0.00000003 1.000000 1.00000 0.2851483
gene2 0.01515153 1.000000 1.00000 1.0000000
gene3 0.02020203 1.000000 0.92205 0.9348279
gene4 0.02272728 1.000000 1.00000 0.8664165
gene5 0.02424243 0.702647 1.00000 1.0000000
gene6 0.02525253 1.000000 1.00000 1.0000000

stageR documentation built on Nov. 8, 2020, 4:56 p.m.