Title: | stageR: stage-wise analysis of high throughput gene expression data in R |
---|---|
Description: | The stageR package allows automated stage-wise analysis of high-throughput gene expression data. The method is published in Genome Biology at https://genomebiology.biomedcentral.com/articles/10.1186/s13059-017-1277-0 |
Authors: | Koen Van den Berge and Lieven Clement |
Maintainer: | Koen Van den Berge <[email protected]> |
License: | GNU General Public License version 3 |
Version: | 1.29.0 |
Built: | 2024-10-31 05:34:38 UTC |
Source: | https://github.com/bioc/stageR |
This functions returns the adjusted significance level from the screening stage that should be used to compare confirmation stage FWER adjusted p-values against.
adjustedAlphaLevel(object, ...) ## S4 method for signature 'stageR' adjustedAlphaLevel(object) ## S4 method for signature 'stageRTx' adjustedAlphaLevel(object)
adjustedAlphaLevel(object, ...) ## S4 method for signature 'stageR' adjustedAlphaLevel(object) ## S4 method for signature 'stageRTx' adjustedAlphaLevel(object)
object |
an object of the |
The adjusted significance level is calculated as the fraction of significant features in the screening stage multiplied the alpha level.
Scalar, the adjusted significance level from the screening stage.
stageRTx
: Get adjusted significance level from the screening stage.
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
R. Heller, E. Manduchi, G. R. Grant, and W. J. Ewens, "A flexible two-stage procedure for identifying gene sets that are differentially expressed." Bioinformatics (Oxford, England), vol. 25, pp. 1019-25, 2009.
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, pScreenAdjusted=FALSE) stageRObj <- stageWiseAdjustment(stageRObj, method="holm", alpha=0.05) adjustedAlphaLevel(stageRObj) # @method stageR-method
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, pScreenAdjusted=FALSE) stageRObj <- stageWiseAdjustment(stageRObj, method="holm", alpha=0.05) adjustedAlphaLevel(stageRObj) # @method stageR-method
A dataset containing 14 matched samples of tumoral prostate cancer and normal tissue, both derived from the same Chinese patient. The dataset has been prefiltered to reduce the computational burden of the vignette.
esetProstate
esetProstate
An ExpressionSet
object.
http://pachterlab.github.io/lair/
Ren, Shancheng, Zhiyu Peng, Jian-Hua Mao, Yongwei Yu, Changjun Yin, Xin Gao, Zilian Cui, et al. 2012. "RNA-seq analysis of prostate cancer in the Chinese population identifies recurrent gene fusions, cancer-associated long noncoding RNAs and aberrant alternative splicings." Cell Research 22 (5): 806-21. doi:10.1038/cr.2012.30.
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.
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, ...)
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, ...)
object |
an object of the |
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 |
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.
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.
object = stageRTx,onlySignificantGenes = logical,order = logical
: Retrieve the stage-wise adjusted p-values.
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
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))
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))
This functions returns the significance level on which the stage-wise adjustment is based.
getAlpha(object, ...) ## S4 method for signature 'stageR' getAlpha(object, ...) ## S4 method for signature 'stageRTx' getAlpha(object, ...)
getAlpha(object, ...) ## S4 method for signature 'stageR' getAlpha(object, ...) ## S4 method for signature 'stageRTx' getAlpha(object, ...)
object |
an object of the |
... |
Additional arguments |
Returns a calar vector with the OFDR alpha level that was specified by the user.
stageRTx
: Retrieve the significance level for the stage-wise adjustment.
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
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) getAlpha(stageRObj)
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) getAlpha(stageRObj)
This functions retrieves the method used for FWER multiple testing correction in the confirmation stage of a stage-wise analysis.
getMethod(object, ...) ## S4 method for signature 'stageR' getMethod(object, ...) ## S4 method for signature 'stageRTx' getMethod(object, ...)
getMethod(object, ...) ## S4 method for signature 'stageR' getMethod(object, ...) ## S4 method for signature 'stageRTx' getMethod(object, ...)
object |
an object of the |
... |
Additional arguments |
Returns a character vector of length 1 specifying the FWER correction method that is used in the confirmation stage of the stage-wise analysis.
stageRTx
: Retrieve FWER correction method.
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
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) getMethod(stageRObj)
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) getMethod(stageRObj)
stageRClass
object.Return unadjusted confirmation hypothesis p-values from a stageRClass
object.
getPConfirmation(object, ...) ## S4 method for signature 'stageR' getPConfirmation(object) ## S4 method for signature 'stageRTx' getPConfirmation(object)
getPConfirmation(object, ...) ## S4 method for signature 'stageR' getPConfirmation(object) ## S4 method for signature 'stageRTx' getPConfirmation(object)
object |
an object of the |
A matrix of the unadjusted p-values to be used in the confirmation stage.
stageRTx
: Return unadjusted confirmation hypothesis p-values from a stageRClass
object.
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) getPConfirmation(stageRObj)
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) getPConfirmation(stageRObj)
stageRClass
object.Return screening hypothesis p-values from a stageRClass
object.
getPScreen(object, ...) ## S4 method for signature 'stageR' getPScreen(object) ## S4 method for signature 'stageRTx' getPScreen(object)
getPScreen(object, ...) ## S4 method for signature 'stageR' getPScreen(object) ## S4 method for signature 'stageRTx' getPScreen(object)
object |
an object of the |
... |
Additional arguments |
A vector of screening stage (aggregated) p-values.
stageRTx
: Return screening hypothesis p-values from a stageRClass
object.
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) getPScreen(stageRObj)
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) getPScreen(stageRObj)
This functions returns a matrix that indicates whether a specific feature is significant for a specific hypothesis of interest according to a stage-wise analysis. The function is not applicable to transcript-level analysis.
getResults(object, ...) ## S4 method for signature 'stageR' getResults(object)
getResults(object, ...) ## S4 method for signature 'stageR' getResults(object)
object |
an object of the |
The FDR adjusted screening hypothesis p-values are compared to the alpha level specified. The FWER adjusted confirmation stage p-values are compared to the adjusted significance level from the screening stage.
A logical matrix with rows corresponding to genes and columns corresponding to contrasts, where the first column represents the screening stage on the aggregated p-values. A 0 represents a non-significant test, a 1 represents a significant test according to the stage-wise analysis.
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
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(getResults(stageRObj))
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(getResults(stageRObj))
This functions returns a matrix with significant genes by aggregated testing of its respective transcripts.
getSignificantGenes(object, ...) ## S4 method for signature 'stageRTx' getSignificantGenes(object)
getSignificantGenes(object, ...) ## S4 method for signature 'stageRTx' getSignificantGenes(object)
object |
an object of the |
A matrix with significant genes and their corresponding FDR-adjusted screening stage (aggregated) p-value.
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
#make identifiers linking transcripts to genes set.seed(1) genes=paste0("gene",sample(1:200,1000,replace=TRUE)) nGenes=length(table(genes)) transcripts=paste0("tx",1:1000) tx2gene=data.frame(transcripts,genes) #gene-wise q-values pScreen=c(seq(1e-10,1e-2,length.out=nGenes-100),seq(1e-2,.2,length.out=50),seq(50)) names(pScreen)=names(table(genes)) #discards genes that are not simulated pConfirmation=matrix(runif(1000),nrow=1000,ncol=1) rownames(pConfirmation)=transcripts stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmation ,pScreenAdjusted=TRUE, tx2gene=tx2gene) stageRObj <- stageWiseAdjustment(stageRObj, method="dte", alpha=0.05) head(getSignificantGenes(stageRObj))
#make identifiers linking transcripts to genes set.seed(1) genes=paste0("gene",sample(1:200,1000,replace=TRUE)) nGenes=length(table(genes)) transcripts=paste0("tx",1:1000) tx2gene=data.frame(transcripts,genes) #gene-wise q-values pScreen=c(seq(1e-10,1e-2,length.out=nGenes-100),seq(1e-2,.2,length.out=50),seq(50)) names(pScreen)=names(table(genes)) #discards genes that are not simulated pConfirmation=matrix(runif(1000),nrow=1000,ncol=1) rownames(pConfirmation)=transcripts stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmation ,pScreenAdjusted=TRUE, tx2gene=tx2gene) stageRObj <- stageWiseAdjustment(stageRObj, method="dte", alpha=0.05) head(getSignificantGenes(stageRObj))
This functions returns a matrix with significant transctripts according to a stage-wise analysis.
getSignificantTx(object, ...) ## S4 method for signature 'stageRTx' getSignificantTx(object)
getSignificantTx(object, ...) ## S4 method for signature 'stageRTx' getSignificantTx(object)
object |
an object of the |
A matrix of significant transcripts with their corresponding stage-wise adjusted p-value (i.e. FDR and FWER correction).
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
#make identifiers linking transcripts to genes set.seed(1) genes=paste0("gene",sample(1:200,1000,replace=TRUE)) nGenes=length(table(genes)) transcripts=paste0("tx",1:1000) tx2gene=data.frame(transcripts,genes) #gene-wise q-values pScreen=c(seq(1e-10,1e-2,length.out=nGenes-100),seq(1e-2,.2,length.out=50),seq(50)) names(pScreen)=names(table(genes)) #discards genes that are not simulated pConfirmation=matrix(runif(1000),nrow=1000,ncol=1) rownames(pConfirmation)=transcripts stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmation ,pScreenAdjusted=TRUE, tx2gene=tx2gene) stageRObj <- stageWiseAdjustment(stageRObj, method="dte", alpha=0.05) head(getSignificantTx(stageRObj))
#make identifiers linking transcripts to genes set.seed(1) genes=paste0("gene",sample(1:200,1000,replace=TRUE)) nGenes=length(table(genes)) transcripts=paste0("tx",1:1000) tx2gene=data.frame(transcripts,genes) #gene-wise q-values pScreen=c(seq(1e-10,1e-2,length.out=nGenes-100),seq(1e-2,.2,length.out=50),seq(50)) names(pScreen)=names(table(genes)) #discards genes that are not simulated pConfirmation=matrix(runif(1000),nrow=1000,ncol=1) rownames(pConfirmation)=transcripts stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmation ,pScreenAdjusted=TRUE, tx2gene=tx2gene) stageRObj <- stageWiseAdjustment(stageRObj, method="dte", alpha=0.05) head(getSignificantTx(stageRObj))
This functions returns a data frame that links the genes with the transcripts being analysed.
getTx2gene(object, ...) ## S4 method for signature 'stageRTx' getTx2gene(object, ...)
getTx2gene(object, ...) ## S4 method for signature 'stageRTx' getTx2gene(object, ...)
object |
an object of the |
... |
Additional arguments |
A matrix linking gene to transcript identifiers.
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
#make identifiers linking transcripts to genes set.seed(1) genes=paste0("gene",sample(1:200,1000,replace=TRUE)) nGenes=length(table(genes)) transcripts=paste0("tx",1:1000) tx2gene=data.frame(transcripts,genes) #gene-wise q-values pScreen=c(seq(1e-10,1e-2,length.out=nGenes-100),seq(1e-2,.2,length.out=50),seq(50)) names(pScreen)=names(table(genes)) #discards genes that are not simulated pConfirmation=matrix(runif(1000),nrow=1000,ncol=1) rownames(pConfirmation)=transcripts stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmation ,pScreenAdjusted=TRUE, tx2gene=tx2gene) getTx2gene(stageRObj)
#make identifiers linking transcripts to genes set.seed(1) genes=paste0("gene",sample(1:200,1000,replace=TRUE)) nGenes=length(table(genes)) transcripts=paste0("tx",1:1000) tx2gene=data.frame(transcripts,genes) #gene-wise q-values pScreen=c(seq(1e-10,1e-2,length.out=nGenes-100),seq(1e-2,.2,length.out=50),seq(50)) names(pScreen)=names(table(genes)) #discards genes that are not simulated pConfirmation=matrix(runif(1000),nrow=1000,ncol=1) rownames(pConfirmation)=transcripts stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmation ,pScreenAdjusted=TRUE, tx2gene=tx2gene) getTx2gene(stageRObj)
A gene expression dataset from an experiment on spinal nerve ligation in rats, comparing this treatment to control samples in two timepoints, i.e. two weeks and two months post treatment. 2 Biological replicates available in every treatment x time combination.
hammer.eset
hammer.eset
An ExpressionSet
object.
http://bowtie-bio.sourceforge.net/recount/
Hammer P, Banck MS, Amberg R, et al. mRNA-seq with agnostic splice site discovery for nervous system transcriptomics tested in chronic pain. Genome Research. 2010;20(6):847-860. doi:10.1101/gr.101204.109.
This functions returns a logical stating whether the p-values have already been adjusted according to the stage-wise method.
isAdjusted(object, ...) ## S4 method for signature 'stageR' isAdjusted(object, ...) ## S4 method for signature 'stageRTx' isAdjusted(object, ...)
isAdjusted(object, ...) ## S4 method for signature 'stageR' isAdjusted(object, ...) ## S4 method for signature 'stageRTx' isAdjusted(object, ...)
object |
an object of the |
... |
Additional arguments |
A logical stating whether the p-values have already been adjusted according to the stage-wise method
stageRTx
: Has stage-wise adjustment already been performed on the object?
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
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) isAdjusted(stageRObj) stageRObj <- stageWiseAdjustment(stageRObj, method="holm", alpha=0.05) isAdjusted(stageRObj)
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) isAdjusted(stageRObj) stageRObj <- stageWiseAdjustment(stageRObj, method="holm", alpha=0.05) isAdjusted(stageRObj)
This functions returns a logical stating whether the screening hypothesis p-values are already adjusted for multiple testing according to the BH FDR criterion.
isPScreenAdjusted(object, ...) ## S4 method for signature 'stageR' isPScreenAdjusted(object, ...) ## S4 method for signature 'stageRTx' isPScreenAdjusted(object, ...)
isPScreenAdjusted(object, ...) ## S4 method for signature 'stageR' isPScreenAdjusted(object, ...) ## S4 method for signature 'stageRTx' isPScreenAdjusted(object, ...)
object |
an object of the |
... |
Additional arguments |
A logical stating whether the screening hypothesis p-values are already adjusted for multiple testing according to the BH FDR criterion.
stageRTx
: Are the screening p-values adjusted for multiplicity?
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
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) isPScreenAdjusted(stageRObj)
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) isPScreenAdjusted(stageRObj)
Constructor function for stageRClass
. A stageR class is a class used for stage-wise analysis in high throughput settings.
In its most basic form, it consists of a vector of p-values for the screening hypothesis and a matrix of p-values for the confirmation hypotheses.
stageR(pScreen, pConfirmation, pScreenAdjusted = FALSE)
stageR(pScreen, pConfirmation, pScreenAdjusted = FALSE)
pScreen |
A vector of screening hypothesis p-values. |
pConfirmation |
A matrix of confirmation hypothesis p-values. When constructing a |
pScreenAdjusted |
logical, indicating whether the supplied p-values for the screening hypothesis have already been adjusted for multiplicity according to the FDR. |
... |
Additional arguments. |
An instance of an object of the stageRClass
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
# create a \code{\link{stageRClass}} object pScreen <- runif(10) names(pScreen) <- paste0("gene",1:10) pConfirmation <- matrix(runif(30),nrow=10,ncol=3) rownames(pConfirmation) <- paste0("gene",1:10) stageRObj <- stageR(pScreen=pScreen, pConfirmation=pConfirmation) pConfirmationTx <- matrix(runif(10),ncol=1) names(pScreen) <- paste0("gene",rep(1:2,each=5)) stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmationTx, tx2gene=data.frame(transcripts=paste0("transcript",1:10),genes=paste0("gene",rep(1:2,each=5))))
# create a \code{\link{stageRClass}} object pScreen <- runif(10) names(pScreen) <- paste0("gene",1:10) pConfirmation <- matrix(runif(30),nrow=10,ncol=3) rownames(pConfirmation) <- paste0("gene",1:10) stageRObj <- stageR(pScreen=pScreen, pConfirmation=pConfirmation) pConfirmationTx <- matrix(runif(10),ncol=1) names(pScreen) <- paste0("gene",rep(1:2,each=5)) stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmationTx, tx2gene=data.frame(transcripts=paste0("transcript",1:10),genes=paste0("gene",rep(1:2,each=5))))
This class is used for adjusting p-values with stage-wise testing for high-throughput studies.
pScreen
A vector of p-values for the screening hypothesis.
pConfirmation
A matrix of p-values for the confirmation hypotheses.
adjustedP
A matrix of adjusted p-values. This slot should be accessed through getAdjustedPValues,stageR,logical,logical-method
. Alternatively, significance results can be accessed through getResults,stageR-method
.
method
Character string indicating the method used for FWER correction in the confirmation stage of the stage-wise analysis. Can be any of "none"
, "holm"
, "dte"
, "dtu"
, "user"
. "none"
will not adjust the p-values in the confirmation stage. "holm"
is an adapted Holm procedure for a stage-wise analysis, where the method takes into account the fact that genes in the confirmation stage have already passed the screening stage, hence the procedure will be more powerful for the most significant p-value as compared to the standard Holm procedure. "dte"
is the adjusted Holm-Shaffer procedure for differential transcript expression analysis. "dtu"
is the adjusted Holm-Shaffer procedure for differential transcript usage. "user"
indicates a user-defined adjustment that should be specified with the adjustment
argument.
alpha
the OFDR level on which the stage-wise analysis should be controlled.
alphaAdjusted
the adjusted significance level to compare against FWER-adjusted p-values of the confirmation stage to decide on significance of the hypothesis test.
pScreenAdjusted
logical, indicating whether the supplied p-values for the screening hypothesis have already been adjusted for multiplicity according to the FDR.
tx2gene
matrix with transcript IDs in the first column and gene IDs in the second column to be used for DTE and DTU analysis. All rownames from pConfirmation
should match with a transcript ID and all names from pScreen
should match with a gene ID.
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 R. Heller, E. Manduchi, G. R. Grant, and W. J. Ewens, "A flexible two-stage procedure for identifying gene sets that are differentially expressed." Bioinformatics (Oxford, England), vol. 25, pp. 1019-25, 2009. S. Holm, "A Simple Sequentially Rejective Multiple Test Procedure," Scandinavian Journal of Statistics, vol. 6, no. 2, pp. 65-70, 1979. J. P. Shaffer, "Modified Sequentially Rejective Multiple Test Procedures," Journal of the American Statistical Association, vol. 81, p. 826, 1986.
Constructor function for stageRTxClass
. A stageR class is a class used for stage-wise analysis in high throughput settings.
In its most basic form, it consists of a vector of p-values for the screening hypothesis, a matrix of p-values for the confirmation hypotheses and a tx2gene object for linking genes to transcripts.
stageRTx(pScreen, pConfirmation, pScreenAdjusted = FALSE, tx2gene)
stageRTx(pScreen, pConfirmation, pScreenAdjusted = FALSE, tx2gene)
pScreen |
A vector of screening hypothesis p-values. |
pConfirmation |
A matrix of confirmation hypothesis p-values. The number of rows should be equal to the length of |
pScreenAdjusted |
logical, indicating whether the supplied p-values for the screening hypothesis have already been adjusted for multiplicity according to the FDR. |
tx2gene |
Only applicable for transcript-level analysis. A |
... |
Additional arguments. |
An instance of an object of the stageRTxClass
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
# create a \code{\link{stageRClass}} object pScreen <- runif(10) names(pScreen) <- paste0("gene",1:10) pConfirmation <- matrix(runif(30),nrow=10,ncol=3) rownames(pConfirmation) <- paste0("gene",1:10) stageRObj <- stageR(pScreen=pScreen, pConfirmation=pConfirmation) pConfirmationTx <- matrix(runif(10),ncol=1) names(pScreen) <- paste0("gene",rep(1:2,each=5)) stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmationTx, tx2gene=data.frame(transcripts=paste0("transcript",1:10),genes=paste0("gene",rep(1:2,each=5))))
# create a \code{\link{stageRClass}} object pScreen <- runif(10) names(pScreen) <- paste0("gene",1:10) pConfirmation <- matrix(runif(30),nrow=10,ncol=3) rownames(pConfirmation) <- paste0("gene",1:10) stageRObj <- stageR(pScreen=pScreen, pConfirmation=pConfirmation) pConfirmationTx <- matrix(runif(10),ncol=1) names(pScreen) <- paste0("gene",rep(1:2,each=5)) stageRObj <- stageRTx(pScreen=pScreen, pConfirmation=pConfirmationTx, tx2gene=data.frame(transcripts=paste0("transcript",1:10),genes=paste0("gene",rep(1:2,each=5))))
This function will adjust p-values according to a hierarchical two-stage testing paradigm.
stageWiseAdjustment(object, method, alpha, ...) ## S4 method for signature 'stageR,character,numeric' stageWiseAdjustment(object, method, alpha, adjustment = NULL, ...) ## S4 method for signature 'stageRTx,character,numeric' stageWiseAdjustment(object, method, alpha, tx2gene, ...)
stageWiseAdjustment(object, method, alpha, ...) ## S4 method for signature 'stageR,character,numeric' stageWiseAdjustment(object, method, alpha, adjustment = NULL, ...) ## S4 method for signature 'stageRTx,character,numeric' stageWiseAdjustment(object, method, alpha, tx2gene, ...)
object |
an object of the |
method |
Character string indicating the method used for FWER correction in the confirmation stage of the stage-wise analysis. Can be any of |
alpha |
the OFDR on which to control the two-stage analysis. |
... |
Additional arguments passed to |
adjustment |
a user-defined adjustment of the confirmation stage p-values. Only applicable when |
tx2gene |
Only applicable when |
A stageR/stageRTx object with stage-wise adjusted p-values.
object = stageRTx,method = character,alpha = numeric
: Adjust p-values in a two-stage analysis
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 R. Heller, E. Manduchi, G. R. Grant, and W. J. Ewens, "A flexible two-stage procedure for identifying gene sets that are differentially expressed." Bioinformatics (Oxford, England), vol. 25, pp. 1019-25, 2009.
S. Holm, "A Simple Sequentially Rejective Multiple Test Procedure," Scandinavian Journal of Statistics, vol. 6, no. 2, pp. 65-70, 1979. J. P. Shaffer, "Modified Sequentially Rejective Multiple Test Procedures," Journal of the American Statistical Association, vol. 81, p. 826, 1986.
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) getAdjustedPValues(stageRObj, onlySignificantGenes=TRUE, order=TRUE)
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) getAdjustedPValues(stageRObj, onlySignificantGenes=TRUE, order=TRUE)