Print Summary Statistics of Alpha Level Cutoffs

degSummary(object, alpha = c(0.1, 0.05, 0.01), contrast = NULL,
  caption = "", kable = FALSE)

Arguments

object

Can be DEGSet or DESeqDataSet or DESeqResults.

alpha

Numeric vector of desired alpha cutoffs.

contrast

Character vector to use with results() function.

caption

Character vector to add as caption to the table.

kable

Whether return a knitr::kable() output. Default is data.frame.

Value

data.frame or knitr::kable().

References

  • original idea of multiple alpha values and code syntax from Michael Steinbaugh.

Examples

library(DESeq2) data(humanGender) idx <- c(1:5, 75:80) counts <- assays(humanGender)[[1]] dse <- DESeqDataSetFromMatrix(counts[1:1000, idx], colData(humanGender)[idx,], design = ~group) dse <- DESeq(dse)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res1 <- results(dse) res2 <- degComps(dse, contrast = c("group_Male_vs_Female"))
#> Doing 1 element(s).
#> Doing results() for each element.
#> Doing lcfSrink() for each element.
#> using 'normal' for LFC shrinkage, the Normal prior from Love et al (2014). #> #> Note that type='apeglm' and type='ashr' have shown to have less bias than type='normal'. #> See ?lfcShrink for more details on shrinkage type, and the DESeq2 vignette. #> Reference: https://doi.org/10.1093/bioinformatics/bty895
degSummary(dse, contrast = "group_Male_vs_Female")
#> 0.1 0.05 #> LFC > 0 (up) LFC > 0 (up) : 4, 0.4% LFC > 0 (up) : 4, 0.4% #> LFC < 0 (down) LFC < 0 (down) : 3, 0.3% LFC < 0 (down) : 3, 0.3% #> outliers outliers [1] : 1, 0.1% outliers [1] : 1, 0.1% #> low counts low counts [2] : 0, 0% low counts [2] : 0, 0% #> cutoff (mean count < 46) (mean count < 46) #> 0.01 #> LFC > 0 (up) LFC > 0 (up) : 4, 0.4% #> LFC < 0 (down) LFC < 0 (down) : 1, 0.1% #> outliers outliers [1] : 1, 0.1% #> low counts low counts [2] : 0, 0% #> cutoff (mean count < 46)
degSummary(res1)
#> 0.1 0.05 #> LFC > 0 (up) LFC > 0 (up) : 4, 0.4% LFC > 0 (up) : 4, 0.4% #> LFC < 0 (down) LFC < 0 (down) : 3, 0.3% LFC < 0 (down) : 3, 0.3% #> outliers outliers [1] : 1, 0.1% outliers [1] : 1, 0.1% #> low counts low counts [2] : 0, 0% low counts [2] : 0, 0% #> cutoff (mean count < 46) (mean count < 46) #> 0.01 #> LFC > 0 (up) LFC > 0 (up) : 4, 0.4% #> LFC < 0 (down) LFC < 0 (down) : 1, 0.1% #> outliers outliers [1] : 1, 0.1% #> low counts low counts [2] : 0, 0% #> cutoff (mean count < 46)
degSummary(res1, kable = TRUE)
#> #> #> | |0.1 |0.05 |0.01 | #> |:--------------|:----------------------------|:----------------------------|:----------------------------| #> |LFC > 0 (up) |LFC > 0 (up) : 4, 0.4% |LFC > 0 (up) : 4, 0.4% |LFC > 0 (up) : 4, 0.4% | #> |LFC < 0 (down) |LFC < 0 (down) : 3, 0.3% |LFC < 0 (down) : 3, 0.3% |LFC < 0 (down) : 1, 0.1% | #> |outliers |outliers [1] : 1, 0.1% |outliers [1] : 1, 0.1% |outliers [1] : 1, 0.1% | #> |low counts |low counts [2] : 0, 0% |low counts [2] : 0, 0% |low counts [2] : 0, 0% | #> |cutoff |(mean count < 46) |(mean count < 46) |(mean count < 46) |
degSummary(res2[[1]])
#> 0.1 0.05 #> LFC > 0 (up) LFC > 0 (up) : 4, 0.4% LFC > 0 (up) : 4, 0.4% #> LFC < 0 (down) LFC < 0 (down) : 3, 0.3% LFC < 0 (down) : 3, 0.3% #> outliers outliers [1] : 1, 0.1% outliers [1] : 1, 0.1% #> low counts low counts [2] : 0, 0% low counts [2] : 0, 0% #> cutoff (mean count < 46) (mean count < 46) #> 0.01 #> LFC > 0 (up) LFC > 0 (up) : 4, 0.4% #> LFC < 0 (down) LFC < 0 (down) : 1, 0.1% #> outliers outliers [1] : 1, 0.1% #> low counts low counts [2] : 0, 0% #> cutoff (mean count < 46)