This page can be used as a template of how to use the available hermes
functions to take differential gene expression analysis between samples in HermesData
, visualize them in a volcano graph, and create an interactive volcano graph using teal.module.hermes
.
The function used to calculate differential gene expression uses HermesData
as input. See RNAG1 for details. In particular, the differential gene expression analysis does not require to normalize HermesData
.
We can calculate a data frame in HermesDataDiffExpr
class to include the gene differential expression between groups in HermesData
using diff_expression()
function. By default, diff_expression()
function uses the limma-voom
method to calculate the gene differential expression, unless specified otherwise as argument. The group
argument is to set the groups for comparison. The group
factors should be a 2-level factor in colData(HermesData)
.
We can also use the DESeq2
Method for gene differential expression.
It is also possible to pass additional arguments to the function behind the methods in the diff_expression()
, ex. if we wish to change the type of size factor estimation when using the DESeq2
method. See ?DESeq2::DESeq()
or ?limma::eBayes()
for details about the additional parameters available.
We can then plot a volcano graph for differential gene expression between groups in HermesData
using the autoplot()
function. The threshold values for adjusted p-values and log2 folder change can be specified.
Warning: Removed 47 rows containing missing values or values outside the scale range
(`geom_point()`).
We start by importing a MultiAssayExperiment
; here we use the example multi_assay_experiment
available in hermes
. It is wrapped as a teal::dataset
. We can then use the provided teal module tm_g_volcanoplot
to include a volcano graph module in our teal app.
Code
Warning: `datanames<-()` was deprecated in teal.data 0.7.0.
ℹ invalid to use `datanames()<-` or `names()<-` on an object of class
`teal_data`. See ?names.teal_data
Code
[INFO] 2025-02-19 17:29:43.1307 pid:5229 token:[] teal.modules.hermes Initializing tm_g_volcanoplot
Warning: 'experiments' dropped; see 'drops()'
R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] teal.modules.hermes_0.1.6 teal_0.16.0
[3] teal.slice_0.6.0 teal.data_0.7.0
[5] teal.code_0.6.1 shiny_1.10.0
[7] hermes_1.10.0 SummarizedExperiment_1.36.0
[9] Biobase_2.66.0 GenomicRanges_1.58.0
[11] GenomeInfoDb_1.42.3 IRanges_2.40.1
[13] S4Vectors_0.44.0 BiocGenerics_0.52.0
[15] MatrixGenerics_1.18.1 matrixStats_1.5.0
[17] ggfortify_0.4.17 ggplot2_3.5.1
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 jsonlite_1.9.0
[3] shape_1.4.6.1 MultiAssayExperiment_1.32.0
[5] magrittr_2.0.3 farver_2.1.2
[7] rmarkdown_2.29 GlobalOptions_0.1.2
[9] zlibbioc_1.52.0 vctrs_0.6.5
[11] memoise_2.0.1 webshot_0.5.5
[13] BiocBaseUtils_1.9.0 htmltools_0.5.8.1
[15] S4Arrays_1.6.0 forcats_1.0.0
[17] progress_1.2.3 curl_6.2.1
[19] SparseArray_1.6.1 sass_0.4.9
[21] bslib_0.9.0 fontawesome_0.5.3
[23] htmlwidgets_1.6.4 testthat_3.2.3
[25] httr2_1.1.0 cachem_1.1.0
[27] teal.widgets_0.4.3 mime_0.12
[29] lifecycle_1.0.4 iterators_1.0.14
[31] pkgconfig_2.0.3 webshot2_0.1.1
[33] Matrix_1.7-2 R6_2.6.1
[35] fastmap_1.2.0 GenomeInfoDbData_1.2.13
[37] rbibutils_2.3 clue_0.3-66
[39] digest_0.6.37 colorspace_2.1-1
[41] shinycssloaders_1.1.0 ps_1.9.0
[43] AnnotationDbi_1.68.0 DESeq2_1.46.0
[45] crosstalk_1.2.1 RSQLite_2.3.9
[47] filelock_1.0.3 labeling_0.4.3
[49] httr_1.4.7 abind_1.4-8
[51] compiler_4.4.2 bit64_4.6.0-1
[53] withr_3.0.2 doParallel_1.0.17
[55] backports_1.5.0 BiocParallel_1.40.0
[57] DBI_1.2.3 logger_0.4.0
[59] biomaRt_2.62.1 rappdirs_0.3.3
[61] DelayedArray_0.32.0 rjson_0.2.23
[63] tools_4.4.2 chromote_0.4.0
[65] httpuv_1.6.15 glue_1.8.0
[67] callr_3.7.6 promises_1.3.2
[69] grid_4.4.2 checkmate_2.3.2
[71] cluster_2.1.8 generics_0.1.3
[73] gtable_0.3.6 websocket_1.4.2
[75] tidyr_1.3.1 hms_1.1.3
[77] xml2_1.3.6 XVector_0.46.0
[79] ggrepel_0.9.6 foreach_1.5.2
[81] pillar_1.10.1 stringr_1.5.1
[83] limma_3.62.2 later_1.4.1
[85] circlize_0.4.16 dplyr_1.1.4
[87] BiocFileCache_2.14.0 lattice_0.22-6
[89] bit_4.5.0.1 tidyselect_1.2.1
[91] ComplexHeatmap_2.22.0 locfit_1.5-9.11
[93] Biostrings_2.74.1 knitr_1.49
[95] gridExtra_2.3 teal.logger_0.3.2
[97] edgeR_4.4.2 xfun_0.51
[99] statmod_1.5.0 brio_1.1.5
[101] DT_0.33 stringi_1.8.4
[103] UCSC.utils_1.2.0 yaml_2.3.10
[105] shinyWidgets_0.8.7 evaluate_1.0.3
[107] codetools_0.2-20 tibble_3.2.1
[109] cli_3.6.4 xtable_1.8-4
[111] Rdpack_2.6.2 jquerylib_0.1.4
[113] munsell_0.5.1 processx_3.8.5
[115] teal.reporter_0.4.0 Rcpp_1.0.14
[117] dbplyr_2.5.0 png_0.1-8
[119] parallel_4.4.2 assertthat_0.2.1
[121] blob_1.2.4 prettyunits_1.2.0
[123] scales_1.3.0 purrr_1.0.4
[125] crayon_1.5.3 GetoptLong_1.0.5
[127] rlang_1.1.5 formatR_1.14
[129] KEGGREST_1.46.0 shinyjs_2.1.0