Skip to content

Commit 229509a

Browse files
committed
Make Meta dbs
1 parent e2fac5e commit 229509a

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

Diff for: 3.20/bioc/bbscentral2/postrun.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ if [ -n "$BBS_OUTGOING_MAP" ]; then
3232
find OUTGOING -type d -exec chmod 755 {} \;
3333
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-PROPAGATION_STATUS_DB.py
3434
chmod -R +r .
35+
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-meta.py
3536
fi
3637

3738
# Generate the HTML report

Diff for: 3.21/bioc/bbscentral1/postrun.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ if [ -n "$BBS_OUTGOING_MAP" ]; then
3232
find OUTGOING -type d -exec chmod 755 {} \;
3333
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-PROPAGATION_STATUS_DB.py
3434
chmod -R +r .
35+
$BBS_PYTHON_CMD $BBS_HOME/BBS-make-meta.py
3536
fi
3637

3738
# Generate the HTML report

Diff for: utils/makeMetaDbs.R

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
generateMetaDbs <- function(outgoing_path, db_filepath) {
2+
3+
meat_dir <- Sys.getenv("BBS_MEAT_PATH")
4+
bbs_central_rdir <- Sys.getenv("BBS_CENTRAL_RDIR")
5+
prop_status <- read.dcf(file.path(bbs_central_rdir, db_filepath))
6+
7+
pkgs <- c()
8+
for (i in 1:dim(prop_status)[2]) {
9+
pkg_type_stage <- strsplit(colnames(prop_status)[i], "#")[[1]]
10+
if ("source" %in% pkg_type_stage &&
11+
strsplit(prop_status[i], ",")[[1]][1] %in% c("YES", "UNNEEDED")) {
12+
pkgs <- c(pkgs, pkg_type_stage[1])
13+
}
14+
}
15+
16+
# Because the location is always recreated, we always create the Meta
17+
# directory and always create all the databases
18+
web_dir <- file.path(bbs_central_rdir, "web", "packages")
19+
meta_dir <- file.path(bbs_central_rdir, "OUTGOING", "Meta")
20+
dir.create(meta_dir, recursive = TRUE)
21+
22+
biocViews::build_db_from_source(file.path(meat_dir, pkgs), bbs_central_rdir)
23+
24+
aliases_db_file <- file.path(meta_dir, "aliases.rds")
25+
biocViews::build_meta_aliases_db(web_dir, aliases_db_file, TRUE)
26+
27+
rdxrefs_db_file <- file.path(meta_dir, "rdxrefs.rds")
28+
biocViews::build_meta_rdxrefs_db(web_dir, rdxrefs_db_file, TRUE)
29+
}

0 commit comments

Comments
 (0)