levelPValues {Polyfit} | R Documentation |
Function to level out a P-value spectrum generated by the Polyfit extension of DESeq by fitting a quadratic function to the right hand portion of the spectrum, produce 'corrected' p-values and q-values using an adapted version of the Storey-Tibsharini procedure
levelPValues(oldPvals, plot = FALSE)
oldPvals |
an array of p-values produced by the Polyfit replacement of the DESeq function pfNbinomTest() or the Plyfit replacement of the edgeR function pfExactTest() |
plot |
TRUE to plot original and corrected pvalue spectra; FALSE not to plot |
levelPValues
should only be used with P-values generated by the Polyfit function pfNbinomTest
, and not with P-values generated by nbinomTest
.
List containing
pi0estimate |
an estimate of the proportion of genes not differentially expressed |
lambdaOptimal |
the point in the p-value spectrum past which a quadratic is fitted |
pValueCorr |
p-values calculated from the levelled spectrum |
qValueCorr |
q-values calculated from the levelled spectrum |
qValueCorrBH |
q-values calculated from pValueCorr using Benjamini-Hochberg |
Conrad Burden
Burden, C.J., Qureshi, S. and Wilson, S.R. (2014). Error estimates for the analysis of differential expression from RNA-seq count data, PeerJ PrePrints 2:e400v1.
cds <- makeExampleCountDataSet() cds <- estimateSizeFactors( cds ) cds <- estimateDispersions( cds ) nbTPolyfit <- pfNbinomTest( cds, "A", "B" ) lP <- levelPValues(nbTPolyfit$pval, plot=TRUE) pvalTab <- cbind(origPval=nbTPolyfit$pval, correctedPval=lP$pValueCorr) cat("\n Original and corrected P-values from DESeq \n") head(pvalTab)