Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
28e090d
update description file
NajlaAbassi Apr 7, 2026
18696db
update the main function EMMA_run
NajlaAbassi Apr 7, 2026
2b3ea7f
update the functions EMMA_show, EMMA_freeze and EMMA_explain with pro…
NajlaAbassi Apr 7, 2026
e5ea209
update man
NajlaAbassi Apr 7, 2026
ef2b2d3
update namespace
NajlaAbassi Apr 7, 2026
f500394
add example data
NajlaAbassi Apr 7, 2026
50cb3ed
add helper functions to capture metadata base on the call passed to E…
NajlaAbassi Apr 7, 2026
1c4eef1
setup tests
NajlaAbassi Apr 7, 2026
52cdd99
update vignette
NajlaAbassi Apr 7, 2026
78bb115
add getEMMARecord to fetch the captured info from the attr (in raw st…
NajlaAbassi Apr 7, 2026
ca71983
fix the printing of the call in EMMA_show()
NajlaAbassi Apr 9, 2026
8b03865
add news
NajlaAbassi Apr 9, 2026
a52d979
fix typo in man page
NajlaAbassi Apr 9, 2026
9e54d5d
update description
NajlaAbassi Apr 9, 2026
cf184b0
add returned value by EMMA_show
NajlaAbassi Apr 9, 2026
b85ee3b
adding more tests
NajlaAbassi Apr 9, 2026
1bb2682
add more tests
NajlaAbassi Apr 9, 2026
8eadb42
update vignette to reflect the state/content of the package
NajlaAbassi Apr 9, 2026
5078c9e
update workflow
NajlaAbassi Apr 9, 2026
c74d859
update description with pkg for vignettes and tests
NajlaAbassi Apr 10, 2026
7d1d8ec
initial implementation of EMMA_explain
NajlaAbassi Apr 10, 2026
8644053
update documentation
NajlaAbassi Apr 10, 2026
2fe47a2
remove the dot for all unexported functions
NajlaAbassi Apr 10, 2026
7ed84e5
add more tests
NajlaAbassi Apr 10, 2026
896add0
update vignette
NajlaAbassi Apr 10, 2026
04bc8f5
fixing the odd implementation of EMMA_build_record
NajlaAbassi Apr 17, 2026
77234d2
updating documentation
NajlaAbassi Apr 17, 2026
3e9441f
add code to EMMA_explain
NajlaAbassi Apr 27, 2026
1ad7ee3
update pkg version
NajlaAbassi Apr 27, 2026
9ec20d8
add news
NajlaAbassi Apr 27, 2026
5cf683c
update readme
NajlaAbassi Apr 27, 2026
f8dd505
update EMMA_show
NajlaAbassi Apr 27, 2026
b7ab703
update getEMMARecord
NajlaAbassi Apr 27, 2026
98d2130
add EMMA_add_custom_metadata to give the user possibility to modify t…
NajlaAbassi Apr 27, 2026
136d4d6
update man
NajlaAbassi Apr 27, 2026
0ff0442
update namespace
NajlaAbassi Apr 27, 2026
075eb80
adding tests
NajlaAbassi Apr 27, 2026
3947e09
update vignette
NajlaAbassi Apr 27, 2026
0e1718a
updating EMMA_run to handle wrappers/custom functions
NajlaAbassi Apr 27, 2026
848c99d
typos fixed
federicomarini Apr 30, 2026
c8dd29a
spacing in the examples
federicomarini Apr 30, 2026
ee0455a
suppress all messages in setup of tests
federicomarini Apr 30, 2026
44f92df
update build ignore
NajlaAbassi May 11, 2026
2349b55
update description file
NajlaAbassi May 11, 2026
cc8d933
update man page
NajlaAbassi May 11, 2026
91064d2
expending vignette
NajlaAbassi May 11, 2026
5cfe8f2
adding toy fea created with EMMA_run
NajlaAbassi May 11, 2026
61cf847
beautify msgs with cli
NajlaAbassi May 11, 2026
f57080f
upding the internal functions nomenclature to use the dot before the …
NajlaAbassi May 11, 2026
7812a81
updating tests
NajlaAbassi May 11, 2026
55d9841
remove unused pkg from import
NajlaAbassi May 11, 2026
0cb4185
update pkg version
NajlaAbassi May 11, 2026
b0718a6
update example data
NajlaAbassi May 11, 2026
9b7d274
fix EMMA_show to display the number of pathways/FEAs correctly, and u…
NajlaAbassi May 11, 2026
3a31b23
rename getEMMARecord to EMMA_get_record
NajlaAbassi May 11, 2026
a9f5be9
updating documentation, arg names, and example for EMMA_run
NajlaAbassi May 11, 2026
d47c5ad
add EMMA_freeze
NajlaAbassi May 11, 2026
3d8f2db
update EMMA_explain to return also citation
NajlaAbassi May 11, 2026
2d2eeb8
update example and fun name
NajlaAbassi May 11, 2026
7b8b76c
update namespace
NajlaAbassi May 11, 2026
32a0543
update the news
NajlaAbassi May 11, 2026
df6d1cb
fix conflicts
NajlaAbassi May 11, 2026
864dd6b
adding minimal pkgdown yaml
NajlaAbassi May 11, 2026
3ad1685
minimal fixes on the indentation
federicomarini May 12, 2026
b9ecd18
removing the extra links
federicomarini May 12, 2026
3b595bd
adding citation to DeeDeeExp
federicomarini May 12, 2026
098175b
bibtex updated
federicomarini May 12, 2026
c614baf
some styling for pkgdown landing page added
federicomarini May 12, 2026
2df7bdd
fixed the spot with correct citation
federicomarini May 12, 2026
6f1e4f9
structuring a bit differently the vignette
federicomarini May 12, 2026
33c3afe
scollout & smaller css tricks are in
federicomarini May 12, 2026
49a3014
remove "redundancy" in doi + cit + links
federicomarini May 12, 2026
c4fca5b
update title in the README
federicomarini May 12, 2026
5222d39
updating the readme content
NajlaAbassi May 12, 2026
0059c90
Merge branch 'EMMAResult' of github.com:imbeimainz/EMMA into EMMAResult
NajlaAbassi May 12, 2026
ca9df8b
updating the code of conduct
NajlaAbassi May 12, 2026
dacaff2
adding bg genes for the first example and remove it from the second
NajlaAbassi May 12, 2026
ba994b5
updating internal documentation
NajlaAbassi May 15, 2026
627ba5d
adding more tests
NajlaAbassi May 15, 2026
17e6758
adding workflow figure and updating vignette
NajlaAbassi May 15, 2026
3ecb343
adding reference to tidylog and omicslog
NajlaAbassi May 15, 2026
18a9a77
removing unecessary installations from gha yaml
NajlaAbassi May 18, 2026
f5e8873
update the universe data name and fix comments
NajlaAbassi May 18, 2026
4f7d289
update EMMA figure
NajlaAbassi May 18, 2026
6dcf8f9
add indentation in examples
NajlaAbassi May 18, 2026
84b2a23
updating the news before submission
NajlaAbassi May 18, 2026
dca216c
adding the current supported functions ... we can update it further w…
NajlaAbassi May 18, 2026
e35c6c8
update man page
NajlaAbassi May 18, 2026
808656d
update examples and tests to match the universe new name
NajlaAbassi May 18, 2026
723f28c
add supported methods and future extensions section
NajlaAbassi May 18, 2026
e58c66b
update version
NajlaAbassi May 18, 2026
11bb212
fix spaces in EMMA_show()
NajlaAbassi May 19, 2026
d1cb7f9
update tests
NajlaAbassi May 19, 2026
73983e5
add workflow example with lapply in the vignette
NajlaAbassi May 19, 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
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.positai$
^\.claude$
142 changes: 130 additions & 12 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,146 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
branches:
- devel
schedule:
- cron: '0 8 * * 5'

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.image }}

name: ${{ matrix.config.os }} (${{ matrix.config.bioc }} - ${{ matrix.config.image }})

strategy:
fail-fast: false
matrix:
config:
- { os: windows-latest, bioc: 'devel'}
- { os: macOS-latest, bioc: 'devel', curlConfigPath: '/usr/bin/'}
- { os: ubuntu-latest, bioc: 'devel'}
# - { os: ubuntu-latest, bioc: 'devel', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- { os: ubuntu-latest, image: 'bioconductor/bioconductor_docker:devel'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
CRAN: ${{ matrix.config.cran }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
CURL_CONFIG: ${{ matrix.config.curlConfigPath }}curl-config

steps:
- uses: actions/checkout@v2
- name: Check out repo
uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
- name: Set up R and install BiocManager
uses: grimbough/bioc-actions/setup-bioc@v1
if: matrix.config.image == null
with:
use-public-rspm: true
bioc-version: ${{ matrix.config.bioc }}

- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@v2
if: matrix.config.image == null

- name: Install remotes
run: |
install.packages('remotes')
shell: Rscript {0}

- uses: r-lib/actions/setup-r-dependencies@v1
- name: Query dependencies
run: |
saveRDS(remotes::dev_package_deps(dependencies = TRUE, repos = c(getOption('repos'), BiocManager::repositories())), 'depends.Rds', version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows' && matrix.config.image == null
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-bioc-${{ matrix.config.bioc }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-bioc-${{ matrix.config.bioc }}-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
pak-version: devel

- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install cairo
brew install --cask xquartz
brew install harfbuzz
brew install fribidi
brew install fftw

# - name: Set up gfortran symlinks (macOS)
# if: runner.os == 'macOS'
# run: |
# set -x
# sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib
# gfortran --version

- name: Install dependencies
run: |
local_deps <- remotes::local_package_deps(dependencies = TRUE)
deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]], Ncpu = 2L)
remotes::install_cran('rcmdcheck', Ncpu = 2L)
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Build, Install, Check
uses: grimbough/bioc-actions/build-install-check@v1

- name: Run BiocCheck
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
arguments: '--no-check-bioc-views --no-check-bioc-help'
error-on: 'error'

# - name: Upload check results
# if: failure()
# uses: actions/upload-artifact@master
# with:
# name: ${{ runner.os }}-r${{ matrix.config.r }}-results
# path: check

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-bioc-${{ matrix.config.bioc }}-results
path: check

- name: Test coverage
if: matrix.config.os == 'macOS-latest'
run: |
install.packages("covr")
covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v1
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/devel' && matrix.config.os == 'macOS-latest'
run: |
R CMD INSTALL .
Rscript -e "remotes::install_dev('pkgdown'); pkgdown::deploy_to_branch(new_process = FALSE)"
22 changes: 17 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: EMMA
Title: EMMA: Enrichment Methods Matter for enabeling fully reproducible and
Title: EMMA: Enrichment Methods Matter for enabling fully reproducible and
provenance-aware pathway analysis
Version: 0.0.1
Version: 0.99.0
Authors@R:
c(
person(
Expand All @@ -28,15 +28,27 @@ Description: EMMA is a package that provides a provenance-aware execution
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
RoxygenNote: 8.0.0
Imports:
AnnotationDbi,
cli
Suggests:
knitr,
rmarkdown,
macrophage,
DESeq2,
clusterProfiler,
gprofiler2,
org.Hs.eg.db,
GO.db,
mosdef,
topGO,
renv,
DeeDeeExperiment,
testthat (>= 3.0.0)
VignetteBuilder: knitr
URL: https://github.com/imbeimainz/EMMA
BugReports: https://github.com/imbeimainz/EMMA/issues
biocViews: Pathways, GO, KEGG, GeneSetEnrichment, Annotation, ImmunoOncology,
ReproducibleResearch, Transcriptomics, SingleCell, Software
biocViews: Software, Pathways, GO, KEGG, GeneSetEnrichment, ImmunoOncology,
Transcriptomics, SingleCell, GeneExpression, DifferentialExpression
Config/testthat/edition: 3
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Generated by roxygen2: do not edit by hand

export(EMMA_add_custom_metadata)
export(EMMA_explain)
export(EMMA_freeze)
export(EMMA_get_record)
export(EMMA_run)
export(EMMA_show)
importFrom(AnnotationDbi,metadata)
importFrom(cli,cli_alert_info)
importFrom(utils,packageVersion)
importFrom(utils,sessionInfo)
36 changes: 36 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# EMMA 0.99.0

* Ready for Bioconductor submission!

# EMMA 0.3.0
Comment thread
federicomarini marked this conversation as resolved.

* Added the initial implementation of `EMMA_freeze()`.
* `EMMA_explain()` now returns also citations of the used packages.
* Renamed `getEMMARecord()` to `EMMA_get_record()` for consistency.
* Resizing toy data to speed up examples.
* Updated the vignette.
* Updating unit tests.

# EMMA 0.2.0

* `EMMA_run()` can accept custom functions and wrappers and collect metadata
based on which function was used in the wrapper.
* Added `EMMA_add_custom_metadata()` to give the user manual/easy access to modify
`user_metdata` field in `EMMA_record`.
* Added a fully runnable vignette.


# EMMA 0.1.0

* `EMMA_run()` captures a function call, executes the FEA analysis, and returns
the results in their native format while attaching structured metadata to the
result object as attribute.
* `EMMA_run()` can now capture information from functions in `mosdef`,
`gprofiler2`, and 5 commonly used functions from `clusterProfiler`.
* `EMMA_show()` prints the captured metadata in a more user-friendly format.
* Added `getEMMARecord()` to fetch all metadata stored in the attributes of an
object returned by `EMMA_run()`.
* Added toy data.
* Added the initial implementation of `EMMA_explain`.


# EMMA 0.0.1

* Added the initial implementation of `EMMA_run()` and `EMMA_show()`.
Expand Down
70 changes: 70 additions & 0 deletions R/EMMA-data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#' A sample `data.frame` containing Differential Expression Analysis, generated
#' with `DESeq2`
#'
#' @details This `data.frame` object contains the results of a Differential
#' Expression Analysis performed on data from the `macrophage` package, more
#' precisely contrasting the counts from naive macrophage to those associated
#' with IFNg.
#'
#' The code to create said object can be found in the folder `/inst/scripts` in
#' the EMMA package, the file is called `create_datasets_examples.R`.
#'
#' @return A sample `data.frame` object, extracted from `DESeq2` results
#'
#' @format A `data.frame` object
#'
#' @references Alasoo, et al. "Shared genetic effects on chromatin and gene
#' expression indicate a role for enhancer priming in immune response",
#' Nature Genetics, January 2018 doi: 10.1038/s41588-018-0046-7.
#'
#' @name de_res_IFNg_vs_naive
#' @docType data
NULL

#' A sample `character vector` containing the background gene list used to
#' perform FEA on the `macrophage` dataset
#'
#' @details This `character vector` object contains the assay's `rownames`
#' of the `macrophage` data
#'
#' The code to create said object can be found in the folder `/inst/scripts` in
#' the EMMA package, the file is called `create_datasets_examples.R`.
#'
#' @return A sample `character vector` containing the assay's `rownames`
#' of the `macrophage` data
#'
#' @format A `character vector`
#'
#'
#' @references Alasoo, et al. "Shared genetic effects on chromatin and gene
#' expression indicate a role for enhancer priming in immune response",
#' Nature Genetics, January 2018 doi: 10.1038/s41588-018-0046-7.
#'
#' @name gene_universe
#' @docType data
NULL

#' A sample `list` containing Functional Enrichment Analysis results,
#' generated with `gprofiler2`
#'
#' @details This `list` object contains the result table and metadata of the
#' functional enrichment analysis (FEA) performed on the `macrophage` data,
#' specifically using the `gost()` function from the `gprofiler2` package, and
#' wrapped in `EMMA_run()`
#'
#' The code to create said object can be found in the folder `/inst/scripts` in
#' the EMMA package, the file is called `create_datasets_examples.R`.
#'
#' @return A sample `list` containing the FEA results `result` and `metadata`.
#' This results object has the `EMMA_record` attribute.
#'
#' @format A `list`
#'
#'
#' @references Alasoo, et al. "Shared genetic effects on chromatin and gene
#' expression indicate a role for enhancer priming in immune response",
#' Nature Genetics, January 2018 doi: 10.1038/s41588-018-0046-7.
#'
#' @name fea_res
#' @docType data
NULL
5 changes: 3 additions & 2 deletions R/EMMA-pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
#' EMMA stands for Enrichment Methods Matter.
#' And EMMA stands to help you in realizing it.
#'
#'
#' @importFrom utils packageVersion
#' @importFrom AnnotationDbi metadata
#' @importFrom utils packageVersion sessionInfo
#' @importFrom cli cli_alert_info
Comment on lines +6 to +8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean, compact, neat!

#' @name EMMA-pkg
#' @docType package
"_PACKAGE"
Expand Down
39 changes: 39 additions & 0 deletions R/EMMA_add_custom_metadata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#' EMMA_add_custom_metadata
#'
#' Append or replace the `extra` field in the `EMMA_record` attribute
#' of a result object returned by `EMMA_run()`. This allows users to manually
#' provide additional annotation or contextual information that could not be
#' captured automatically
#'
#' @param res A functional enrichment analysis results object as returned by
#' `EMMA_run()`
#' @param extra A named list of user-defined metadata elements to store in
#' the `extra` field
#'
#' @returns The input result object with updated `EMMA_record` attribute
#' @export
#'
#' @examples
#' data("fea_res", package = "EMMA")
#' fea_res <- EMMA_add_custom_metadata(fea_res, extra =
#' list(note = "The background gene set list was all expressed genes in the assay"))
EMMA_add_custom_metadata <- function(res,
extra = list()) {

if (!is.list(extra)) {
stop("`extra` must be a list!")
}

if (length(extra) > 0L && is.null(names(extra))) {
stop("`extra` must be a named list!")
}

emma_rec <- EMMA_get_record(res = res)

emma_rec$extra <- extra

# update
attr(res, "EMMA_record") <- emma_rec

return(res)
}
Loading
Loading