Skip to content

Commit 377e0ac

Browse files
committed
speedup enrichment() via Rcpp
1 parent 988c05e commit 377e0ac

21 files changed

Lines changed: 860 additions & 2403 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
.Rbuildignore
33
.vscode
44

5+
README.html
6+
cleanup
57
test.R
8+
test_build*.R
69
sankey.html
710
.RData
811
.tar.gz

DESCRIPTION

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
Package: EnrichIntersect
22
Type: Package
33
Title: Enrichment Analysis and Intersecting Sankey Diagram
4-
Version: 0.7
5-
Date: 2024-03-14
4+
Version: 1.0
65
URL: https://github.com/ocbe-uio/EnrichIntersect
76
BugReports: https://github.com/ocbe-uio/EnrichIntersect/issues
87
Authors@R: c(person("Zhi", "Zhao", email = "zhi.zhao@medisin.uio.no", role = c("aut","cre")), person("Manuela", "Zucknick", email = "manuela.zucknick@medisin.uio.no", role = c("aut")), person("Tero", "Aittokallio", email = "t.a.aittokallio@medisin.uio.no", role = c("ctb")))
98
Description: A flexible tool for enrichment analysis based on user-defined sets. It allows users to perform over-representation analysis of the custom sets among any specified ranked feature list, hence making enrichment analysis applicable to various types of data from different scientific fields. 'EnrichIntersect' also enables an interactive means to visualize identified associations based on, for example, the mix-lasso model (Zhao et al., 2022 <doi:10.1016/j.isci.2022.104767>) or similar methods.
109
License: MIT + file LICENSE
1110
Depends: R (>= 4.0)
1211
Encoding: UTF-8
13-
RoxygenNote: 7.2.3
14-
Imports: ggplot2, dplyr, networkD3, jsonlite, htmlwidgets, webshot2,
12+
LinkingTo: Rcpp, RcppArmadillo
13+
Imports: Rcpp, ggplot2, dplyr, networkD3, jsonlite, htmlwidgets, webshot2,
1514
stats, methods, grDevices
1615
Suggests: knitr
1716
LazyData: true
1817
VignetteBuilder: knitr
19-
NeedsCompilation: no
20-
Packaged: 2024-03-14 15:42:21 UTC; zhiz
21-
Author: Zhi Zhao [aut, cre],
22-
Manuela Zucknick [aut],
23-
Tero Aittokallio [ctb]
24-
Maintainer: Zhi Zhao <zhi.zhao@medisin.uio.no>
18+
NeedsCompilation: yes
19+
Config/roxygen2/version: 8.0.0

NAMESPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export(enrichment)
44
export(intersectSankey)
55
import(ggplot2)
6+
importFrom(Rcpp,sourceCpp)
67
importFrom(dplyr,"%>%")
78
importFrom(grDevices,hcl.colors)
89
importFrom(htmlwidgets,onRender)
@@ -12,6 +13,5 @@ importFrom(methods,hasArg)
1213
importFrom(networkD3,JS)
1314
importFrom(networkD3,sankeyNetwork)
1415
importFrom(stats,p.adjust)
15-
importFrom(utils,setTxtProgressBar)
16-
importFrom(utils,txtProgressBar)
1716
importFrom(webshot2,webshot)
17+
useDynLib(EnrichIntersect, .registration = TRUE)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# EnrichIntersect 1.0
2+
3+
- Added Rcpp code to speedup function `enrichment()`
4+
15
# EnrichIntersect 0.7
26

37
- Fixed issue with the legend of p<0.05

R/EnrichIntersect-package.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#' @keywords internal
2+
#' @aliases EnrichIntersect-package NULL
3+
#'
4+
#'
5+
"_PACKAGE"
6+
7+
## usethis namespace: start
8+
#' @useDynLib EnrichIntersect, .registration = TRUE
9+
#' @importFrom Rcpp sourceCpp
10+
## usethis namespace: end
11+
NULL
12+

R/RcppExports.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
2+
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
3+
4+
enrichment_core_original <- function(x, set_indices, alpha = 0.0, normalize = TRUE, permute_n = 100L) {
5+
.Call(`_EnrichIntersect_enrichment_core_original`, x, set_indices, alpha, normalize, permute_n)
6+
}
7+

0 commit comments

Comments
 (0)