diff --git a/NEWS b/NEWS index 9bbdd08..49bafd9 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,8 @@ DEGreport News CHANGES IN DEGreport 1.21.2 - + + * Feature: add `scale` option to degSignature * Feature: add lfdr support from fdrtools to degCombs and DEGSet object. CHANGES IN DEGreport 1.21.1 diff --git a/R/clustering.R b/R/clustering.R index d60449e..269b235 100644 --- a/R/clustering.R +++ b/R/clustering.R @@ -71,6 +71,7 @@ #' degPlotCluster(table, "group", "other", process = TRUE) #' @export degPlotCluster <- function(table, time, color = NULL, + min_genes = 10, process = FALSE, points = TRUE, boxes = TRUE, @@ -89,6 +90,7 @@ degPlotCluster <- function(table, time, color = NULL, if ("cluster" %in% colnames(table)){ counts <- table(distinct(table, genes, cluster)[["cluster"]]) + counts <- counts[counts>=min_genes] table <- inner_join(table, data.frame(cluster = as.integer(names(counts)), title = paste(names(counts), diff --git a/R/signature.R b/R/signature.R index a3dad47..d413cbf 100644 --- a/R/signature.R +++ b/R/signature.R @@ -36,14 +36,19 @@ #' should match \code{ma} column names #' row number should be the same length than p-values vector. #' @param slot slotName in the case of SummarizedExperiment objects. +#' @param scale Whether to scale or not the expression. #' @return ggplot plot. #' @examples #' data(humanGender) #' data(geneInfo) #' degSignature(humanGender, geneInfo, group = "group") #' @export -degSignature <- function(counts, signature, group = NULL, metadata = NULL, slot = 1){ +degSignature <- function(counts, signature, + group = NULL, metadata = NULL, + slot = 1, scale = FALSE){ c <- .get_counts(counts, slot) + if (scale) + c <- t(scale(t(c))) meta <- .get_meta(counts) if (is.null(meta)) meta <- metadata diff --git a/_pkgdown.yml b/_pkgdown.yml index bc4dc17..ad248f3 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,23 +1,63 @@ -url: http://lpantano.github.io/DEGreport +reference: +- title: All functions + desc: null + contents: + - '`DEGSet`' + - '`DEGreport-package`' + - '`createReport`' + - '`deg`' + - '`degCheckFactors`' + - '`degColors`' + - '`degComps`' + - '`degCorCov`' + - '`degCovariates`' + - '`degDefault`' + - '`degFilter`' + - '`degMA`' + - '`degMB`' + - '`degMDS`' + - '`degMV`' + - '`degMean`' + - '`degMerge`' + - '`degObj`' + - '`degPCA`' + - '`degPatterns`' + - '`degPlot`' + - '`degPlotCluster`' + - '`degPlotWide`' + - '`degQC`' + - '`degResults`' + - '`degSignature`' + - '`degSummary`' + - '`degVB`' + - '`degVar`' + - '`degVolcano`' + - '`geneInfo`' + - '`geom_cor`' + - '`humanGender`' + - '`significants`' +articles: +- title: All vignettes + desc: null + contents: '`DEGreport`' +navbar: + structure: + left: + - home + - intro + - reference + - articles + - tutorials + - news + right: github + components: + home: + icon: fa-home fa-lg + href: index.html + reference: + text: Reference + href: reference/index.html + intro: + text: Get started + href: articles/DEGreport.html -template: - params: - bootswatch: readable - -authors: - Lorena Pantano: - href: https://lpantano.github.io - Michael Steinbaugh: - href: http://steinbaugh.com - Rory Kirchner: - href: https://github.com/roryk - Victor Barrera: - href: https://github.com/vbarrera - Kenneth Daily: - Thanneer Malai Perumal: - Mary Piper: - href: https://github.com/marypiper - John Hutchinson: - href: https://github.com/jnhutchinson - Harvard Chan Bioinformatics Core: - href: http://bioinformatics.sph.harvard.edu diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..7e22053 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,133 @@ + + + + + + + + +Page not found (404) • DEGreport + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +Content not found. Please use links in the navbar. + +
+ +
+ + + + +
+ + + + + + + + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 3844671..fbb5b3a 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -8,21 +8,25 @@ License • DEGreport + - + + - + + - - + + + @@ -30,10 +34,12 @@ + + @@ -44,6 +50,7 @@ + @@ -60,7 +67,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -79,7 +86,6 @@ Reference - @@ -89,6 +95,7 @@ +
@@ -125,19 +132,23 @@

License

+ + + diff --git a/docs/articles/DEGreport.html b/docs/articles/DEGreport.html index 5dd7061..9a16511 100644 --- a/docs/articles/DEGreport.html +++ b/docs/articles/DEGreport.html @@ -6,9 +6,10 @@ QC and downstream analysis for differential expression RNA-seq • DEGreport - - - + + + + @@ -30,7 +31,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -58,13 +59,14 @@ +

Session info

- -
## R version 3.6.0 (2019-04-26)
+
+
## R version 3.6.1 (2019-07-05)
 ## Platform: x86_64-apple-darwin15.6.0 (64-bit)
 ## Running under: macOS Mojave 10.14.3
 ## 
@@ -419,75 +575,75 @@ 

## [8] datasets methods base ## ## other attached packages: -## [1] pheatmap_1.0.12 ComplexHeatmap_2.0.0 -## [3] DESeq2_1.24.0 SummarizedExperiment_1.14.0 -## [5] DelayedArray_0.10.0 BiocParallel_1.18.0 -## [7] matrixStats_0.54.0 Biobase_2.44.0 -## [9] GenomicRanges_1.36.0 GenomeInfoDb_1.20.0 -## [11] IRanges_2.18.1 S4Vectors_0.22.0 -## [13] BiocGenerics_0.30.0 DEGreport_1.20.0 -## [15] BiocStyle_2.12.0 +## [1] pheatmap_1.0.12 ComplexHeatmap_2.1.0 +## [3] DESeq2_1.25.10 SummarizedExperiment_1.15.8 +## [5] DelayedArray_0.11.4 BiocParallel_1.19.2 +## [7] matrixStats_0.54.0 Biobase_2.45.0 +## [9] GenomicRanges_1.37.15 GenomeInfoDb_1.21.1 +## [11] IRanges_2.19.14 S4Vectors_0.23.20 +## [13] BiocGenerics_0.31.5 DEGreport_1.21.2 +## [15] BiocStyle_2.13.2 ## ## loaded via a namespace (and not attached): ## [1] colorspace_1.4-1 rjson_0.2.20 -## [3] rprojroot_1.3-2 circlize_0.4.6 -## [5] htmlTable_1.13.1 XVector_0.24.0 +## [3] rprojroot_1.3-2 circlize_0.4.7 +## [5] htmlTable_1.13.1 XVector_0.25.0 ## [7] ggdendro_0.1-20 GlobalOptions_0.1.0 ## [9] base64enc_0.1-3 fs_1.3.1 ## [11] clue_0.3-57 rstudioapi_0.10 -## [13] roxygen2_6.1.1 ggrepel_0.8.1 -## [15] bit64_0.9-7 fansi_0.4.0 -## [17] AnnotationDbi_1.46.0 xml2_1.2.0 -## [19] splines_3.6.0 logging_0.9-107 -## [21] mnormt_1.5-5 geneplotter_1.62.0 -## [23] knitr_1.23 zeallot_0.1.0 -## [25] Formula_1.2-3 Nozzle.R1_1.1-1 -## [27] broom_0.5.2 annotate_1.62.0 -## [29] cluster_2.0.9 png_0.1-7 -## [31] BiocManager_1.30.4 compiler_3.6.0 -## [33] backports_1.1.4 assertthat_0.2.1 -## [35] Matrix_1.2-17 lazyeval_0.2.2 -## [37] cli_1.1.0 limma_3.40.2 -## [39] lasso2_1.2-20 acepack_1.4.1 -## [41] htmltools_0.3.6 tools_3.6.0 -## [43] gtable_0.3.0 glue_1.3.1 -## [45] GenomeInfoDbData_1.2.1 dplyr_0.8.1 -## [47] Rcpp_1.0.1 pkgdown_1.3.0 -## [49] vctrs_0.1.0 nlme_3.1-140 -## [51] psych_1.8.12 xfun_0.7 -## [53] stringr_1.4.0 XML_3.98-1.19 -## [55] edgeR_3.26.4 zlibbioc_1.30.0 -## [57] MASS_7.3-51.4 scales_1.0.0 -## [59] RColorBrewer_1.1-2 yaml_2.2.0 -## [61] memoise_1.1.0 gridExtra_2.3 -## [63] ggplot2_3.1.1 rpart_4.1-15 -## [65] reshape_0.8.8 latticeExtra_0.6-28 -## [67] stringi_1.4.3 RSQLite_2.1.1 -## [69] highr_0.8 genefilter_1.66.0 -## [71] desc_1.2.0 checkmate_1.9.3 -## [73] shape_1.4.4 rlang_0.3.4 -## [75] pkgconfig_2.0.2 commonmark_1.7 -## [77] bitops_1.0-6 evaluate_0.14 -## [79] lattice_0.20-38 purrr_0.3.2 -## [81] labeling_0.3 htmlwidgets_1.3 -## [83] cowplot_0.9.4 bit_1.1-14 -## [85] tidyselect_0.2.5 plyr_1.8.4 -## [87] magrittr_1.5 R6_2.4.0 -## [89] generics_0.0.2 Hmisc_4.2-0 -## [91] DBI_1.0.0 withr_2.1.2 -## [93] pillar_1.4.1 foreign_0.8-71 -## [95] survival_2.44-1.1 RCurl_1.95-4.12 -## [97] nnet_7.3-12 tibble_2.1.2 -## [99] crayon_1.3.4 utf8_1.1.4 -## [101] rmarkdown_1.13 GetoptLong_0.1.7 -## [103] locfit_1.5-9.1 data.table_1.12.2 -## [105] blob_1.1.1 ConsensusClusterPlus_1.48.0 -## [107] digest_0.6.19 xtable_1.8-4 -## [109] tidyr_0.8.3 munsell_0.5.0

+## [13] ggrepel_0.8.1 bit64_0.9-7 +## [15] fansi_0.4.0 AnnotationDbi_1.47.1 +## [17] splines_3.6.1 logging_0.10-108 +## [19] mnormt_1.5-5 geneplotter_1.63.0 +## [21] knitr_1.24 zeallot_0.1.0 +## [23] Formula_1.2-3 Nozzle.R1_1.1-1 +## [25] broom_0.5.2 annotate_1.63.0 +## [27] cluster_2.1.0 png_0.1-7 +## [29] BiocManager_1.30.4 compiler_3.6.1 +## [31] backports_1.1.4 assertthat_0.2.1 +## [33] Matrix_1.2-17 lazyeval_0.2.2 +## [35] cli_1.1.0 limma_3.41.15 +## [37] lasso2_1.2-20 acepack_1.4.1 +## [39] htmltools_0.3.6 tools_3.6.1 +## [41] gtable_0.3.0 glue_1.3.1 +## [43] GenomeInfoDbData_1.2.1 dplyr_0.8.3 +## [45] Rcpp_1.0.2 pkgdown_1.4.0 +## [47] vctrs_0.2.0 nlme_3.1-140 +## [49] psych_1.8.12 xfun_0.9 +## [51] stringr_1.4.0 XML_3.98-1.20 +## [53] edgeR_3.27.13 zlibbioc_1.31.0 +## [55] MASS_7.3-51.4 scales_1.0.0 +## [57] RColorBrewer_1.1-2 yaml_2.2.0 +## [59] memoise_1.1.0 gridExtra_2.3 +## [61] ggplot2_3.2.1 rpart_4.1-15 +## [63] reshape_0.8.8 latticeExtra_0.6-28 +## [65] stringi_1.4.3 RSQLite_2.1.2 +## [67] highr_0.8 genefilter_1.67.1 +## [69] desc_1.2.0 checkmate_1.9.4 +## [71] shape_1.4.4 rlang_0.4.0 +## [73] pkgconfig_2.0.2 bitops_1.0-6 +## [75] evaluate_0.14 lattice_0.20-38 +## [77] purrr_0.3.2 labeling_0.3 +## [79] htmlwidgets_1.3 cowplot_1.0.0 +## [81] bit_1.1-14 tidyselect_0.2.5 +## [83] plyr_1.8.4 magrittr_1.5 +## [85] R6_2.4.0 generics_0.0.2 +## [87] Hmisc_4.2-0 DBI_1.0.0 +## [89] withr_2.1.2 pillar_1.4.2 +## [91] foreign_0.8-71 survival_2.44-1.1 +## [93] RCurl_1.95-4.12 nnet_7.3-12 +## [95] tibble_2.1.3 crayon_1.3.4 +## [97] utf8_1.1.4 fdrtool_1.2.15 +## [99] rmarkdown_1.15 GetoptLong_0.1.7 +## [101] locfit_1.5-9.1 data.table_1.12.2 +## [103] blob_1.2.0 ConsensusClusterPlus_1.49.0 +## [105] digest_0.6.20 xtable_1.8-4 +## [107] tidyr_0.8.3 munsell_0.5.0
+ diff --git a/docs/articles/DEGreport_files/figure-html/check-factor-1.png b/docs/articles/DEGreport_files/figure-html/check-factor-1.png index 3327549..12102de 100644 Binary files a/docs/articles/DEGreport_files/figure-html/check-factor-1.png and b/docs/articles/DEGreport_files/figure-html/check-factor-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/cov-1.png b/docs/articles/DEGreport_files/figure-html/cov-1.png index edd252e..f1058be 100644 Binary files a/docs/articles/DEGreport_files/figure-html/cov-1.png and b/docs/articles/DEGreport_files/figure-html/cov-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/deseq2-2.png b/docs/articles/DEGreport_files/figure-html/deseq2-2.png index cd36067..9ee0f3d 100644 Binary files a/docs/articles/DEGreport_files/figure-html/deseq2-2.png and b/docs/articles/DEGreport_files/figure-html/deseq2-2.png differ diff --git a/docs/articles/DEGreport_files/figure-html/deseq2-3.png b/docs/articles/DEGreport_files/figure-html/deseq2-3.png index 4369b5f..8d88278 100644 Binary files a/docs/articles/DEGreport_files/figure-html/deseq2-3.png and b/docs/articles/DEGreport_files/figure-html/deseq2-3.png differ diff --git a/docs/articles/DEGreport_files/figure-html/deseq2-gene-plot-wide-1.png b/docs/articles/DEGreport_files/figure-html/deseq2-gene-plot-wide-1.png index bcb88ca..cea4145 100644 Binary files a/docs/articles/DEGreport_files/figure-html/deseq2-gene-plot-wide-1.png and b/docs/articles/DEGreport_files/figure-html/deseq2-gene-plot-wide-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/deseq2-gene-plots-1.png b/docs/articles/DEGreport_files/figure-html/deseq2-gene-plots-1.png index c8e53f5..cb958e5 100644 Binary files a/docs/articles/DEGreport_files/figure-html/deseq2-gene-plots-1.png and b/docs/articles/DEGreport_files/figure-html/deseq2-gene-plots-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/deseq2-volcano-1.png b/docs/articles/DEGreport_files/figure-html/deseq2-volcano-1.png index f480398..bd664e9 100644 Binary files a/docs/articles/DEGreport_files/figure-html/deseq2-volcano-1.png and b/docs/articles/DEGreport_files/figure-html/deseq2-volcano-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/markers-1.png b/docs/articles/DEGreport_files/figure-html/markers-1.png index ecb0cf2..0c17685 100644 Binary files a/docs/articles/DEGreport_files/figure-html/markers-1.png and b/docs/articles/DEGreport_files/figure-html/markers-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/pattern-1.png b/docs/articles/DEGreport_files/figure-html/pattern-1.png index 6895d26..d3d70f1 100644 Binary files a/docs/articles/DEGreport_files/figure-html/pattern-1.png and b/docs/articles/DEGreport_files/figure-html/pattern-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/plotMA-1.png b/docs/articles/DEGreport_files/figure-html/plotMA-1.png index f404993..d3544ca 100644 Binary files a/docs/articles/DEGreport_files/figure-html/plotMA-1.png and b/docs/articles/DEGreport_files/figure-html/plotMA-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/plotMA-cor-1.png b/docs/articles/DEGreport_files/figure-html/plotMA-cor-1.png index f404993..adb7336 100644 Binary files a/docs/articles/DEGreport_files/figure-html/plotMA-cor-1.png and b/docs/articles/DEGreport_files/figure-html/plotMA-cor-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/plotMA-raw-1.png b/docs/articles/DEGreport_files/figure-html/plotMA-raw-1.png index f404993..4cc97da 100644 Binary files a/docs/articles/DEGreport_files/figure-html/plotMA-raw-1.png and b/docs/articles/DEGreport_files/figure-html/plotMA-raw-1.png differ diff --git a/docs/articles/DEGreport_files/figure-html/qc-1.png b/docs/articles/DEGreport_files/figure-html/qc-1.png index b0b88ef..aeaa6e7 100644 Binary files a/docs/articles/DEGreport_files/figure-html/qc-1.png and b/docs/articles/DEGreport_files/figure-html/qc-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index a9a5dfc..cd05433 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -8,21 +8,25 @@ Articles • DEGreport + - + + - + + - - + + + @@ -30,10 +34,12 @@ + + @@ -44,6 +50,7 @@ + @@ -60,7 +67,7 @@ DEGreport - 1.21.1 + 1.21.2
@@ -79,7 +86,6 @@ Reference - @@ -89,6 +95,7 @@ +
@@ -108,19 +115,23 @@

All vignettes

+ + + diff --git a/docs/authors.html b/docs/authors.html index 08f3b96..3625cfb 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -8,21 +8,25 @@ Authors • DEGreport + - + + - + + - - + + + @@ -30,10 +34,12 @@ + + @@ -44,6 +50,7 @@ + @@ -60,7 +67,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -79,7 +86,6 @@ Reference - @@ -89,6 +95,7 @@ +
@@ -99,19 +106,19 @@

Authors

@@ -141,19 +148,23 @@

Authors

+ + + diff --git a/docs/index.html b/docs/index.html index 1fc3f7b..4e82758 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,9 +6,10 @@ Report of DEG analysis • DEGreport - - - + + + + DEGreport - 1.21.1 + 1.21.2 @@ -62,6 +63,7 @@ +
@@ -79,22 +81,22 @@

Bioconductor stable version

-
if (!requireNamespace("BiocManager", quietly=TRUE))
-    install.packages("BiocManager")
-BiocManager::install("DEGreport")
+
if (!requireNamespace("BiocManager", quietly=TRUE))
+    install.packages("BiocManager")
+BiocManager::install("DEGreport")

Bioconductor latest version

-
devtools::install_git("https://git@git.bioconductor.org/packages/DEGreport")
+
devtools::install_git("https://git@git.bioconductor.org/packages/DEGreport")

devtools unstable version

-
install.packages("devtools")
-devtools::install_github("lpantano/DEGreport")
+
install.packages("devtools")
+devtools::install_github("lpantano/DEGreport")

Load the package and learn what to do:

-

browseVignettes("DEGreport")

+

browseVignettes("DEGreport")

Here is the last devel vignette.

@@ -122,8 +124,7 @@

License

Developers

@@ -131,17 +132,20 @@

Developers

+ + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index c03fb08..9145958 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -21,8 +21,6 @@ body > .container { display: flex; height: 100%; flex-direction: column; - - padding-top: 60px; } body > .container .row { @@ -102,21 +100,13 @@ a.anchor { margin-top: -40px; } -/* Static header placement on mobile devices */ -@media (max-width: 767px) { - .navbar-fixed-top { - position: absolute; - } - .navbar { - padding: 0; - } -} - - /* Sidebar --------------------------*/ #sidebar { margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; } #sidebar h2 { font-size: 1.5em; @@ -133,6 +123,9 @@ a.anchor { .orcid { height: 16px; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; vertical-align: middle; } @@ -222,6 +215,19 @@ a.sourceLine:hover { visibility: visible; } +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + /* mark.js ----------------------------*/ mark { @@ -234,3 +240,17 @@ mark { .html-widget { margin-bottom: 10px; } + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index eb7e83d..087a762 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -2,14 +2,12 @@ (function($) { $(function() { - $("#sidebar") - .stick_in_parent({offset_top: 40}) - .on('sticky_kit:bottom', function(e) { - $(this).parent().css('position', 'static'); - }) - .on('sticky_kit:unbottom', function(e) { - $(this).parent().css('position', 'relative'); - }); + $('.navbar-fixed-top').headroom(); + + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); + }); $('body').scrollspy({ target: '#sidebar', diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 8b1b5d4..e65d8dc 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,9 +1,6 @@ pandoc: 2.3.1 -pkgdown: 1.3.0 +pkgdown: 1.4.0 pkgdown_sha: ~ articles: DEGreport: DEGreport.html -urls: - reference: http://lpantano.github.io/DEGreport/reference - article: http://lpantano.github.io/DEGreport/articles diff --git a/docs/reference/DEGSet.html b/docs/reference/DEGSet.html index a12a42f..ea17a28 100644 --- a/docs/reference/DEGSet.html +++ b/docs/reference/DEGSet.html @@ -8,21 +8,25 @@ DEGSet — DEGSet • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,11 +111,9 @@

DEGSet

-

S4 class to store data from differentially expression analysis. It should be compatible with different package and stores the information in a way the methods will work with all of them.

-
DEGSet(resList, default)
@@ -128,7 +132,7 @@ 

DEGSet

# S4 method for DESeqResults as.DEGSet(object, default = "shrunken", extras = NULL)
- +

Arguments

@@ -159,22 +163,22 @@

Arg

To name the comparison when using as.DEGSet.

- +

Details

-

For now supporting only DESeq2::results() output. +

For now supporting only DESeq2::results() output. Use constructor degComps() to create the object.

The list will contain one element for each comparison done. Each element has the following structure:

-

To access the raw table use deg(dgs, "raw"), to access the + +

To access the raw table use deg(dgs, "raw"), to access the shrunken table use deg(dgs, "shrunken") or just deg(dgs).

-

Examples

-
library(DESeq2)
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> Loading required package: parallel
#> +
library(DESeq2)
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> Loading required package: parallel
#> #> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:parallel’: #> #> clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, @@ -203,48 +207,48 @@

Examp #> #> colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

#> The following objects are masked from ‘package:base’: #> -#> aperm, apply, rowsum
library(edgeR)
#> Loading required package: limma
#> +#> aperm, apply, rowsum
library(edgeR)
#> Loading required package: limma
#> #> Attaching package: ‘limma’
#> The following object is masked from ‘package:DESeq2’: #> #> plotMA
#> The following object is masked from ‘package:BiocGenerics’: #> -#> plotMA
library(limma) -dds <- makeExampleDESeqDataSet(betaSD = 1) -colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) -design(dds) <- ~ condition + treatment -dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, combs = c("condition"))
#> 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). +#> plotMA
library(limma) +dds <- makeExampleDESeqDataSet(betaSD = 1) +colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) +design(dds) <- ~ condition + treatment +dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, combs = c("condition"))
#> 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
deg(res[[1]])
#> log2 fold change (MAP): condition B vs A +#> Reference: https://doi.org/10.1093/bioinformatics/bty895
deg(res)
#> log2 fold change (MAP): condition B vs A #> Wald test p-value: condition B vs A #> DataFrame with 1000 rows and 6 columns -#> baseMean log2FoldChange lfcSE -#> <numeric> <numeric> <numeric> -#> gene202 595.738080502665 2.84842810352626 0.26634771333669 -#> gene710 117.423055944441 2.27457157814062 0.269412722270367 -#> gene365 62.4434899710059 2.58422310739862 0.312590047837112 -#> gene92 220.780204589055 2.34371133129609 0.293935357285172 -#> gene364 504.522116500683 2.02714357936619 0.261124625693044 -#> ... ... ... ... -#> gene817 1.01863690444656 0.449433023322897 0.445454565205662 -#> gene843 0.337116176782868 -0.213542721980009 0.33541917558252 -#> gene896 0.641791262357825 -0.193113193147619 0.453528848117175 -#> gene929 0.400097105619871 0.148754379342596 0.336592062169539 -#> gene986 1.03912504596143 -0.0807878953313301 0.501091699324092 +#> baseMean log2FoldChange lfcSE +#> <numeric> <numeric> <numeric> +#> gene202 595.738080502665 2.84842810352625 0.266347713336691 +#> gene710 117.423055944441 2.27457157814062 0.269412722270367 +#> gene365 62.4434899710059 2.58422310739862 0.312590047837112 +#> gene92 220.780204589055 2.34371133129609 0.293935357285173 +#> gene364 504.522116500683 2.02714357936619 0.261124625693044 +#> ... ... ... ... +#> gene817 1.01863690444656 0.449433023322897 0.445454565205662 +#> gene843 0.337116176782868 -0.213542721980008 0.335419175582519 +#> gene896 0.641791262357825 -0.193113193147619 0.453528848117175 +#> gene929 0.400097105619871 0.148754379342596 0.336592062169539 +#> gene986 1.03912504596143 -0.08078789533133 0.501091699324092 #> stat pvalue padj #> <numeric> <numeric> <numeric> -#> gene202 10.4242414625226 1.9218668186503e-25 1.84307027908564e-22 -#> gene710 8.1957816603608 2.48969903778304e-16 1.19381068861697e-13 -#> gene365 8.0286548251752 9.85471916802645e-16 3.15022522737912e-13 -#> gene92 7.76267201527671 8.31584691463769e-15 1.99372429778439e-12 +#> gene202 10.4242414625226 1.92186681865069e-25 1.84307027908601e-22 +#> gene710 8.19578166036082 2.48969903778264e-16 1.19381068861678e-13 +#> gene365 8.02865482517521 9.85471916802617e-16 3.15022522737903e-13 +#> gene92 7.7626720152767 8.31584691463868e-15 1.99372429778462e-12 #> gene364 7.51756890822073 5.58041485417993e-14 1.07032356903171e-11 #> ... ... ... ... -#> gene817 1.05361747680227 0.292058084434073 NA +#> gene817 1.05361747680227 0.292058084434074 NA #> gene843 -0.406932816121088 0.684057332932902 NA #> gene896 -0.612499137852159 0.5402075682426 NA -#> gene929 0.414219583248068 0.67871330116447 NA -#> gene986 0.0436335995171098 0.965196468651691 NA
deg(res[[1]], tidy = "tibble")
#> # A tibble: 1,000 x 7 +#> gene929 0.414219583248068 0.678713301164469 NA +#> gene986 0.0436335995171099 0.965196468651691 NA
#> <numeric>
deg(res, tidy = "tibble")
#> # A tibble: 1,000 x 7 #> gene baseMean log2FoldChange lfcSE stat pvalue padj #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 gene202 596. 2.85 0.266 10.4 1.92e-25 1.84e-22 @@ -258,21 +262,20 @@

Examp #> 9 gene342 484. 1.45 0.225 6.50 7.90e-11 8.42e- 9 #> 10 gene880 27.5 2.80 0.402 6.48 9.01e-11 8.64e- 9 #> # … with 990 more rows

# From edgeR -dge <- DGEList(counts=counts(dds), group=colData(dds)[["treatment"]]) -dge <- estimateCommonDisp(dge) -res <- as.DEGSet(topTags(exactTest(dge))) +dge <- DGEList(counts=counts(dds), group=colData(dds)[["treatment"]]) +dge <- estimateCommonDisp(dge) +res <- as.DEGSet(topTags(exactTest(dge))) # From limma -v <- voom(counts(dds), model.matrix(~treatment, colData(dds)), plot=FALSE) -fit <- lmFit(v) -fit <- eBayes(fit, robust=TRUE)
#> Error in fitFDistRobustly(var, df1 = df, covariate = covariate, winsor.tail.p = winsor.tail.p): statmod package required but is not installed
res <- as.DEGSet(topTable(fit, n = "Inf"), "A_vs_B")
#> Error in topTable(fit, n = "Inf"): Need to run eBayes or treat first
+v <- voom(counts(dds), model.matrix(~treatment, colData(dds)), plot=FALSE) +fit <- lmFit(v) +fit <- eBayes(fit, robust=TRUE) +res <- as.DEGSet(topTable(fit, n = "Inf"), "A_vs_B")
#> Removing intercept from test coefficients
+ + + diff --git a/docs/reference/DEGreport-deprecated.html b/docs/reference/DEGreport-deprecated.html index 2b2ab33..7ecba0e 100644 --- a/docs/reference/DEGreport-deprecated.html +++ b/docs/reference/DEGreport-deprecated.html @@ -8,21 +8,25 @@ Deprecated functions in package DEGreport — DEGreport-package • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,13 +110,12 @@

Deprecated functions in package DEGreport

-

These functions are provided for compatibility with older versions of DEGreport only and will be defunct at the next release.

-
- + +

Details

The following functions are deprecated and will be made defunct; @@ -120,24 +125,23 @@

Details in variable genes. There are other methods nowadays like lcfShrink function. DEGreport

- +

See also

Useful links:

- + + + + + + diff --git a/docs/reference/createReport.html b/docs/reference/createReport.html index 4ff7b31..4a9fd9e 100644 --- a/docs/reference/createReport.html +++ b/docs/reference/createReport.html @@ -8,21 +8,25 @@ Create report of RNAseq DEG anlaysis — createReport • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,16 +111,14 @@

Create report of RNAseq DEG anlaysis

-

This function get the count matrix, pvalues, and FC of a DEG analysis and create a report to help to detect possible problems with the data.

-
createReport(g, counts, tags, pvalues, path, pop = 400,
   name = "DEGreport")
- +

Arguments

@@ -148,37 +152,39 @@

Arg

name of the html file

- +

Value

A HTML file with all figures and tables

- + + + diff --git a/docs/reference/deg.html b/docs/reference/deg.html index e868bcb..11b0d7c 100644 --- a/docs/reference/deg.html +++ b/docs/reference/deg.html @@ -8,21 +8,25 @@ Method to get all table stored for an specific comparison — deg • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,17 +109,15 @@

Method to get all table stored for an specific comparison

-

Method to get all table stored for an specific comparison

-
-
deg(object, ...)
+    
deg(object, value = NULL, tidy = NULL, top = NULL, ...)
 
 # S4 method for DEGSet
 deg(object, value = NULL, tidy = NULL, top = NULL,
   ...)
- +

Arguments

@@ -121,10 +125,6 @@

Arg

- - - - @@ -137,43 +137,51 @@

Arg

+ + + +
object

DEGSet

...

Other parameters to pass for other methods.

value

Character to specify which table to use.

top

Limit number of rows to return. Default: All.

...

Other parameters to pass for other methods.

- +

References

-

Author

Lorena Pantano

+ + + diff --git a/docs/reference/degCheckFactors-1.png b/docs/reference/degCheckFactors-1.png index aa599ed..74dab95 100644 Binary files a/docs/reference/degCheckFactors-1.png and b/docs/reference/degCheckFactors-1.png differ diff --git a/docs/reference/degCheckFactors.html b/docs/reference/degCheckFactors.html index fa0d553..2a0fe9d 100644 --- a/docs/reference/degCheckFactors.html +++ b/docs/reference/degCheckFactors.html @@ -8,21 +8,25 @@ Distribution of gene ratios used to calculate Size Factors. — degCheckFactors • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,15 +111,13 @@

Distribution of gene ratios used to calculate Size Factors.

-

This function check the median ratio normalization used by DESeq2 and similarly by edgeR to visualy check whether the median is the best size factor to represent depth.

-
degCheckFactors(counts, each = FALSE)
- +

Arguments

@@ -127,11 +131,10 @@

Arg

Plot each sample separately.

- +

Value

ggplot2 object

-

Details

This function will plot the gene ratios for each sample. To calculate @@ -140,50 +143,50 @@

Details of the ratios should approximate to a normal shape and the factors should be similar to the median of distributions. If some samples show different distribution, the factor may be bias due to some biological or technical factor.

-

References

- - @@ -93,6 +98,7 @@ +
@@ -104,15 +110,13 @@

Make nice colors for metadata

-

The function will take a metadata table and use Set2 palette when number of levels is > 3 or a set or orange/blue colors other wise.

-
-
degColors(ann, col_fun = FALSE, con_values = c("grey80", "black"),
-  cat_values = c("orange", "steelblue"), palette = "Set2")
- +
degColors(ann, col_fun = FALSE, con_values = c("grey80", "black"),
+  cat_values = c("orange", "steelblue"), palette = "Set2")
+

Arguments

@@ -124,7 +128,7 @@

Arg

@@ -142,13 +146,13 @@

Arg multi-levels categorical variables.

col_fun

Whether to return a function for continuous variables -(compatible with ComplexHeatmap::HeatmapAnnotation()) or +(compatible with ComplexHeatmap::HeatmapAnnotation()) or the colors themself (comparible with [pheatmap::pheatmap())]).

[pheatmap::pheatmap())]: R:pheatmap::pheatmap())

- +

Examples

-
data(humanGender) -library(DESeq2) -library(ComplexHeatmap)
#> Loading required package: grid
#> ======================================== -#> ComplexHeatmap version 2.0.0 +
data(humanGender) +library(DESeq2) +library(ComplexHeatmap)
#> Loading required package: grid
#> ======================================== +#> ComplexHeatmap version 2.1.0 #> Bioconductor page: http://bioconductor.org/packages/ComplexHeatmap/ #> Github page: https://github.com/jokergoo/ComplexHeatmap #> Documentation: http://jokergoo.github.io/ComplexHeatmap-reference @@ -156,44 +160,47 @@

Examp #> If you use it in published research, please cite: #> Gu, Z. Complex heatmaps reveal patterns and correlations in multidimensional #> genomic data. Bioinformatics 2016. -#> ========================================

idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:10, idx], +#> ========================================
idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:10, idx], colData(humanGender)[idx,], design=~group) -th <- HeatmapAnnotation(df = colData(dse), +th <- HeatmapAnnotation(df = colData(dse), col = degColors(colData(dse), TRUE)) -Heatmap(log2(counts(dse)+0.5), top_annotation = th)
+Heatmap(log2(counts(dse)+0.5), top_annotation = th)
custom <- degColors(colData(dse), TRUE, - con_values = c("white", "red"), - cat_values = c("white", "black"), + con_values = c("white", "red"), + cat_values = c("white", "black"), palette = "Set1") -th <- HeatmapAnnotation(df = colData(dse), +th <- HeatmapAnnotation(df = colData(dse), col = custom) -Heatmap(log2(counts(dse)+0.5), top_annotation = th)
+Heatmap(log2(counts(dse)+0.5), top_annotation = th)
+ + + diff --git a/docs/reference/degComps.html b/docs/reference/degComps.html index 7608901..1f9a3d3 100644 --- a/docs/reference/degComps.html +++ b/docs/reference/degComps.html @@ -8,21 +8,25 @@ Automatize the use of <code>results()</code> for multiple comparisons — degComps • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,21 +110,19 @@

Automatize the use of results() for multiple comparisons

- -

This function will extract the output of DESeq2::results() -and DESeq2::lfcShrink() for multiple comparison using:

- +

This function will extract the output of DESeq2::results() +and DESeq2::lfcShrink() for multiple comparison using:

degComps(dds, combs = NULL, contrast = NULL, alpha = 0.05,
-  skip = FALSE, type = "normal", pairs = FALSE)
- + skip = FALSE, type = "normal", pairs = FALSE, fdr = "default")
+

Arguments

- + @@ -127,11 +131,11 @@

Arg

- + - + @@ -140,37 +144,44 @@

Arg

- + +use the coefficient already created from DESeq2::resultsNames().

+ + + +
dds

DESeq2::DESeqDataSet obcject.

DESeq2::DESeqDataSet obcject.

combs
contrast

Optional vector to specify contrast. See DESeq2::results().

Optional vector to specify contrast. See DESeq2::results().

alpha

Numeric value used in independent filtering in DESeq2::results().

Numeric value used in independent filtering in DESeq2::results().

skip
type

Type of shrinkage estimator. See DESeq2::lfcShrink().

Type of shrinkage estimator. See DESeq2::lfcShrink().

pairs

Boolean to indicate whether create all comparisons or only -use the coefficient already created from DESeq2::resultsNames().

fdr

type of fdr correction. default is FDR value, +lfdr-stat is +for local FDR using the statistics of the test, +lfdr-pvalue is for local FDR using the p-value of the test

- +

Value

DEGSet with unSrunken and Srunken results.

-

Details

- - @@ -95,6 +100,7 @@ +
@@ -107,14 +113,12 @@

Calculate the correlation relationshipt among all covariates

-

This function will calculate the correlation among all columns in the metadata

-
degCorCov(metadata, fdr = 0.05, ...)
- +

Arguments

@@ -130,10 +134,10 @@

Arg

- +
...

Parameters to pass to ComplexHeatmap::Heatmap().

Parameters to pass to ComplexHeatmap::Heatmap().

- +

Value

: list: @@ -141,13 +145,12 @@

Value

b) corMat, data.frame with correlation matrix c) fdrMat, data.frame with FDR matrix b) plot, Heatmap plot of correlation matrix

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) cor <- degCorCov(colData(dse))
#> Warning: The input is a data frame, convert it to the matrix.
@@ -155,9 +158,7 @@

Examp

Contents

@@ -166,19 +167,23 @@

Author

+ + + diff --git a/docs/reference/degCovariates-1.png b/docs/reference/degCovariates-1.png index 2e8214c..a5c0fe6 100644 Binary files a/docs/reference/degCovariates-1.png and b/docs/reference/degCovariates-1.png differ diff --git a/docs/reference/degCovariates-4.png b/docs/reference/degCovariates-4.png index 3f715cd..07665ad 100644 Binary files a/docs/reference/degCovariates-4.png and b/docs/reference/degCovariates-4.png differ diff --git a/docs/reference/degCovariates.html b/docs/reference/degCovariates.html index 622a904..f8ff288 100644 --- a/docs/reference/degCovariates.html +++ b/docs/reference/degCovariates.html @@ -8,21 +8,25 @@ Find correlation between pcs and covariates — degCovariates • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -57,6 +62,7 @@ + @@ -73,7 +79,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -92,7 +98,6 @@ Reference - @@ -102,6 +107,7 @@ +
@@ -113,7 +119,6 @@

Find correlation between pcs and covariates

-

This function will calculate the pcs using prcomp function, and correlate categorical and numerical variables from metadata. The size of the dots indicates the importance of the @@ -125,13 +130,12 @@

Find correlation between pcs and covariates

Only significant variables according the linear model are colored. See details to know how this is calculated.

-
degCovariates(counts, metadata, fdr = 0.1, scale = FALSE, minPC = 5,
   correlation = "kendall", addCovDen = TRUE, legacy = FALSE,
   smart = TRUE, method = "lm", plot = TRUE)
- +

Arguments

@@ -192,7 +196,7 @@

Arg

Whether to plot or not the correlation matrix.

- +

Value

: list:

-

Details

This method is adapeted from Daily et al 2017 article. @@ -237,40 +240,44 @@

Details uses lm to regress the data and uses the p-value calculated by each variable in the model to define significance (pvalue < 0.05). lm or lasso can be used here.

-

References

Daily, K. et al. Molecular, phenotypic, and sample-associated data to describe pluripotent stem cell lines and derivatives. Sci Data 4, 170030 (2017).

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -res <- degCovariates(log2(counts(dse)+0.5), colData(dse))
#> +res <- degCovariates(log2(counts(dse)+0.5), colData(dse))
#> #> running pca and calculating correlations for: #> un-scaled data in pca; #> pve >= 5%; -#> kendall cor
res <- degCovariates(log2(counts(dse)+0.5), +#> kendall cor
#> Warning: Unquoting language objects with `!!!` is deprecated as of rlang 0.4.0. +#> Please use `!!` instead. +#> +#> # Bad: +#> dplyr::select(data, !!!enquo(x)) +#> +#> # Good: +#> dplyr::select(data, !!enquo(x)) # Unquote single quosure +#> dplyr::select(data, !!!enquos(x)) # Splice list of quosures +#> +#> This warning is displayed once per session.
res <- degCovariates(log2(counts(dse)+0.5), colData(dse), legacy = TRUE)
#> #> running pca and calculating correlations for: #> un-scaled data in pca; #> pve >= 5%; -#> kendall cor
res$plot
res$scatterPlot[[1]]
+#> kendall cor
res$plot
res$scatterPlot[[1]]
+ + + diff --git a/docs/reference/degDefault.html b/docs/reference/degDefault.html index 4226a88..374b4c9 100644 --- a/docs/reference/degDefault.html +++ b/docs/reference/degDefault.html @@ -8,21 +8,25 @@ Method to get the default table to use. — degDefault • DEGreport + - + + - + + - - + + + @@ -30,13 +34,16 @@ - - + + + @@ -47,6 +54,7 @@ + @@ -63,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +90,6 @@ Reference - @@ -92,6 +99,7 @@ +
@@ -103,16 +111,21 @@

Method to get the default table to use.

- -

Method to get the default table to use.

- +

It can accept a list of new padj values matching the +same dimmensions than the current vector. +It can calculate the lfdr based on fdrtool::fdrtool function.

degDefault(object)
 
+degCorrect(object, fdr)
+
 # S4 method for DEGSet
-degDefault(object)
- +degDefault(object) + +# S4 method for DEGSet +degCorrect(object, fdr)
+

Arguments

@@ -120,34 +133,88 @@

Arg

+ + + + + + + +
object

DEGSet

fdr

It can be fdr-stat, fdr-pvalue, vector of new padj

object

DEGSet

- + +

Examples

+
library(DESeq2) +library(dplyr)
#> +#> Attaching package: ‘dplyr’
#> The following object is masked from ‘package:matrixStats’: +#> +#> count
#> The following object is masked from ‘package:Biobase’: +#> +#> combine
#> The following objects are masked from ‘package:GenomicRanges’: +#> +#> intersect, setdiff, union
#> The following object is masked from ‘package:GenomeInfoDb’: +#> +#> intersect
#> The following objects are masked from ‘package:IRanges’: +#> +#> collapse, desc, intersect, setdiff, slice, union
#> The following objects are masked from ‘package:S4Vectors’: +#> +#> first, intersect, rename, setdiff, setequal, union
#> The following objects are masked from ‘package:BiocGenerics’: +#> +#> combine, intersect, setdiff, union
#> The following objects are masked from ‘package:stats’: +#> +#> filter, lag
#> The following objects are masked from ‘package:base’: +#> +#> intersect, setdiff, setequal, union
dds <- makeExampleDESeqDataSet(betaSD=1) +colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) +design(dds) <- ~ condition + treatment +dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, contrast = list("treatment_B_vs_A"))
#> 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
degCorrect(res, fdr = "lfdr-stat")
#> Step 1... determine cutoff point +#> Step 2... estimate parameters of null distribution and eta0 +#> Step 3... compute p-values and estimate empirical PDF/CDF +#> Step 4... compute q-values and local fdr +#> +#> Step 1... determine cutoff point +#> Step 2... estimate parameters of null distribution and eta0 +#> Step 3... compute p-values and estimate empirical PDF/CDF +#> Step 4... compute q-values and local fdr +#>
#> Comparisons: treatment.B.vs.A +#> Results in comparison: raw,shrunken +#> Default is: shrunken
+ + + diff --git a/docs/reference/degFilter.html b/docs/reference/degFilter.html index b705d38..c3c948a 100644 --- a/docs/reference/degFilter.html +++ b/docs/reference/degFilter.html @@ -8,21 +8,25 @@ Filter genes by group — degFilter • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,14 +110,12 @@

Filter genes by group

-

This function will keep only rows that have a minimum counts of 1 at least in a min number of samples (default 80

-
degFilter(counts, metadata, group, min = 0.8, minreads = 0)
- +

Arguments

@@ -124,7 +128,7 @@

Arg

+colnames(counts).

@@ -143,46 +147,47 @@

Arg a feature expressed.

metadata

Data.frame with information about each column in counts matrix. Rownames should match -colnames(counts).

group
- +

Value

count matrix after filtering genes (features) with not enough expression in any group.

-

Examples

-
data(humanGender) -library(SummarizedExperiment) -idx <- c(1:10, 75:85) -c <- degFilter(assays(humanGender)[[1]][1:1000, idx], - colData(humanGender)[idx,], "group", min=1)
+
data(humanGender) +library(SummarizedExperiment) +idx <- c(1:10, 75:85) +c <- degFilter(assays(humanGender)[[1]][1:1000, idx], + colData(humanGender)[idx,], "group", min=1)
+ + + diff --git a/docs/reference/degMA-1.png b/docs/reference/degMA-1.png index 16044e0..4ccc34e 100644 Binary files a/docs/reference/degMA-1.png and b/docs/reference/degMA-1.png differ diff --git a/docs/reference/degMA.html b/docs/reference/degMA.html index 7f837e7..468da4e 100644 --- a/docs/reference/degMA.html +++ b/docs/reference/degMA.html @@ -8,21 +8,25 @@ MA-plot from base means and log fold changes — degMA • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,15 +109,13 @@

MA-plot from base means and log fold changes

-

MA-plot addaptation to show the shrinking effect.

-
degMA(results, title = NULL, label_points = NULL,
   label_column = "symbol", limit = NULL, diff = 5, raw = FALSE,
   correlation = FALSE)
- +

Arguments

@@ -149,28 +153,25 @@

Arg

Whether to plot the correlation of the two logFCs.

- +

Value

MA-plot ggplot.

-

Examples

-
library(DESeq2) -dds <- makeExampleDESeqDataSet(betaSD=1) -dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, contrast = list("condition_B_vs_A"))
#> 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). +
library(DESeq2) +dds <- makeExampleDESeqDataSet(betaSD=1) +dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, contrast = list("condition_B_vs_A"))
#> 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
degMA(res[["condition_B_vs_A"]])
+#> Reference: https://doi.org/10.1093/bioinformatics/bty895
degMA(res)
+ + + diff --git a/docs/reference/degMB-1.png b/docs/reference/degMB-1.png index 015679b..07fa0bd 100644 Binary files a/docs/reference/degMB-1.png and b/docs/reference/degMB-1.png differ diff --git a/docs/reference/degMB.html b/docs/reference/degMB.html index dbf0ad0..52c6bc5 100644 --- a/docs/reference/degMB.html +++ b/docs/reference/degMB.html @@ -8,21 +8,25 @@ Distribution of expression of DE genes compared to the background — degMB • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,13 +109,11 @@

Distribution of expression of DE genes compared to the background

-

Distribution of expression of DE genes compared to the background

-
degMB(tags, group, counts, pop = 400)
- +

Arguments

@@ -132,50 +136,51 @@

Arg

number of random samples taken for background comparison

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes +dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) -degMB(row.names(res)[1:20], colData(dds)[["group"]], - counts(dds, normalized = TRUE))
+#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) +degMB(row.names(res)[1:20], colData(dds)[["group"]], + counts(dds, normalized = TRUE))
+ + + diff --git a/docs/reference/degMDS-1.png b/docs/reference/degMDS-1.png index f6150cc..8359b83 100644 Binary files a/docs/reference/degMDS-1.png and b/docs/reference/degMDS-1.png differ diff --git a/docs/reference/degMDS.html b/docs/reference/degMDS.html index f3e5d84..746f82a 100644 --- a/docs/reference/degMDS.html +++ b/docs/reference/degMDS.html @@ -8,21 +8,25 @@ Plot MDS from normalized count data — degMDS • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,15 +110,13 @@

Plot MDS from normalized count data

-

Uses cmdscale to get multidimensional scaling of data matrix, and plot the samples with ggplot2.

-
degMDS(counts, condition = NULL, k = 2, d = "euclidian", xi = 1,
   yi = 2)
- +

Arguments

@@ -142,46 +146,47 @@

Arg

number of component to plot in y-axis

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -degMDS(counts(dse), condition = colData(dse)[["group"]])
+degMDS(counts(dse), condition = colData(dse)[["group"]])
+ + + diff --git a/docs/reference/degMV-1.png b/docs/reference/degMV-1.png index 15976d3..bb1ad69 100644 Binary files a/docs/reference/degMV-1.png and b/docs/reference/degMV-1.png differ diff --git a/docs/reference/degMV.html b/docs/reference/degMV.html index 7c4daad..df559e4 100644 --- a/docs/reference/degMV.html +++ b/docs/reference/degMV.html @@ -9,21 +9,25 @@ Correlation of the standard desviation and the mean of the abundance of a set of genes. — degMV • DEGreport + - + + - + + - - + + + @@ -31,15 +35,16 @@ + - + @@ -50,6 +55,7 @@ + @@ -66,7 +72,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -85,7 +91,6 @@ Reference - @@ -95,6 +100,7 @@ +
@@ -107,14 +113,12 @@

Correlation of the standard desviation and the mean of the abundance of a

-

Correlation of the standard desviation and the mean of the abundance of a set of genes.

-
degMV(group, pvalues, counts, sign = 0.01)
- +

Arguments

@@ -137,24 +141,23 @@

Arg row number should be the same length than pvalues vector.

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes +dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) +#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) degMV(colData(dds)[["group"]], res[, 4], - counts(dds, normalized = TRUE))
#> Warning: Removed 1 rows containing non-finite values (stat_quantile).
#> Warning: Computation failed in `stat_quantile()`: + counts(dds, normalized = TRUE))
#> Warning: Removed 1 rows containing non-finite values (stat_quantile).
#> Warning: Computation failed in `stat_quantile()`: #> Package `quantreg` required for `stat_quantile`. #> Please install and try again.
@@ -162,28 +165,30 @@

Examp

Contents

+ + + diff --git a/docs/reference/degMean-1.png b/docs/reference/degMean-1.png index 3b1d4a1..3db3bec 100644 Binary files a/docs/reference/degMean-1.png and b/docs/reference/degMean-1.png differ diff --git a/docs/reference/degMean.html b/docs/reference/degMean.html index 2efe985..af00d24 100644 --- a/docs/reference/degMean.html +++ b/docs/reference/degMean.html @@ -8,21 +8,25 @@ Distribution of pvalues by expression range — degMean • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,14 +110,12 @@

Distribution of pvalues by expression range

-

This function plot the p-values distribution colored by the quantiles of the average count data.

-
degMean(pvalues, counts)
- +

Arguments

@@ -125,49 +129,50 @@

Arg row number should be the same length than pvalues vector.

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes +dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) -degMean(res[, 4], counts(dds))
+#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) +degMean(res[, 4], counts(dds))
+ + + diff --git a/docs/reference/degMerge.html b/docs/reference/degMerge.html index 2b30384..371d87c 100644 --- a/docs/reference/degMerge.html +++ b/docs/reference/degMerge.html @@ -8,21 +8,25 @@ Integrate data comming from degPattern into one data object — degMerge • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -51,6 +56,7 @@ + @@ -67,7 +73,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -86,7 +92,6 @@ Reference - @@ -96,6 +101,7 @@ +
@@ -107,18 +113,16 @@

Integrate data comming from degPattern into one data object

-

The simplest case is if you want to convine the pattern profile for gene expression data and proteomic data. It will use the first element as the base for the integration. Then, it will loop through clusters and run degPatterns in the second data set to detect patterns that match this one.

-
degMerge(matrix_list, cluster_list, metadata_list, summarize = "group",
   time = "time", col = "condition", scale = TRUE, mapping = NULL)
- +

Arguments

@@ -158,38 +162,40 @@

Arg when integrating miRNA/mRNA.

- +

Value

A data.frame with information on what genes are in each cluster in all data set, and the correlation value for each pair cluster comparison.

- + + + diff --git a/docs/reference/degObj.html b/docs/reference/degObj.html index 522e1c1..e1c2335 100644 --- a/docs/reference/degObj.html +++ b/docs/reference/degObj.html @@ -9,21 +9,25 @@ Create a deg object that can be used to plot expression values at shiny server:runGist(9930881) — degObj • DEGreport + - + + - + + - - + + + @@ -31,15 +35,16 @@ + - + @@ -50,6 +55,7 @@ + @@ -66,7 +72,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -85,7 +91,6 @@ Reference - @@ -95,6 +100,7 @@ +
@@ -107,14 +113,12 @@

Create a deg object that can be used to plot expression values

-

Create a deg object that can be used to plot expression values at shiny server:runGist(9930881)

-
degObj(counts, design, outfile)
- +

Arguments

@@ -131,43 +135,44 @@

Arg

File that will contain the object.

- +

Value

R object to be load into vizExp.

-

Examples

-
data(humanGender) -library(SummarizedExperiment) -degObj(assays(humanGender)[[1]], colData(humanGender), NULL)
#> please, give an output file name.
+
data(humanGender) +library(SummarizedExperiment) +degObj(assays(humanGender)[[1]], colData(humanGender), NULL)
#> please, give an output file name.
+ + + diff --git a/docs/reference/degPCA-1.png b/docs/reference/degPCA-1.png index 0f2c8e8..9e93dea 100644 Binary files a/docs/reference/degPCA-1.png and b/docs/reference/degPCA-1.png differ diff --git a/docs/reference/degPCA.html b/docs/reference/degPCA.html index cf9cef0..ba74ecb 100644 --- a/docs/reference/degPCA.html +++ b/docs/reference/degPCA.html @@ -8,21 +8,25 @@ smart PCA from count matrix data — degPCA • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,14 +109,12 @@

smart PCA from count matrix data

-

nice plot using ggplot2 from prcomp function

-
degPCA(counts, metadata = NULL, condition = NULL, pc1 = "PC1",
   pc2 = "PC2", name = NULL, shape = NULL, data = FALSE)
- +

Arguments

@@ -147,29 +151,26 @@

Arg

Whether return PCA data or just plot the PCA.

- +

Value

if results <- used, the function return the output -of prcomp().

- +of prcomp().

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -degPCA(log2(counts(dse)+0.5), colData(dse), +degPCA(log2(counts(dse)+0.5), colData(dse), condition="group", name="group", shape="group")
+ + + diff --git a/docs/reference/degPatterns-1.png b/docs/reference/degPatterns-1.png index 9067084..cdd20b5 100644 Binary files a/docs/reference/degPatterns-1.png and b/docs/reference/degPatterns-1.png differ diff --git a/docs/reference/degPatterns-2.png b/docs/reference/degPatterns-2.png index 505d4fc..e8e0912 100644 Binary files a/docs/reference/degPatterns-2.png and b/docs/reference/degPatterns-2.png differ diff --git a/docs/reference/degPatterns.html b/docs/reference/degPatterns.html index 42c4ec3..a851c80 100644 --- a/docs/reference/degPatterns.html +++ b/docs/reference/degPatterns.html @@ -8,21 +8,25 @@ Make groups of genes using expression profile. — degPatterns • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -51,6 +56,7 @@ + @@ -67,7 +73,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -86,7 +92,6 @@ Reference - @@ -96,6 +101,7 @@ +
@@ -107,13 +113,11 @@

Make groups of genes using expression profile.

-

Note that this function doesn't calculate significant difference between groups, so the matrix used as input should be already filtered to contain only genes that are significantly different or the most interesting genes to study.

-
degPatterns(ma, metadata, minc = 15, summarize = "merge",
@@ -121,7 +125,7 @@ 

Make groups of genes using expression profile.

reduce = FALSE, cutoff = 0.7, scale = TRUE, pattern = NULL, groupDifference = NULL, eachStep = FALSE, plot = TRUE, fixy = NULL)
- +

Arguments

@@ -161,7 +165,7 @@

Arg

+or cluster::diana()

@@ -206,7 +210,7 @@

Arg

consensusCluster

Indicates whether using ConsensusClusterPlus -or cluster::diana()

reduce

vector integers used as ylim in plot

- +

Value

list wiht two items:

    @@ -229,7 +233,6 @@

    Value

    changed at different values for clustering cuttree function.

-

Details

It can work with one or more groups with 2 or @@ -241,14 +244,14 @@

Details Then, all pair-wise gene expression is calculated using cor.test R function using kendall as the statistical method. A distance matrix is created from those values. -After that, cluster::diana() is used for the +After that, cluster::diana() is used for the clustering of gene-gene distance matrix and cut the tree using the divisive coefficient of the clustering, giving as well by diana. Alternatively, if consensusCluster is on, it would use ConsensusClusterPlus to cut the tree in stable clusters. Finally, for each group of genes, only the ones that have genes higher than minc parameter will be added to the figure. -The y-axis in the figure is the results of applying scale() +The y-axis in the figure is the results of applying scale() R function, what is similar to creating a Z-score where values are centered to the mean and scaled to the standard desviation by each gene.

@@ -256,16 +259,15 @@

Details to get similar ones into only one pattern. The expression correlation of the patterns will be used to decide whether some need to be merged or not.

-

Examples

-
data(humanGender) -library(SummarizedExperiment) -library(ggplot2) -ma <- assays(humanGender)[[1]][1:100,] -des <- colData(humanGender) -des[["other"]] <- sample(c("a", "b"), 85, replace = TRUE) -res <- degPatterns(ma, des, time="group", col = "other")
#> Working with 100 genes.
#> Working with 67 genes after filtering: minc > 15
#> Joining, by = "merge"
#> Joining, by = "merge"
# Use the data yourself for custom figures +
data(humanGender) +library(SummarizedExperiment) +library(ggplot2) +ma <- assays(humanGender)[[1]][1:100,] +des <- colData(humanGender) +des[["other"]] <- sample(c("a", "b"), 85, replace = TRUE) +res <- degPatterns(ma, des, time="group", col = "other")
#> Working with 100 genes.
#> Working with 85 genes after filtering: minc > 15
#> Joining, by = "merge"
#> Joining, by = "merge"
# Use the data yourself for custom figures ggplot(res[["normalized"]], aes(group, value, color = other, fill = other)) + geom_boxplot() + @@ -277,30 +279,31 @@

Examp

Contents

+ + + diff --git a/docs/reference/degPlot-1.png b/docs/reference/degPlot-1.png index 2d322f7..635b143 100644 Binary files a/docs/reference/degPlot-1.png and b/docs/reference/degPlot-1.png differ diff --git a/docs/reference/degPlot-2.png b/docs/reference/degPlot-2.png index b932f7f..5b53906 100644 Binary files a/docs/reference/degPlot-2.png and b/docs/reference/degPlot-2.png differ diff --git a/docs/reference/degPlot-3.png b/docs/reference/degPlot-3.png index 2555de5..d81cc77 100644 Binary files a/docs/reference/degPlot-3.png and b/docs/reference/degPlot-3.png differ diff --git a/docs/reference/degPlot.html b/docs/reference/degPlot.html index b828860..99f6430 100644 --- a/docs/reference/degPlot.html +++ b/docs/reference/degPlot.html @@ -8,21 +8,25 @@ Plot top genes allowing more variables to color and shape points — degPlot • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,22 +109,20 @@

Plot top genes allowing more variables to color and shape points

-

Plot top genes allowing more variables to color and shape points

-
degPlot(dds, xs, res = NULL, n = 9, genes = NULL, group = NULL,
-  batch = NULL, metadata = NULL, ann = c("geneID", "symbol"),
+  batch = NULL, metadata = NULL, ann = c("geneID", "symbol"),
   slot = 1L, log2 = TRUE, xsLab = xs, ysLab = "abundance",
   color = "black", groupLab = group, batchLab = batch)
- +

Arguments

- @@ -129,7 +133,7 @@

Arg

- + @@ -192,49 +196,50 @@

Arg

dds

DESeq2::DESeqDataSet object or SummarizedExperiment +

DESeq2::DESeqDataSet object or SummarizedExperiment or Matrix or data.frame. In case of a DESeqDataSet object, always the normalized expression will be used from counts(dds, normalized = TRUE).

res

DESeq2::DESeqResults object.

DESeq2::DESeqResults object.

n

Character, alternative label for batch (default: same as batch).

- +

Value

ggplot showing the expresison of the genes

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][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
#> -- replacing outliers and refitting for 1 genes +dse <- DESeq(dse)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
degPlot(dse, genes = rownames(dse)[1:10], xs = "group")
#> No genes were mapped to rowData. check ann parameter values.
#> Using gene as id variables
degPlot(dse, genes = rownames(dse)[1:10], xs = "group", color = "orange")
#> No genes were mapped to rowData. check ann parameter values.
#> Using gene as id variables
degPlot(dse, genes = rownames(dse)[1:10], xs = "group", group = "group", +#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
degPlot(dse, genes = rownames(dse)[1:10], xs = "group")
#> No genes were mapped to rowData. check ann parameter values.
#> Using gene as id variables
degPlot(dse, genes = rownames(dse)[1:10], xs = "group", color = "orange")
#> No genes were mapped to rowData. check ann parameter values.
#> Using gene as id variables
degPlot(dse, genes = rownames(dse)[1:10], xs = "group", group = "group", color = "Accent")
#> No genes were mapped to rowData. check ann parameter values.
#> Using gene as id variables
+ + + diff --git a/docs/reference/degPlotCluster-1.png b/docs/reference/degPlotCluster-1.png index 6eec066..ad87e0f 100644 Binary files a/docs/reference/degPlotCluster-1.png and b/docs/reference/degPlotCluster-1.png differ diff --git a/docs/reference/degPlotCluster-2.png b/docs/reference/degPlotCluster-2.png index 069e3ba..1aa132a 100644 Binary files a/docs/reference/degPlotCluster-2.png and b/docs/reference/degPlotCluster-2.png differ diff --git a/docs/reference/degPlotCluster-3.png b/docs/reference/degPlotCluster-3.png index 2875f92..145c14c 100644 Binary files a/docs/reference/degPlotCluster-3.png and b/docs/reference/degPlotCluster-3.png differ diff --git a/docs/reference/degPlotCluster.html b/docs/reference/degPlotCluster.html index 765f7cc..4d443b0 100644 --- a/docs/reference/degPlotCluster.html +++ b/docs/reference/degPlotCluster.html @@ -8,21 +8,25 @@ Plot clusters from degPattern function output — degPlotCluster • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,17 +111,15 @@

Plot clusters from degPattern function output

-

This function helps to format the cluster plots from degPatterns(). It allows to control the layers and it returns a ggplot object that can accept more ggplot functions to allow customization.

-
-
degPlotCluster(table, time, color = NULL, process = FALSE,
-  points = TRUE, boxes = TRUE, smooth = TRUE, lines = TRUE,
-  facet = TRUE, cluster_column = "cluster")
- +
degPlotCluster(table, time, color = NULL, min_genes = 10,
+  process = FALSE, points = TRUE, boxes = TRUE, smooth = TRUE,
+  lines = TRUE, facet = TRUE, cluster_column = "cluster")
+

Arguments

@@ -165,80 +169,61 @@

Arg cutoffs used when grouping genes from the clustering step.

- +

Value

ggplot2 object.

-

Examples

-
data(humanGender) -library(SummarizedExperiment) -library(ggplot2) -ma <- assays(humanGender)[[1]][1:100,] -des <- colData(humanGender) -des[["other"]] <- sample(c("a", "b"), 85, replace = TRUE) -res <- degPatterns(ma, des, time="group", col = "other", plot = FALSE)
#> Working with 100 genes.
#> Working with 83 genes after filtering: minc > 15
#> Joining, by = "merge"
#> Joining, by = "merge"
degPlotCluster(res$normalized, "group", "other")
degPlotCluster(res$normalized, "group", "other", lines = FALSE)
-library(dplyr)
#> -#> Attaching package: ‘dplyr’
#> The following object is masked from ‘package:matrixStats’: -#> -#> count
#> The following object is masked from ‘package:Biobase’: -#> -#> combine
#> The following objects are masked from ‘package:GenomicRanges’: -#> -#> intersect, setdiff, union
#> The following object is masked from ‘package:GenomeInfoDb’: -#> -#> intersect
#> The following objects are masked from ‘package:IRanges’: -#> -#> collapse, desc, intersect, setdiff, slice, union
#> The following objects are masked from ‘package:S4Vectors’: -#> -#> first, intersect, rename, setdiff, setequal, union
#> The following objects are masked from ‘package:BiocGenerics’: -#> -#> combine, intersect, setdiff, union
#> The following object is masked from ‘package:testthat’: -#> -#> matches
#> The following objects are masked from ‘package:stats’: -#> -#> filter, lag
#> The following objects are masked from ‘package:base’: -#> -#> intersect, setdiff, setequal, union
library(tidyr)
#> +
data(humanGender) +library(SummarizedExperiment) +library(ggplot2) +ma <- assays(humanGender)[[1]][1:100,] +des <- colData(humanGender) +des[["other"]] <- sample(c("a", "b"), 85, replace = TRUE) +res <- degPatterns(ma, des, time="group", col = "other", plot = FALSE)
#> Working with 100 genes.
#> Working with 71 genes after filtering: minc > 15
#> Joining, by = "merge"
#> Joining, by = "merge"
degPlotCluster(res$normalized, "group", "other")
degPlotCluster(res$normalized, "group", "other", lines = FALSE)
+library(dplyr) +library(tidyr)
#> #> Attaching package: ‘tidyr’
#> The following object is masked from ‘package:S4Vectors’: #> -#> expand
library(tibble) -table <- rownames_to_column(as.data.frame(ma), "genes") %>% +#> expand
library(tibble) +table <- rownames_to_column(as.data.frame(ma), "genes") %>% gather("sample", "expression", -genes) %>% - right_join(distinct(res$df[,c("genes", "cluster")]), + right_join(distinct(res$df[,c("genes", "cluster")]), by = "genes") %>% - left_join(rownames_to_column(as.data.frame(des), "sample"), + left_join(rownames_to_column(as.data.frame(des), "sample"), by = "sample") %>% - as.data.frame() + as.data.frame() degPlotCluster(table, "group", "other", process = TRUE)
+ + + diff --git a/docs/reference/degPlotWide-1.png b/docs/reference/degPlotWide-1.png index fe40338..a8872e4 100644 Binary files a/docs/reference/degPlotWide-1.png and b/docs/reference/degPlotWide-1.png differ diff --git a/docs/reference/degPlotWide.html b/docs/reference/degPlotWide.html index eb4f188..362247e 100644 --- a/docs/reference/degPlotWide.html +++ b/docs/reference/degPlotWide.html @@ -8,21 +8,25 @@ Plot selected genes on a wide format — degPlotWide • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,19 +109,17 @@

Plot selected genes on a wide format

-

Plot selected genes on a wide format

-
degPlotWide(counts, genes, group, metadata = NULL, batch = NULL)
- +

Arguments

- + @@ -129,7 +133,7 @@

Arg

+DESeq2::DESeqDataSet given as counts.

@@ -137,49 +141,50 @@

Arg batch effect visualization

counts

DESeq2::DESeqDataSet object or expression matrix

DESeq2::DESeqDataSet object or expression matrix

genes
metadata

data.frame, information for each sample. Not needed if -DESeq2::DESeqDataSet given as counts.

batch
- +

Value

ggplot showing the expresison of the genes on the x axis

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][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
#> -- replacing outliers and refitting for 1 genes +dse <- DESeq(dse)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
degPlotWide(dse, rownames(dse)[1:10], group = "group")
+#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
degPlotWide(dse, rownames(dse)[1:10], group = "group")
+ + + diff --git a/docs/reference/degQC-1.png b/docs/reference/degQC-1.png index d0f5106..dc8794c 100644 Binary files a/docs/reference/degQC-1.png and b/docs/reference/degQC-1.png differ diff --git a/docs/reference/degQC.html b/docs/reference/degQC.html index a18ba26..b87f7dc 100644 --- a/docs/reference/degQC.html +++ b/docs/reference/degQC.html @@ -8,21 +8,25 @@ Plot main figures showing p-values distribution and mean-variance correlation — degQC • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,15 +111,13 @@

Plot main figures showing p-values distribution and mean-variance correlatio

-

This function joins the output of degMean, degVar and degMV in a single plot. See these functions for further information.

-
degQC(counts, groups, object = NULL, pvalue = NULL)
- +

Arguments

@@ -135,50 +139,51 @@

Arg

pvalues of DEG analysis.

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes +dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) -degQC(counts(dds, normalized=TRUE), colData(dds)[["group"]], +#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) +degQC(counts(dds, normalized=TRUE), colData(dds)[["group"]], pvalue = res[["pvalue"]])
+ + + diff --git a/docs/reference/degResults-2.png b/docs/reference/degResults-2.png index 4ff8103..f39a693 100644 Binary files a/docs/reference/degResults-2.png and b/docs/reference/degResults-2.png differ diff --git a/docs/reference/degResults-3.png b/docs/reference/degResults-3.png index 6bd7d2e..062bbd5 100644 Binary files a/docs/reference/degResults-3.png and b/docs/reference/degResults-3.png differ diff --git a/docs/reference/degResults.html b/docs/reference/degResults.html index 59d93bd..a3ac417 100644 --- a/docs/reference/degResults.html +++ b/docs/reference/degResults.html @@ -8,21 +8,25 @@ Complete report from DESeq2 analysis — degResults • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,29 +109,27 @@

Complete report from DESeq2 analysis

-

Complete report from DESeq2 analysis

-
degResults(res = NULL, dds, rlogMat = NULL, name, org = NULL,
   FDR = 0.05, do_go = FALSE, FC = 0.1, group = "condition",
   xs = "time", path_results = ".", contrast = NULL)
- +

Arguments

- + - + - + @@ -169,25 +173,24 @@

Arg fold change values from different comparisons to add to the output table.

res

output from DESeq2::results() function.

output from DESeq2::results() function.

dds

DESeq2::DESeqDataSet() object.

DESeq2::DESeqDataSet() object.

rlogMat

matrix from DESeq2::rlog() function.

matrix from DESeq2::rlog() function.

name
- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dse <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][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
#> -- replacing outliers and refitting for 1 genes +dse <- DESeq(dse)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 #> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- degResults(dds = dse, name = "test", org = NULL, do_go = FALSE, group = "group", xs = "group", path_results = NULL)
#> Doing rlog...
#> Getting result...
#> ## Comparison: test {.tabset} #> #> -#> <br>out of 1000 with nonzero total read count<br>adjusted p-value < 0.1<br>LFC > 0 (up) : 6, 0.6%<br>LFC < 0 (down) : 7, 0.7%<br>outliers [1] : 0, 0%<br>low counts [2] : 0, 0%<br>(mean count < 47)<br>[1] see 'cooksCutoff' argument of ?results<br>[2] see 'independentFiltering' argument of ?results<br><br>NULL +#> [1] "DESeqResults object of length 6 with 2 metadata columns"<br>[2] NA <br>[3] NA <br>[4] NA <br>[5] NA <br>[6] NA <br>[7] NA <br>[8] NA #> #> #> Differential expression file at: test_de.csv @@ -242,28 +245,30 @@

Examp

Contents

+ + + diff --git a/docs/reference/degSignature-1.png b/docs/reference/degSignature-1.png index 5f51bbf..338cc1e 100644 Binary files a/docs/reference/degSignature-1.png and b/docs/reference/degSignature-1.png differ diff --git a/docs/reference/degSignature.html b/docs/reference/degSignature.html index cdacdd7..6f6d7bb 100644 --- a/docs/reference/degSignature.html +++ b/docs/reference/degSignature.html @@ -8,21 +8,25 @@ Plot gene signature for each group and signature — degSignature • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,15 +110,13 @@

Plot gene signature for each group and signature

-

Given a list of genes beloging to a different classes, like markers, plot for each group, the expression values for all the samples.

-
degSignature(counts, signature, group = NULL, metadata = NULL,
-  slot = 1)
- + slot = 1, scale = FALSE)
+

Arguments

@@ -143,44 +147,49 @@

Arg

+ + + +
slot

slotName in the case of SummarizedExperiment objects.

scale

Whether to scale or not the expression.

- +

Value

ggplot plot.

-

Examples

-
data(humanGender) -data(geneInfo) +
data(humanGender) +data(geneInfo) degSignature(humanGender, geneInfo, group = "group")
#> Using id as id variables
+ + + diff --git a/docs/reference/degSummary.html b/docs/reference/degSummary.html index 5f86f18..0f8be71 100644 --- a/docs/reference/degSummary.html +++ b/docs/reference/degSummary.html @@ -8,21 +8,25 @@ Print Summary Statistics of Alpha Level Cutoffs — degSummary • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,14 +109,12 @@

Print Summary Statistics of Alpha Level Cutoffs

-

Print Summary Statistics of Alpha Level Cutoffs

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

Arguments

@@ -132,32 +136,32 @@

Arg

- +
kable

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

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

- +

Value

-

data.frame or knitr::kable().

- +

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) +
    library(DESeq2) +data(humanGender) +idx <- c(1:5, 75:80) counts <- assays(humanGender)[[1]] -dse <- DESeqDataSetFromMatrix(counts[1:1000, idx], +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). +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. @@ -208,11 +212,8 @@

    Examp

    Contents

    @@ -221,19 +222,23 @@

    Author

    + + + diff --git a/docs/reference/degVB-1.png b/docs/reference/degVB-1.png index 020eedc..49e211f 100644 Binary files a/docs/reference/degVB-1.png and b/docs/reference/degVB-1.png differ diff --git a/docs/reference/degVB.html b/docs/reference/degVB.html index 06bf0fd..37ca61b 100644 --- a/docs/reference/degVB.html +++ b/docs/reference/degVB.html @@ -9,21 +9,25 @@ Distribution of the standard desviation of DE genes compared to the background — degVB • DEGreport + - + + - + + - - + + + @@ -31,15 +35,16 @@ + - + @@ -50,6 +55,7 @@ + @@ -66,7 +72,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -85,7 +91,6 @@ Reference
- @@ -95,6 +100,7 @@ +
@@ -107,14 +113,12 @@

Distribution of the standard desviation of

-

Distribution of the standard desviation of DE genes compared to the background

-
degVB(tags, group, counts, pop = 400)
- +

Arguments

@@ -137,50 +141,51 @@

Arg

Number of random samples taken for background comparison.

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes +dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) -degVB(row.names(res)[1:20], colData(dds)[["group"]], - counts(dds, normalized = TRUE))
+#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) +degVB(row.names(res)[1:20], colData(dds)[["group"]], + counts(dds, normalized = TRUE))
+ + + diff --git a/docs/reference/degVar-1.png b/docs/reference/degVar-1.png index 0e88900..d22df89 100644 Binary files a/docs/reference/degVar-1.png and b/docs/reference/degVar-1.png differ diff --git a/docs/reference/degVar.html b/docs/reference/degVar.html index b74042e..901b238 100644 --- a/docs/reference/degVar.html +++ b/docs/reference/degVar.html @@ -8,21 +8,25 @@ Distribution of pvalues by standard desviation range — degVar • DEGreport + - + + - + + - - + + + @@ -30,14 +34,15 @@ - + + @@ -48,6 +53,7 @@ + @@ -64,7 +70,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -83,7 +89,6 @@ Reference - @@ -93,6 +98,7 @@ +
@@ -104,14 +110,12 @@

Distribution of pvalues by standard desviation range

-

This function pot the p-valyes distribution colored by the quantiles of the standard desviation of count data.

-
degVar(pvalues, counts)
- +

Arguments

@@ -125,49 +129,50 @@

Arg row number should be the same length than pvalues vector.

- +

Value

ggplot2 object

-

Examples

-
data(humanGender) -library(DESeq2) -idx <- c(1:10, 75:85) -dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], +
data(humanGender) +library(DESeq2) +idx <- c(1:10, 75:85) +dds <- DESeqDataSetFromMatrix(assays(humanGender)[[1]][1:1000, idx], colData(humanGender)[idx,], design=~group) -dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes +dds <- DESeq(dds)
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes #> -- DESeq argument 'minReplicatesForReplace' = 7 -#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) -degVar(res[, 4], counts(dds))
+#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
res <- results(dds) +degVar(res[, 4], counts(dds))
+ + + diff --git a/docs/reference/degVolcano-1.png b/docs/reference/degVolcano-1.png index 1d40087..992a6b9 100644 Binary files a/docs/reference/degVolcano-1.png and b/docs/reference/degVolcano-1.png differ diff --git a/docs/reference/degVolcano.html b/docs/reference/degVolcano.html index 4e71971..8987f4d 100644 --- a/docs/reference/degVolcano.html +++ b/docs/reference/degVolcano.html @@ -8,21 +8,25 @@ Create volcano plot from log2FC and adjusted pvalues data frame — degVolcano • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,9 +109,7 @@

Create volcano plot from log2FC and adjusted pvalues data frame

-

Create volcano plot from log2FC and adjusted pvalues data frame

-
degVolcano(stats, side = "both",
@@ -114,7 +118,7 @@ 

Create volcano plot from log2FC and adjusted pvalues data frame

shade.alpha = 0.25, point.colour = "gray", point.alpha = 0.75, point.outline.colour = "darkgray", line.colour = "gray", plot_text = NULL)
- +

Arguments

@@ -167,34 +171,29 @@

Arg

data.frame with three columns: logFC, Pvalue, Gene name

- +

Value

The function will plot volcano plot together with density of the fold change and p-values on the top and the right side of the volcano plot.

-

Details

This function was mainly developed by @jnhutchinson.

-

Examples

-
library(DESeq2) -dds <- makeExampleDESeqDataSet(betaSD = 1) -dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
stats <- results(dds)[,c("log2FoldChange", "padj")] -stats[["name"]] <- row.names(stats) -degVolcano(stats, plot_text = stats[1:10,])
+
library(DESeq2) +dds <- makeExampleDESeqDataSet(betaSD = 1) +dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
stats <- results(dds)[,c("log2FoldChange", "padj")] +stats[["name"]] <- row.names(stats) +degVolcano(stats, plot_text = stats[1:10,])
#> Warning: Removed 1 rows containing missing values (geom_text_repel).
+ + + diff --git a/docs/reference/geneInfo.html b/docs/reference/geneInfo.html index e6508e8..53b9ae1 100644 --- a/docs/reference/geneInfo.html +++ b/docs/reference/geneInfo.html @@ -8,21 +8,25 @@ data.frame with chromose information for each gene — geneInfo • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,50 +109,49 @@

data.frame with chromose information for each gene

-

data.frame with chromose information for each gene

-
geneInfo
- + +

Format

data.frame

-

Source

biomart

- + + + diff --git a/docs/reference/geom_cor-1.png b/docs/reference/geom_cor-1.png index 8746bb8..2b89d99 100644 Binary files a/docs/reference/geom_cor-1.png and b/docs/reference/geom_cor-1.png differ diff --git a/docs/reference/geom_cor.html b/docs/reference/geom_cor.html index df839be..7a1c240 100644 --- a/docs/reference/geom_cor.html +++ b/docs/reference/geom_cor.html @@ -8,21 +8,25 @@ Add correlation and p-value to a ggplot2 plot — geom_cor • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,16 +111,14 @@

Add correlation and p-value to a ggplot2 plot

-

geom_cor will add the correlatin, method and p-value to the plot automatically guessing the position if nothing else specidfied. family font, size and colour can be used to change the format.

-
geom_cor(mapping = NULL, data = NULL, method = "spearman",
   xpos = NULL, ypos = NULL, inherit.aes = TRUE, ...)
- +

Arguments

@@ -141,7 +145,7 @@

Arg

+passed to cor.test(). (Spearman, Pearson, Kendall).

@@ -166,22 +170,20 @@

Arg to the paired geom/stat.

method

Method to calculate the correlation. Values are -passed to cor.test(). (Spearman, Pearson, Kendall).

xpos
- +

Details

It was integrated after reading this tutorial to extend ggplot2 layers

-

See also

-

Examples

-
data(humanGender) -library(SummarizedExperiment) -library(ggplot2) -ggplot(as.data.frame(assay(humanGender)[1:1000,]), +
data(humanGender) +library(SummarizedExperiment) +library(ggplot2) +ggplot(as.data.frame(assay(humanGender)[1:1000,]), aes(x = NA20502, y = NA20504)) + geom_point() + ylim(0,1.1e5) + @@ -191,30 +193,31 @@

Examp

Contents

+ + + diff --git a/docs/reference/humanGender.html b/docs/reference/humanGender.html index d22ffb4..3c33e84 100644 --- a/docs/reference/humanGender.html +++ b/docs/reference/humanGender.html @@ -8,21 +8,25 @@ DGEList object for DE genes betwen Male and Females — humanGender • DEGreport + - + + - + + - - + + + @@ -30,13 +34,14 @@ - + + @@ -47,6 +52,7 @@ + @@ -63,7 +69,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -82,7 +88,6 @@ Reference - @@ -92,6 +97,7 @@ +
@@ -103,50 +109,49 @@

DGEList object for DE genes betwen Male and Females

-

DGEList object for DE genes betwen Male and Females

-
humanGender
- + +

Format

DGEList

-

Source

gEUvadis

- + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 9e9d16f..bbddda0 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -8,21 +8,25 @@ Function reference • DEGreport + - + + - + + - - + + + @@ -30,10 +34,12 @@ + + @@ -44,6 +50,7 @@ + @@ -60,7 +67,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -79,7 +86,6 @@ Reference - @@ -89,6 +95,7 @@ +
@@ -170,7 +177,7 @@

degDefault()

+

degDefault() degCorrect()

Method to get the default table to use.

@@ -333,19 +340,23 @@

Contents

+ + + diff --git a/docs/reference/significants.html b/docs/reference/significants.html index 0faa7d3..78cba19 100644 --- a/docs/reference/significants.html +++ b/docs/reference/significants.html @@ -8,21 +8,25 @@ Method to get the significant genes — significants • DEGreport + - + + - + + - - + + + @@ -30,8 +34,8 @@ - + @@ -39,6 +43,7 @@ + @@ -49,6 +54,7 @@ + @@ -65,7 +71,7 @@ DEGreport - 1.21.1 + 1.21.2 @@ -84,7 +90,6 @@ Reference - @@ -94,6 +99,7 @@ +
@@ -105,14 +111,13 @@

Method to get the significant genes

-

Function to get the features that are significant according to some thresholds from a DEGSet, -DESeq2::DESeqResults and edgeR::topTags.

- +DESeq2::DESeqResults and edgeR::topTags.

-
significants(object, ...)
+    
significants(object, padj = 0.05, fc = 0, direction = NULL,
+  full = FALSE, ...)
 
 # S4 method for DEGSet
 significants(object, padj = 0.05, fc = 0,
@@ -129,7 +134,7 @@ 

Method to get the significant genes

# S4 method for list significants(object, padj = 0.05, fc = 0, direction = NULL, full = FALSE, newFDR = FALSE, ...)
- +

Arguments

@@ -137,11 +142,6 @@

Arg

- - - - @@ -159,6 +159,11 @@

Arg

+ + + +
object

DEGSet

...

Passed to deg. Default: value = NULL. -Value can be 'raw', 'shrunken'.

padj

Cutoff for the FDR column.

full

Whether to return full table or not.

...

Passed to deg. Default: value = NULL. +Value can be 'raw', 'shrunken'.

newFDR

Whether to recalculate the FDR or not. @@ -166,7 +171,7 @@

Arg Only used when a list is giving to the method.

- +

Value

a dplyr::tbl_df data frame. gene column has the feature name. @@ -175,16 +180,15 @@

Value

padj has the padj associated to the previous column. Then, there is two columns for each comparison, one for the log2FoldChange and another for the padj.

-

Examples

-
library(DESeq2) -library(dplyr) -dds <- makeExampleDESeqDataSet(betaSD=1) +
library(DESeq2) +library(dplyr) +dds <- makeExampleDESeqDataSet(betaSD=1) colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12) - design(dds) <- ~ condition + treatment -dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, contrast = list("treatment_B_vs_A", - c("condition", "A", "B")))
#> Doing 2 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). + design(dds) <- ~ condition + treatment +dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
res <- degComps(dds, contrast = list("treatment_B_vs_A", + c("condition", "A", "B")))
#> Doing 2 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. @@ -193,32 +197,29 @@

Examp #> 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

significants(res, full = TRUE) %>% head
#> # A tibble: 6 x 5 -#> gene log2FoldChange padj log2FoldChange_condition_… padj_condition_A_v… -#> <chr> <dbl> <dbl> <dbl> <dbl> -#> 1 gene100 1.48 4.11e-3 1.48 0.00411 -#> 2 gene102 -1.80 1.98e-5 -1.80 0.0000198 -#> 3 gene110 1.20 3.39e-2 1.20 0.0339 -#> 4 gene112 1.94 5.60e-4 1.94 0.000560 -#> 5 gene119 0.996 5.81e-3 0.996 0.00581 -#> 6 gene122 2.05 1.55e-2 2.05 0.0155
significants(res, full = TRUE, padj = 1) %>% head # all genes
#> # A tibble: 6 x 7 -#> gene log2FoldChange padj log2FoldChange_… log2FoldChange_… -#> <chr> <dbl> <dbl> <dbl> <dbl> -#> 1 gene1 0.951 0.198 0.951 0.0474 -#> 2 gene… 0.651 0.274 0.651 -0.285 -#> 3 gene… 1.48 0.00411 1.48 0.285 -#> 4 gene… 0.761 0.0751 0.761 0.0274 -#> 5 gene… 0.263 0.985 -1.09 0.263 -#> 6 gene… -0.0654 0.997 -1.80 -0.0654 -#> # … with 2 more variables: padj_condition_A_vs_B <dbl>, -#> # padj_treatment_B_vs_A <dbl>
+#> gene log2FoldChange padj log2FoldChange_condition… padj_condition_A_v… +#> <chr> <dbl> <dbl> <dbl> <dbl> +#> 1 gene102 0.942 3.93e-2 0.942 0.0393 +#> 2 gene108 -0.953 2.99e-2 -0.953 0.0299 +#> 3 gene116 -1.31 2.59e-3 -1.31 0.00259 +#> 4 gene119 -2.03 1.18e-6 -2.03 0.00000118 +#> 5 gene120 1.74 1.33e-5 1.74 0.0000133 +#> 6 gene122 1.09 3.22e-2 1.09 0.0322
significants(res, full = TRUE, padj = 1) %>% head # all genes
#> # A tibble: 6 x 7 +#> gene log2FoldChange padj log2FoldChange_… log2FoldChange_… padj_condition_… +#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 gene1 -0.113 0.952 -0.788 -0.113 0.388 +#> 2 gene… 1.62 0.0931 1.62 -0.0855 0.0931 +#> 3 gene… -0.310 0.479 -0.310 -0.339 0.479 +#> 4 gene… 0.645 0.448 0.645 -0.528 0.448 +#> 5 gene… 0.0479 0.914 0.0479 -0.550 0.914 +#> 6 gene… 0.942 0.0393 0.942 -0.258 0.0393 +#> # … with 1 more variable: padj_treatment_B_vs_A <dbl>
+ + + diff --git a/man/degPlotCluster.Rd b/man/degPlotCluster.Rd index b5c2f0d..9cb71c1 100644 --- a/man/degPlotCluster.Rd +++ b/man/degPlotCluster.Rd @@ -4,9 +4,9 @@ \alias{degPlotCluster} \title{Plot clusters from degPattern function output} \usage{ -degPlotCluster(table, time, color = NULL, process = FALSE, - points = TRUE, boxes = TRUE, smooth = TRUE, lines = TRUE, - facet = TRUE, cluster_column = "cluster") +degPlotCluster(table, time, color = NULL, min_genes = 10, + process = FALSE, points = TRUE, boxes = TRUE, smooth = TRUE, + lines = TRUE, facet = TRUE, cluster_column = "cluster") } \arguments{ \item{table}{\code{normalized} element from \code{\link[=degPatterns]{degPatterns()}} output. diff --git a/man/degSignature.Rd b/man/degSignature.Rd index d83abdc..20fb761 100644 --- a/man/degSignature.Rd +++ b/man/degSignature.Rd @@ -5,7 +5,7 @@ \title{Plot gene signature for each group and signature} \usage{ degSignature(counts, signature, group = NULL, metadata = NULL, - slot = 1) + slot = 1, scale = FALSE) } \arguments{ \item{counts}{expression data. It accepts bcbioRNASeq, DESeqDataSet and @@ -24,6 +24,8 @@ should match \code{ma} column names row number should be the same length than p-values vector.} \item{slot}{slotName in the case of SummarizedExperiment objects.} + +\item{scale}{Whether to scale or not the expression.} } \value{ ggplot plot.