Skip to content
Merged

Dev #43

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ed2d631
feat: add plot_GSEA.R and remove old barplot_GSEA.R
DanielGarbozo Aug 4, 2025
a174cb9
chore: fix globalVariables and Roxygen block for GSEA functions
DanielGarbozo Aug 4, 2025
dc3d2c2
Merge branch 'BigMindLab:dev' into dev
DanielGarbozo Sep 15, 2025
efd055a
Merge pull request #31 from DanielGarbozo/dev
danoguevara Sep 15, 2025
ecad8fd
Replace names of GSEA functions
DanielGarbozo Sep 15, 2025
fffc557
Merge pull request #34 from DanielGarbozo/dev
danoguevara Sep 16, 2025
4b35757
add: PA clustering functions
DanielGarbozo Mar 19, 2026
bd87d50
Add 'dev' branch to pull request triggers
DanielGarbozo Mar 21, 2026
313b29e
Update pathway_analysis_clustering.R
DanielGarbozo Mar 21, 2026
06484a2
Update pathway_analysis_clustering_v2.R
DanielGarbozo Mar 21, 2026
833cee2
Update pathway_analysis_clustering.Rmd
DanielGarbozo Mar 21, 2026
74015f1
Merge pull request #38 from DanielGarbozo/feature/pa_clustering
DanielGarbozo Mar 21, 2026
a6f1955
feat: add DEA example datasets and @examples to functions - Add TCGA-…
DanielGarbozo Mar 21, 2026
c72dee2
feat: add nice_VSB_DESeq2 function and fix DESeq2 dependendy
DanielGarbozo Mar 21, 2026
6201120
fix: add knitr and rmarkdown to Suggests in DESCRIPTION
DanielGarbozo Mar 21, 2026
f13e55c
fix: rmarkdown to Suggests in DESCRIPTION
DanielGarbozo Mar 21, 2026
3f47eb3
Merge pull request #39 from DanielGarbozo/feature/DEA-functions
DanielGarbozo Mar 21, 2026
577d4ff
docs: add DEA workflow vignette with pre-rendered figures
DanielGarbozo Mar 21, 2026
f7f1016
fix: return plot object from power_analysis and simplify prerender sc…
DanielGarbozo Mar 21, 2026
3d81ffe
fix: remove ^vignettes$ from .Rbuildignore
DanielGarbozo Mar 21, 2026
1b282bf
docs: add @return, @seealso, @references and @note to DEA functions
DanielGarbozo Mar 22, 2026
9036f4e
fix: update save_results file naming convention
DanielGarbozo Mar 22, 2026
da372e5
fix: correct bugs
DanielGarbozo Mar 22, 2026
99b5100
Merge pull request #40 from DanielGarbozo/feature/DEA-functions
DanielGarbozo Mar 22, 2026
ad9be89
feat: add PA visualization and gene annotation functions
DanielGarbozo Mar 23, 2026
eaaaa28
feat: add PA gene annotation functions and example dataset
DanielGarbozo Mar 23, 2026
47624cc
add: prerender_figures_PA.R
DanielGarbozo Mar 23, 2026
9cb1ac9
Add pathway analysis workflow vignette
DanielGarbozo Mar 23, 2026
62bf294
docs: add PA_workflow vignette
DanielGarbozo Mar 23, 2026
c1574e6
fix: format PA_workflow.Rmd
DanielGarbozo Mar 23, 2026
7edb270
refactor: rename calc_jaccard to geneset_similarity and PA clustering…
DanielGarbozo Mar 23, 2026
688406e
Add: _pkgdown.yml with full site configuration
DanielGarbozo Mar 23, 2026
bed8217
Merge pull request #41 from DanielGarbozo/feature/pa-functions
DanielGarbozo Mar 23, 2026
fb4ff20
docs: configure pkgdown site and fix reference index
DanielGarbozo Mar 23, 2026
c8d6966
Merge pull request #42 from DanielGarbozo/feature/pa_clustering
DanielGarbozo Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
^LICENSE\.md$
^\.github$
^data-raw$
^vignettes/prerender_figures\.R$
^_pkgdown\.yml$
^docs$
^pkgdown$
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
branches: [main, master, dev]

name: R-CMD-check.yaml

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ rsconnect/
.Rdata
.DS_Store
.quarto
inst/doc
docs
21 changes: 18 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ Authors@R: c(
Description: This package contains functions that help in manipulating tables and generating plots for multi-omics analysis including genomics, transcriptomics, proteomics, methylomics and immunoinformatics.
License: CC BY-NC-SA 4.0
Encoding: UTF-8
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Imports:
dplyr,
ggplot2,
tsne,
cowplot,
graphics,
magrittr,
rlang,
stats,
Expand All @@ -32,20 +34,33 @@ Imports:
patchwork
Suggests:
biomaRt,
cowplot,
circlize,
cluster,
ComplexHeatmap,
dbscan,
knitr,
rmarkdown,
DESeq2,
ggnewscale,
ggraph,
ggrepel,
igraph,
grDevices,
matrixStats,
openxlsx,
pheatmap,
readr,
survival,
survminer,
tidygraph,
tidyr,
tidyselect
tidyselect,
tm
Roxygen: list(markdown = TRUE)
Depends:
R (>= 3.5)
LazyData: true
LazyDataCompression: xz
VignetteBuilder: knitr
URL: https://bigmindlab.github.io/OmicsKit

20 changes: 16 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
# Generated by roxygen2: do not edit by hand

export(add_annotations)
export(barplot_GSEA)
export(addgenesPA)
export(detect_filter)
export(do_clust)
export(geneset_similarity)
export(get_annotations)
export(get_network_communities)
export(get_stars)
export(heatmap_GSEA)
export(merge_GSEA)
export(get_superterm)
export(getgenesPA)
export(heatmap_PA)
export(heatmap_path_PA)
export(list_gmts)
export(merge_PA)
export(multiplot_PA)
export(network_clust)
export(network_clust_gg)
export(nice_KM)
export(nice_PCA)
export(nice_UMAP)
export(nice_VSB)
export(nice_VSB_DEseq2)
export(nice_Volcano)
export(nice_tSNE)
export(plot_GSEA)
export(power_analysis)
export(save_results)
export(split_cases)
export(splot_PA)
export(tpm)
import(ggplot2)
importFrom(magrittr,"%>%")
importFrom(patchwork,plot_layout)
importFrom(rlang,.data)
importFrom(utils,modifyList)
36 changes: 36 additions & 0 deletions R/add_annotations.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,42 @@
#' @param reference A reference table with the annotations including a column named "geneID".
#' @param variables Character vector of columns in `reference` to add. If NULL (default), all columns except geneID are used.
#' @param data_frame Logical; if TRUE, coerce `object` to a data.frame first. Default: FALSE.
#'
#' @return The input `object` as a data frame with additional columns from
#' `reference` joined by Ensembl gene ID. A `geneID` column is added
#' containing the row names of the original object.
#'
#' @examples
#' \dontrun{
#' data(norm_counts)
#'
#' # Requires a reference table with a "geneID" column.
#' # Use get_annotations() to generate it:
#' annotations <- get_annotations(
#' ensembl_ids = rownames(norm_counts),
#' mode = "genes"
#' )
#'
#' # Add gene symbol and biotype columns to the counts matrix
#' norm_counts_annot <- add_annotations(
#' object = norm_counts,
#' reference = annotations,
#' variables = c("symbol", "biotype")
#' )
#'
#' # Inspect result
#' head(norm_counts_annot[, c("geneID", "symbol", "biotype")])
#'
#' # Add all annotation columns (variables = NULL uses everything)
#' norm_counts_full <- add_annotations(
#' object = norm_counts,
#' reference = annotations
#' )
#' }
#'
#' @seealso [get_annotations()] to generate the `reference` table;
#' [norm_counts] for an example input matrix.
#'
#' @export

add_annotations <- function(object, reference, variables = NULL, data_frame = FALSE){
Expand Down
57 changes: 0 additions & 57 deletions R/barplot_GSEA.R

This file was deleted.

71 changes: 71 additions & 0 deletions R/dataclust_PA.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
####################
# Example datasets #
####################

#' Example gene set list for pathway analysis clustering
#'
#' A named list of 40 curated gene sets spanning four biological themes:
#' apoptosis & cell death, cell cycle & DNA damage, immune response &
#' inflammation, and metabolism. Gene set names follow standard database
#' conventions (`KEGG_`, `HALLMARK_`, `GO_`) and gene symbols are real human
#' genes. Designed to be used as input to [geneset_similarity()].
#'
#' @format A named list of 40 elements. Each element is a character vector of
#' human gene symbols (HGNC) belonging to that gene set. Gene set sizes range
#' from 11 to 20 genes.
#'
#' @source Curated manually for OmicsKit examples, based on KEGG, MSigDB
#' Hallmark, and Gene Ontology gene set collections.
#'
#' @examples
#' data(geneset_list)
#'
#' # How many gene sets?
#' length(geneset_list)
#'
#' # Inspect one gene set
#' geneset_list[["KEGG_APOPTOSIS"]]
#'
#' # Use with geneset_similarity()
#' data(camera_results)
#' jac <- geneset_similarity(geneset_list, camera_results, fdr_th = 0.05)
#'
#' @seealso [geneset_similarity()], [camera_results]
"geneset_list"


#' Example CAMERA enrichment results for pathway analysis clustering
#'
#' A data frame simulating the output of a CAMERA differential expression
#' analysis, containing significance values for the 40 gene sets in
#' [geneset_list]. Approximately 60% of gene sets have FDR < 0.05, providing
#' enough significant sets for meaningful clustering. Designed to be used
#' alongside [geneset_list] as input to [geneset_similarity()].
#'
#' @format A data frame with 40 rows and 4 columns:
#' \describe{
#' \item{GeneSet}{Character. Gene set name, matching the names in
#' [geneset_list].}
#' \item{Direction}{Character. Enrichment direction: `"Up"` or `"Down"`.}
#' \item{PValue}{Numeric. Raw p-value from the simulated CAMERA test.}
#' \item{FDR}{Numeric. Benjamini-Hochberg adjusted p-value.}
#' }
#'
#' @source Simulated with `set.seed(1905)` in `data-raw/example_PA.R` for
#' OmicsKit examples.
#'
#' @examples
#' data(camera_results)
#'
#' # Overview
#' head(camera_results)
#'
#' # How many gene sets are significant?
#' sum(camera_results$FDR < 0.05)
#'
#' # Use with geneset_similarity()
#' data(geneset_list)
#' jac <- geneset_similarity(geneset_list, camera_results, fdr_th = 0.05)
#'
#' @seealso [geneset_similarity()], [geneset_list]
"camera_results"
Loading
Loading