Skip to content

Commit dad5537

Browse files
committed
Fix AcrFinder runtime verification
1 parent e63de08 commit dad5537

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ RUN mkdir -p /opt/dnmb-seed/acrfinder \
196196
RUN mkdir -p /data /results ${DNMB_CACHE_ROOT} /opt/biotools/data /opt/biotools/test
197197

198198
RUN apt-get -o Acquire::Retries=5 update \
199-
&& apt-get -o Acquire::Retries=5 install -y --no-install-recommends vienna-rna \
199+
&& apt-get -o Acquire::Retries=5 install -y --no-install-recommends \
200+
vienna-rna \
201+
libbio-perl-perl libbio-perl-run-perl libbio-tools-run-alignment-clustalw-perl \
202+
libdate-calc-perl libjson-parse-perl \
200203
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
201204
&& /opt/biotools/bin/python -m pip install --no-cache-dir progressbar2 \
202205
&& command -v RNAfold >/dev/null \

docker/verify-runtime.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ if (any(promotech_bad)) {
4848
}
4949
5050
acr_module <- DNMB:::dnmb_acrfinder_get_module(cache_root = Sys.getenv("DNMB_CACHE_ROOT"), required = TRUE)
51-
acr_paths <- strsplit(Sys.getenv("PATH"), .Platform$path.sep, fixed = TRUE)[[1]]
51+
inherited <- strsplit(Sys.getenv("PATH"), .Platform$path.sep, fixed = TRUE)[[1]]
52+
acr_env_python <- if (!is.null(acr_module$files$env_python)) acr_module$files$env_python else ""
53+
acr_paths <- unique(c(
54+
file.path(acr_module$manifest$repo_dir, "bin"),
55+
dirname(acr_env_python),
56+
"/usr/bin", "/usr/local/bin", "/usr/sbin",
57+
inherited,
58+
file.path(acr_module$manifest$repo_dir, "dependencies", "CRISPRCasFinder", "bin")
59+
))
60+
acr_paths <- acr_paths[nzchar(acr_paths) & file.exists(acr_paths)]
5261
acr_status <- DNMB:::.dnmb_acrfinder_runtime_status(acr_paths, repo_dir = acr_module$manifest$repo_dir)
5362
acr_bad <- acr_status$status %in% c("missing", "failed")
5463
if (any(acr_bad)) {

0 commit comments

Comments
 (0)