Skip to content

Commit 74636d8

Browse files
authored
Merge pull request #374 from marouenbg/optimize-package-2026
Optimize netZooR package dependency and loading
2 parents ece6df3 + fbd70fc commit 74636d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1214
-592
lines changed

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ vignettes/yarn.Rmd
3232
notes.md
3333
R/createDiffPandaStyle.R
3434
R/visDiffPandaInCytoscape.R
35+
^env$
36+
^\.venv$
37+
netZooR\.code-workspace$

.github/workflows/bioc-check.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
## Bioconductor-style R CMD check + BiocCheck
2+
## Mirrors the checks run on the Bioconductor build system (BBS)
3+
## https://contributions.bioconductor.org/bioconductor-package-submissions.html
4+
5+
name: BioC Check
6+
7+
on:
8+
push:
9+
branches: [master, devel]
10+
pull_request:
11+
branches: [master, devel]
12+
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
16+
jobs:
17+
bioc-check:
18+
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 120
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
# Bioconductor devel tracks the latest R release
25+
- os: ubuntu-latest
26+
r-version: "devel"
27+
bioc-version: "devel"
28+
# Bioconductor release tracks the current R release
29+
- os: ubuntu-latest
30+
r-version: "release"
31+
bioc-version: "release"
32+
- os: macos-latest
33+
r-version: "release"
34+
bioc-version: "release"
35+
- os: windows-latest
36+
r-version: "release"
37+
bioc-version: "release"
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
43+
- name: Setup R
44+
uses: r-lib/actions/setup-r@v2
45+
with:
46+
r-version: ${{ matrix.r-version }}
47+
use-public-rspm: true
48+
49+
- name: Setup Pandoc
50+
uses: r-lib/actions/setup-pandoc@v2
51+
52+
# System dependencies (Linux)
53+
- name: Install system dependencies (Linux)
54+
if: runner.os == 'Linux'
55+
run: |
56+
sudo apt-get update -qq
57+
sudo apt-get install -y --no-install-recommends \
58+
libcurl4-openssl-dev \
59+
libssl-dev \
60+
libxml2-dev \
61+
libglpk-dev
62+
63+
# Install dependencies using r-lib/actions (uses pak, handles R-devel well)
64+
- name: Install dependencies
65+
uses: r-lib/actions/setup-r-dependencies@v2
66+
with:
67+
extra-packages: |
68+
any::BiocCheck
69+
any::rcmdcheck
70+
71+
# Setup Python for reticulate (cross-platform)
72+
- name: Setup Python
73+
uses: actions/setup-python@v5
74+
with:
75+
python-version: '3.x'
76+
77+
- name: Install Python packages
78+
run: |
79+
pip install --upgrade pip
80+
pip install numpy scipy pandas
81+
shell: bash
82+
83+
- name: Set RETICULATE_PYTHON
84+
run: |
85+
echo "RETICULATE_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
86+
shell: bash
87+
88+
# R CMD build (mirrors BBS: build step)
89+
- name: Build package
90+
run: |
91+
R CMD build . --no-build-vignettes
92+
shell: bash
93+
94+
# R CMD check (mirrors BBS: check step with --no-vignettes)
95+
- name: R CMD check
96+
run: |
97+
pkg=$(ls -1 netZooR_*.tar.gz)
98+
R CMD check "$pkg" \
99+
--no-manual \
100+
--no-vignettes \
101+
--timings \
102+
--install-args="--build"
103+
shell: bash
104+
env:
105+
_R_CHECK_CRAN_INCOMING_: false
106+
_R_CHECK_FORCE_SUGGESTS_: false
107+
108+
- name: Show check results
109+
if: always()
110+
run: |
111+
cat netZooR.Rcheck/00check.log
112+
shell: bash
113+
114+
# BiocCheck (mirrors BBS: BiocCheck step)
115+
- name: BiocCheck
116+
run: |
117+
library(BiocCheck)
118+
BiocCheck(".", `no-check-vignettes` = TRUE, `new-package` = FALSE)
119+
shell: Rscript {0}
120+
121+
- name: Upload check results
122+
if: failure()
123+
uses: actions/upload-artifact@v4
124+
with:
125+
name: check-results-${{ matrix.os }}-R${{ matrix.r-version }}
126+
path: netZooR.Rcheck/
127+
128+
# Separate test job with coverage
129+
test-coverage:
130+
runs-on: ubuntu-latest
131+
timeout-minutes: 60
132+
steps:
133+
- uses: actions/checkout@v4
134+
135+
- uses: r-lib/actions/setup-r@v2
136+
with:
137+
r-version: "release"
138+
use-public-rspm: true
139+
140+
- name: Install system dependencies
141+
run: |
142+
sudo apt-get update -qq
143+
sudo apt-get install -y --no-install-recommends \
144+
libcurl4-openssl-dev libssl-dev libxml2-dev libglpk-dev
145+
146+
- name: Install dependencies
147+
uses: r-lib/actions/setup-r-dependencies@v2
148+
with:
149+
extra-packages: |
150+
any::covr
151+
152+
- name: Test coverage
153+
run: |
154+
covr::codecov(quiet = FALSE)
155+
shell: Rscript {0}
156+
env:
157+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/main.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
name: netZooR
1010

1111
env:
12-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
1312
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1413
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1514

@@ -28,8 +27,9 @@ jobs:
2827
runs-on: ${{ matrix.os }}
2928
timeout-minutes: 300
3029
strategy:
30+
fail-fast: false
3131
matrix:
32-
os: [ubuntu-latest]
32+
os: [ubuntu-latest, macos-latest, windows-latest]
3333
r-version: [4.4]
3434

3535
steps:
@@ -50,35 +50,27 @@ jobs:
5050
with:
5151
cache-version: 2
5252
extra-packages: |
53-
any::reticulate
5453
any::rcmdcheck
5554
any::covr
5655
needs: |
5756
website
5857
coverage
5958
60-
- name: Install blas/lapack
61-
run: |
62-
La_library()
63-
extSoftVersion()["BLAS"]
64-
shell: Rscript {0}
59+
- name: Setup Python
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: '3.x'
6563

66-
- if: matrix.os == 'ubuntu-latest'
64+
- name: Install Python packages
6765
run: |
68-
sudo apt-get install python3-venv
6966
pip install --upgrade pip
70-
python3 -m venv env
71-
source env/bin/activate
72-
echo "VIRTUAL ENV:" $VIRTUAL_ENV
73-
74-
- name: Install reticulate
67+
pip install numpy scipy pandas joblib
68+
shell: bash
69+
70+
- name: Set RETICULATE_PYTHON
7571
run: |
76-
library("reticulate")
77-
py_install("numpy")
78-
py_install("scipy")
79-
py_install("pandas")
80-
py_install("joblib")
81-
shell: Rscript {0}
72+
echo "RETICULATE_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
73+
shell: bash
8274

8375
- name: Check
8476
uses: r-lib/actions/check-r-package@v2.11.3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ docs/*.npy
3636
docs/reference/*.npy
3737
bladder.rdata
3838
skin.rdata
39+
netZooR.code-workspace

DESCRIPTION

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: netZooR
22
Type: Package
3-
Title: A menagerie of Methods for the inference and analysis of gene regulatory networks
3+
Title: A Menagerie of Methods for the Inference and Analysis of Gene Regulatory Networks
44
Version: 1.6.3
5-
Date: 2024-11-26
5+
Date: 2026-02-19
66
Authors@R: c(person("Tara", "Eicher",
77
email = "teicher@hsph.harvard.edu", role = c("aut"), comment = c(ORCID = "0000-0003-1809-4458")),
88
person("Marouen", "Ben Guebila",
@@ -23,15 +23,23 @@ Authors@R: c(person("Tara", "Eicher",
2323
email = "",role = "aut", comment = c(ORCID = "0000-0002-8042-7201")),
2424
person("Kate", "Shutta",
2525
email = "",role = "aut", comment = c(ORCID = "0000-0003-0402-3771")))
26-
Description: netZooR unifies the implementations of several Network Zoo methods (netzoo, netzoo.github.io) into a single package by creating interfaces between network inference and network analysis methods. Currently, the package has 3 methods for network inference including PANDA and its optimized implementation OTTER (network reconstruction using mutliple lines of biological evidence), LIONESS (single-sample network inference), and EGRET (genotype-specific networks). Network analysis methods include CONDOR (community detection), ALPACA (differential community detection), CRANE (significance estimation of differential modules), MONSTER (estimation of network transition states). In addition, YARN allows to process gene expresssion data for tissue-specific analyses and SAMBAR infers missing mutation data based on pathway information.
26+
Description: Unifies the implementations of several Network Zoo methods
27+
(netzoo, netzoo.github.io) into a single package by creating interfaces
28+
between network inference and network analysis methods. Currently, the
29+
package has 3 methods for network inference including PANDA and its
30+
optimized implementation OTTER (network reconstruction using multiple
31+
lines of biological evidence), LIONESS (single-sample network inference),
32+
and EGRET (genotype-specific networks). Network analysis methods include
33+
CONDOR (community detection), ALPACA (differential community detection),
34+
CRANE (significance estimation of differential modules), MONSTER
35+
(estimation of network transition states). In addition, YARN allows to
36+
process gene expression data for tissue-specific analyses and SAMBAR
37+
infers missing mutation data based on pathway information.
2738
Depends: R (>= 4.2.0),
2839
igraph,
29-
reticulate,
30-
pandaR,
40+
reticulate,
41+
pandaR,
3142
Biobase
32-
Remotes:
33-
stan-dev/cmdstanr,
34-
jnpaulson/pandaR,
3543
biocViews:
3644
NetworkInference,
3745
Network,
@@ -41,36 +49,44 @@ biocViews:
4149
Microarray,
4250
GraphAndNetwork
4351
Imports:
52+
matrixStats,
53+
Matrix,
54+
stats,
55+
utils,
56+
methods,
57+
graphics,
58+
parallel,
59+
doParallel,
60+
foreach,
61+
reshape,
62+
MASS,
63+
data.table
64+
License: GPL-3
65+
Encoding: UTF-8
66+
LazyData: false
67+
Suggests:
68+
testthat (>= 2.1.0),
69+
knitr,
70+
rmarkdown,
71+
pkgdown,
4472
viridisLite,
4573
STRINGdb,
4674
GOstats,
4775
AnnotationDbi,
48-
matrixStats,
4976
GO.db,
5077
org.Hs.eg.db,
51-
Matrix,
5278
matrixTests,
5379
gplots,
5480
nnet,
55-
data.table,
5681
vegan,
57-
stats,
58-
utils,
59-
reshape,
6082
reshape2,
6183
penalized,
62-
parallel,
63-
doParallel,
64-
foreach,
6584
ggplot2,
6685
ggdendro,
6786
grid,
68-
MASS,
6987
assertthat,
7088
tidyr,
71-
methods,
7289
dplyr,
73-
graphics,
7490
GeneNet,
7591
loo,
7692
rARPACK,
@@ -83,19 +99,8 @@ Imports:
8399
readr,
84100
RColorBrewer,
85101
quantro,
86-
matrixcalc,
87102
fgsea
88-
License: GPL-3
89-
Encoding: UTF-8
90-
LazyData: false
91-
Suggests:
92-
testthat (>= 2.1.0),
93-
knitr,
94-
rmarkdown,
95-
pkgdown,
96-
dorothea,
97-
cmdstanr
98-
VignetteEngine: knitr
103+
Remotes: jnpaulson/pandaR
99104
VignetteBuilder: knitr
100105
RoxygenNote: 7.3.3
101106
BugReports: https://github.com/netZoo/netZooR/issues

0 commit comments

Comments
 (0)