Last updated: 2024-01-10

Checks: 6 1

Knit directory: 140_treg_uNK/1_analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(12345) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 7d64f82. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rproj.user/
    Ignored:    2_plots/4_GSEA/

Untracked files:
    Untracked:  .gitignore
    Untracked:  0_data/rawData/multiqc_report.html
    Untracked:  0_data/rds_objects/reducedTerms_all.rds
    Untracked:  0_data/rds_objects/reduced_semSim_df.rds
    Untracked:  0_data/rds_objects/semSim_df.rds
    Untracked:  1_analysis/gsea.Rmd
    Untracked:  1_analysis/ipa.Rmd
    Untracked:  1_analysis/reactome.Rmd
    Untracked:  2_plots/2_DE/heat_DT vs PBS.svg
    Untracked:  2_plots/2_DE/heat_Treg vs DT.svg
    Untracked:  2_plots/2_DE/heat_Treg vs PBS.svg
    Untracked:  2_plots/2_DE/heat_combined.svg
    Untracked:  2_plots/2_DE/hist_DT vs PBS.svg
    Untracked:  2_plots/2_DE/hist_Treg vs DT.svg
    Untracked:  2_plots/2_DE/hist_Treg vs PBS.svg
    Untracked:  2_plots/2_DE/ma_DT vs PBS.png
    Untracked:  2_plots/2_DE/ma_Treg vs DT.png
    Untracked:  2_plots/2_DE/ma_Treg vs PBS.png
    Untracked:  2_plots/2_DE/vol_DT vs PBS.png
    Untracked:  2_plots/2_DE/vol_Treg vs DT.png
    Untracked:  2_plots/2_DE/vol_Treg vs PBS.png
    Untracked:  2_plots/3_FA/
    Untracked:  3_output/reactome_all.xlsx
    Untracked:  3_output/reactome_sig.xlsx

Unstaged changes:
    Modified:   0_data/rds_objects/comp.rds
    Modified:   0_data/rds_objects/enrichGO.rds
    Modified:   0_data/rds_objects/enrichGO_sig.rds
    Modified:   0_data/rds_objects/enrichKEGG.rds
    Modified:   0_data/rds_objects/enrichKEGG_all.rds
    Modified:   0_data/rds_objects/enrichKEGG_sig.rds
    Modified:   0_data/rds_objects/lm_all.rds
    Modified:   0_data/rds_objects/lm_sig.rds
    Modified:   0_data/rds_objects/pathway_details.rds
    Modified:   0_data/rds_objects/reducedTerms_ora.rds
    Modified:   0_data/rds_objects/scores_ora.rds
    Modified:   0_data/rds_objects/simMatrix_ora.rds
    Modified:   1_analysis/deAnalysis.Rmd
    Modified:   1_analysis/go.Rmd
    Modified:   1_analysis/index.Rmd
    Modified:   1_analysis/kegg.Rmd
    Modified:   1_analysis/setUp.Rmd
    Modified:   3_output/GO_sig.xlsx
    Modified:   3_output/de_genes_all.xlsx
    Modified:   3_output/de_genes_sig.xlsx
    Modified:   README.md
    Deleted:    gsea.Rmd
    Deleted:    ipa.Rmd
    Deleted:    reactome.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (1_analysis/go.Rmd) and HTML (docs/go.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 762020e tranmanhha135 2024-01-09 Build site.
Rmd c6d389f tranmanhha135 2024-01-09 workflowr::wflow_publish(here::here("1_analysis/*.Rmd"))
Rmd 05fa0b3 tranmanhha135 2024-01-06 added description

# working with data
library(dplyr)
library(magrittr)
library(readr)
library(tibble)
library(reshape2)
library(tidyverse)

# Visualisation:
library(kableExtra)
library(ggplot2)
library(grid)
library(DT)
library(extrafont)
library(VennDiagram)
# Custom ggplot
library(gridExtra)
library(ggbiplot)
library(ggrepel)
library(rrvgo)
library(d3treeR)
library(plotly)
library(GOSemSim)
library(data.table)

# Bioconductor packages:
library(edgeR)
library(limma)
library(Glimma)
library(clusterProfiler)
library(org.Mm.eg.db)
library(enrichplot)
library(patchwork)

library(pandoc)
library(knitr)
opts_knit$set(progress = FALSE, verbose = FALSE)
opts_chunk$set(warning=FALSE, message=FALSE, echo=FALSE)

Gene ontology (GO) Analysis

Functional enrichment analysis is a method used to identify biological functions or processes overrepresented in a set of genes or proteins.

Gene Ontology (GO) is a standardized system for annotating genes and their products with terms from a controlled vocabulary, organized into three main categories: Molecular Function, Biological Process, and Cellular Component.

  • Biological Process (BP): Describes the larger, coordinated biological events or processes in which a gene product is involved. This category represents a series of molecular events that contribute to a specific function.

  • Molecular Function (MF): Describes the specific molecular activities that a gene product performs, such as catalytic or binding activities.

  • Cellular Component (CC): Describes the location or structure within the cell where a gene product is active, such as the nucleus, cytoplasm, or membrane.

Each of these three main categories is further organized into a hierarchical structure with more specific terms. The terms become more specialized as you move down the hierarchy (ontology level). Comparing a gene list to a reference database offers critical insights into the biological significance of gene expression changes.

Visualisations

The following visualisations are GO enrichment analysis performed with set of DE genes significantly below FDR 0.1 without FC threshold (TREAT). IMPORTANTLY, these GO terms are all significantly enriched (FDR <0.05)

  • Dot plot: illustrates the top 25 enriched GO terms.

    • \(Gene ratio =\) the number of significant DE gene in the term / the total of number of genes in the term. Indicated by the size
    • The shapes represents the three main GO categories, either BP, MP, or CC
  • Table: list of all the significant GO terms

  • Upset: illustrate the overlap of gene between different functional terms

Semantic similarity plots - GO specific

Due to the hierarchical structure of Gene Ontologies, the enriched sets generated often exhibit redundancy and pose challenges in interpretation. The subsequent analyses and visualizations seek to alleviate this redundancy in GO sets by grouping comparable terms based on their semantic similarity. The underlying concept behind measuring semantic similarity is grounded in the idea that genes sharing similar functions should possess analogous annotation vocabulary and exhibit close relationships within the ontology structure.

NOTE: the following semantic similarity analyses are performed using Graph-based method (Wang et al. 2007)

  • Dendrogram plot: performs hierarchical clustering on the semantic similarity of GO terms.

    • NOTE: to maintain readability, only the top 50 most significant GO terms are clustered. These clusters are then divided into 9 clades and labeled using the top 4 high-frequency words.
  • Scatter plot: illustrates the UMAP space between semantically similar significant GO terms

    • Distances represent the similarity between terms,
    • Size represents the significance (in \(-\log_{10}FDR\)))
    • NOTE: to maintain reability, only the top 15 most significant parent terms are labeled. Parent terms are the most significant term in a particular cluster
  • Treemap plot: Visualise the of hierarchical structures of semantically similar GO terms.

    • The terms are colored based on their parent term,
    • The size of the term is proportional to the significance.

I recommend reading through the full list of significant GO terms and selecting the most biologically relevant for better visualisation

DT vs PBS

Dot plot

Version Author Date
762020e tranmanhha135 2024-01-09

Table

Upset plot

Version Author Date
762020e tranmanhha135 2024-01-09

Dendrogram

Version Author Date
762020e tranmanhha135 2024-01-09

Scatter plot

Version Author Date
762020e tranmanhha135 2024-01-09

Interactive scatter

3D Interactive scatter

Parent terms

[[1]]

Version Author Date
762020e tranmanhha135 2024-01-09

Treemap plot

Interactive Tree

Version Author Date
762020e tranmanhha135 2024-01-09

Treg vs PBS

Dot plot

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Table

.pl

Upset plot

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Dendrogram

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Scatter

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Interactive Scatter

.pl

3D scatter

.pl

Parent term

.pl

Treemap

interactive_treemap(reducedTerms[[1]][[i]])

Version Author Date
762020e tranmanhha135 2024-01-09

Treg vs DT

Dot plot

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Table

.pl

Upset plot

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Dendrogram

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Scatter

.pl

Version Author Date
762020e tranmanhha135 2024-01-09

Interactive Scatter

.pl

3D scatter

.pl

Parent term

.pl

Treemap

interactive_treemap(reducedTerms[[1]][[i]])

Version Author Date
762020e tranmanhha135 2024-01-09

Combined

Venn diagram

#### Dot plot

Parent term Venn

NULL
Biological Processes parent terms
Biological Processes parent terms
Molecular Functions parent terms
Molecular Functions parent terms
Cellular Components parent terms
Cellular Components parent terms

Parent term dot

Biological processes parent terms

Biological processes parent terms

Export Data

The following are exported:

  • GO.xlsx - This spreadsheet contains all significantly enriched GO terms. NOTE:

R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

time zone: Australia/Adelaide
tzcode source: system (glibc)

attached base packages:
[1] stats4    grid      stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] htmltools_0.5.7       knitr_1.45            pandoc_0.2.0         
 [4] patchwork_1.1.3       enrichplot_1.20.3     org.Mm.eg.db_3.17.0  
 [7] AnnotationDbi_1.62.2  IRanges_2.34.1        S4Vectors_0.38.2     
[10] Biobase_2.60.0        BiocGenerics_0.46.0   clusterProfiler_4.8.3
[13] Glimma_2.10.0         edgeR_3.42.4          limma_3.56.2         
[16] data.table_1.14.10    GOSemSim_2.26.1       plotly_4.10.3        
[19] d3treeR_0.1           rrvgo_1.12.2          ggrepel_0.9.4        
[22] ggbiplot_0.55         scales_1.3.0          plyr_1.8.9           
[25] gridExtra_2.3         VennDiagram_1.7.3     futile.logger_1.4.3  
[28] extrafont_0.19        DT_0.31               kableExtra_1.3.4     
[31] lubridate_1.9.3       forcats_1.0.0         stringr_1.5.1        
[34] purrr_1.0.2           tidyr_1.3.0           ggplot2_3.4.4        
[37] tidyverse_2.0.0       reshape2_1.4.4        tibble_3.2.1         
[40] readr_2.1.4           magrittr_2.0.3        dplyr_1.1.4          

loaded via a namespace (and not attached):
  [1] splines_4.3.2               later_1.3.2                
  [3] ggplotify_0.1.2             bitops_1.0-7               
  [5] polyclip_1.10-6             XML_3.99-0.16              
  [7] lifecycle_1.0.4             rprojroot_2.0.4            
  [9] MASS_7.3-60                 NLP_0.2-1                  
 [11] lattice_0.22-5              crosstalk_1.2.1            
 [13] sass_0.4.8                  rmarkdown_2.25             
 [15] jquerylib_0.1.4             yaml_2.3.8                 
 [17] httpuv_1.6.13               askpass_1.2.0              
 [19] reticulate_1.34.0           cowplot_1.1.2              
 [21] DBI_1.2.0                   RColorBrewer_1.1-3         
 [23] abind_1.4-5                 zlibbioc_1.46.0            
 [25] rvest_1.0.3                 GenomicRanges_1.52.1       
 [27] ggraph_2.1.0                RCurl_1.98-1.13            
 [29] yulab.utils_0.1.2           rappdirs_0.3.3             
 [31] tweenr_2.0.2                git2r_0.33.0               
 [33] GenomeInfoDbData_1.2.10     data.tree_1.1.0            
 [35] tm_0.7-11                   tidytree_0.4.6             
 [37] pheatmap_1.0.12             umap_0.2.10.0              
 [39] RSpectra_0.16-1             svglite_2.1.3              
 [41] gridSVG_1.7-5               codetools_0.2-19           
 [43] DelayedArray_0.26.7         ggforce_0.4.1              
 [45] DOSE_3.26.2                 xml2_1.3.6                 
 [47] tidyselect_1.2.0            aplot_0.2.2                
 [49] farver_2.1.1                viridis_0.6.4              
 [51] matrixStats_1.2.0           webshot_0.5.5              
 [53] jsonlite_1.8.8              ellipsis_0.3.2             
 [55] tidygraph_1.3.0             systemfonts_1.0.5          
 [57] ggnewscale_0.4.9            tools_4.3.2                
 [59] ragg_1.2.7                  treeio_1.24.3              
 [61] Rcpp_1.0.11                 glue_1.6.2                 
 [63] Rttf2pt1_1.3.12             here_1.0.1                 
 [65] xfun_0.41                   DESeq2_1.40.2              
 [67] qvalue_2.32.0               MatrixGenerics_1.12.3      
 [69] GenomeInfoDb_1.36.4         withr_2.5.2                
 [71] formatR_1.14                fastmap_1.1.1              
 [73] ggh4x_0.2.7                 fansi_1.0.6                
 [75] openssl_2.1.1               digest_0.6.33              
 [77] gridGraphics_0.5-1          timechange_0.2.0           
 [79] R6_2.5.1                    mime_0.12                  
 [81] textshaping_0.3.7           colorspace_2.1-0           
 [83] GO.db_3.17.0                RSQLite_2.3.4              
 [85] utf8_1.2.4                  generics_0.1.3             
 [87] graphlayouts_1.0.2          httr_1.4.7                 
 [89] htmlwidgets_1.6.4           S4Arrays_1.0.6             
 [91] scatterpie_0.2.1            whisker_0.4.1              
 [93] pkgconfig_2.0.3             gtable_0.3.4               
 [95] blob_1.2.4                  workflowr_1.7.1            
 [97] XVector_0.40.0              shadowtext_0.1.2           
 [99] fgsea_1.26.0                ggupset_0.3.0              
[101] png_0.1-8                   wordcloud_2.6              
[103] ggfun_0.1.3                 lambda.r_1.2.4             
[105] rstudioapi_0.15.0           tzdb_0.4.0                 
[107] nlme_3.1-163                cachem_1.0.8               
[109] parallel_4.3.2              HDO.db_0.99.1              
[111] treemap_2.4-4               pillar_1.9.0               
[113] vctrs_0.6.5                 slam_0.1-50                
[115] promises_1.2.1              xtable_1.8-4               
[117] extrafontdb_1.0             evaluate_0.23              
[119] cli_3.6.2                   locfit_1.5-9.8             
[121] compiler_4.3.2              futile.options_1.0.1       
[123] rlang_1.1.2                 crayon_1.5.2               
[125] labeling_0.4.3              fs_1.6.3                   
[127] stringi_1.8.3               viridisLite_0.4.2          
[129] gridBase_0.4-7              BiocParallel_1.34.2        
[131] munsell_0.5.0               Biostrings_2.68.1          
[133] lazyeval_0.2.2              Matrix_1.6-3               
[135] hms_1.1.3                   bit64_4.0.5                
[137] KEGGREST_1.40.1             shiny_1.8.0                
[139] highr_0.10                  SummarizedExperiment_1.30.2
[141] igraph_1.6.0                memoise_2.0.1              
[143] bslib_0.6.1                 ggtree_3.8.2               
[145] fastmatch_1.1-4             bit_4.0.5                  
[147] downloader_0.4              gson_0.1.0                 
[149] ape_5.7-1