For all possible absolute log2 fold changes (LFC), which genes have at least this fold change at a specified False Discovery Rate (FDR)?

limma_confects(fit, coef = NULL, fdr = 0.05, step = 0.001,
  trend = FALSE, full = FALSE)

Arguments

fit

A limma MArrayLM object.

coef

Number or name of coefficient or contrast to test.

fdr

False Discovery Rate to control for.

step

Granularity of log2 fold changes to test.

trend

Should eBayes(trend=TRUE) be used?

full

Include some further statistics used to calculate confects in the output, and also include FDR-adjusted p-values that effect size is non-zero (note that this is against the spirit of the topconfects approach).

Value

See nest_confects for details of how to interpret the result.

Details

Results are presented in a table such that for any given LFC, if the reader chooses the genes with abs(confect) less than this they are assured that this set of genes has at least this LFC (with the specified FDR). Once this set of genes is selected, the confect values provide confidence bounds with False Coverage-statement Rate at the same level as the FDR.

fit should be produced using lmFit. It is not necessary to use eBayes, this function calls eBayes itself.

To test contrasts, this function can also be used with the result of contrasts.fit, but limma's handling of weights may be approximate (for example if voom has been used). For exact results for a contrast, use contrastToCoef to adjust the design matrix given to lmFit.

Examples

#Prepare a data set library(NBPSeq) library(edgeR) library(limma) data(arab) dgelist <- DGEList(arab) dgelist <- calcNormFactors(dgelist) cpms <- cpm(dgelist, log=TRUE) # Retain genes with more than a geometric mean of 2 RPM # (about 5 reads per sample) cpms <- cpms[rowMeans(cpms) >= 1,] # Fit linear model for each gene treatment <- c(FALSE,FALSE,FALSE,TRUE,TRUE,TRUE) batch <- factor(c(1,2,3,1,2,3)) design <- model.matrix(~ treatment + batch) fit <- lmFit(cpms, design) # Calculate top confects # As voom has not been used, it is necessary to use trend=TRUE limma_confects(fit, "treatmentTRUE", trend=TRUE)
#> $table #> rank index confect effect AveExpr name #> 1 16277 3.368 6.119901 4.562624 AT5G48430 #> 2 9681 2.955 4.737859 6.580063 AT3G46280 #> 3 5325 2.939 4.448903 6.074351 AT2G19190 #> 4 6738 2.728 4.279509 5.478560 AT2G39530 #> 5 6725 2.728 4.690481 4.339498 AT2G39380 #> 6 2741 2.728 4.967374 3.829884 AT1G51850 #> 7 11550 2.681 4.359977 9.145701 AT4G12500 #> 8 2738 2.654 3.975733 6.622807 AT1G51800 #> 9 10315 2.654 5.003027 3.347683 AT3G55150 #> 10 7112 2.654 4.864416 3.702749 AT2G44370 #> ... #> 1719 of 17681 non-zero log2 fold change at FDR 0.05 #> Prior df 10.6