Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions propagation/3.22/updateReposPkgs-bioc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ WIN_CONTRIB="$REPOS_ROOT/bin/windows/contrib/$R_VERSION"
MAC_BIG_SUR_x86_64_CONTRIB="$REPOS_ROOT/bin/macosx/big-sur-x86_64/contrib/$R_VERSION"
MAC_BIG_SUR_arm64_CONTRIB="$REPOS_ROOT/bin/macosx/big-sur-arm64/contrib/$R_VERSION"

META_SRC="$SRC_CONTRIB/Meta"
META_R_EXPR="source('/home/biocbuild/BBS/utils/makeMetaDbs.R')"
MEAT_PATH="/home/biocbuild/bbs-$BIOC_VERSION-bioc/meat"

if [ ! -f "$PROPAGATION_DB_FILE" ]; then
echo "ERROR: $PROPAGATION_DB_FILE not found. Did postrun.sh run?"
exit 1
Expand Down Expand Up @@ -72,6 +76,13 @@ for i in `ls $MANUALS_SRC`; do
mkdir -p $MANUALS_DEST/$pkg/man
cp --update --verbose $MANUALS_SRC/$i $MANUALS_DEST/$pkg/man
done
echo ""
echo "========================================================================"
/bin/date
echo "------------------------------------------------------------------------"

echo "Updating $META_SRC with aliases and cross refences dbs..."
$Rscript -e "$META_R_EXPR; try(makeMetaDbs('$PROPAGATION_DB_FILE', '$MEAT_PATH', '$REPOS_ROOT', '$META_SRC'))"

echo "DONE."
exit 0
11 changes: 11 additions & 0 deletions propagation/3.22/updateReposPkgs-data-annotation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ PROPAGATION_DB_FILE="$BBS_OUTGOING_DIR/../PROPAGATION_STATUS_DB.txt"
REPOS_ROOT="$HOME/PACKAGES/$BIOC_VERSION/data/annotation"
SRC_CONTRIB="$REPOS_ROOT/src/contrib"

META_SRC="$SRC_CONTRIB/Meta"
META_R_EXPR="source('/home/biocbuild/BBS/utils/makeMetaDbs.R')"
MEAT_PATH="/home/biocbuild/bbs-$BIOC_VERSION-data-annotation/meat"

if [ ! -f "$PROPAGATION_DB_FILE" ]; then
echo "ERROR: $PROPAGATION_DB_FILE not found. Did postrun.sh run?"
exit 1
Expand Down Expand Up @@ -58,6 +62,13 @@ for i in `ls $MANUALS_SRC`; do
mkdir -p $MANUALS_DEST/$pkg/man
cp --update --verbose $MANUALS_SRC/$i $MANUALS_DEST/$pkg/man
done
echo ""
echo "========================================================================"
/bin/date
echo "------------------------------------------------------------------------"

echo "Updating $META_SRC with aliases and cross refences dbs..."
$Rscript -e "$META_R_EXPR; try(makeMetaDbs('$PROPAGATION_DB_FILE', '$MEAT_PATH', '$REPOS_ROOT', '$META_SRC'))"

echo "DONE."
exit 0
11 changes: 11 additions & 0 deletions propagation/3.22/updateReposPkgs-data-experiment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ PROPAGATION_DB_FILE="$BBS_OUTGOING_DIR/../PROPAGATION_STATUS_DB.txt"
REPOS_ROOT="$HOME/PACKAGES/$BIOC_VERSION/data/experiment"
SRC_CONTRIB="$REPOS_ROOT/src/contrib"

META_SRC="$SRC_CONTRIB/Meta"
META_R_EXPR="source('/home/biocbuild/BBS/utils/makeMetaDbs.R')"
MEAT_PATH="/home/biocbuild/bbs-$BIOC_VERSION-data-experiment/meat"

if [ ! -f "$PROPAGATION_DB_FILE" ]; then
echo "ERROR: $PROPAGATION_DB_FILE not found. Did postrun.sh run?"
exit 1
Expand Down Expand Up @@ -58,6 +62,13 @@ for i in `ls $MANUALS_SRC`; do
mkdir -p $MANUALS_DEST/$pkg/man
cp --update --verbose $MANUALS_SRC/$i $MANUALS_DEST/$pkg/man
done
echo ""
echo "========================================================================"
/bin/date
echo "------------------------------------------------------------------------"

echo "Updating $META_SRC with aliases and cross refences dbs..."
$Rscript -e "$META_R_EXPR; try(makeMetaDbs('$PROPAGATION_DB_FILE', '$MEAT_PATH', '$REPOS_ROOT', '$META_SRC'))"

echo "DONE."
exit 0
33 changes: 33 additions & 0 deletions utils/makeMetaDbs.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
makeMetaDbs <- function(db_filepath, repos_root, meta_path) {

meat_dir <- Sys.getenv("BBS_MEAT_PATH")
prop_status <- read.dcf(db_filepath)

pkgs <- c()
for (i in 1:dim(prop_status)[2]) {
pkg_type_stage <- strsplit(colnames(prop_status)[i], "#")[[1]]
if ("source" %in% pkg_type_stage &&
strsplit(prop_status[i], ",")[[1]][1] %in% c("YES", "UNNEEDED")) {
pkgs <- c(pkgs, pkg_type_stage[1])
}
}

web_dir <- file.path(repos_root, "web", "packages")
meta_dir <- file.path(meta_path)
if (!dir.exists(meta_dir)) {
dir.create(meta_dir, recursive = TRUE)
}

pkg_paths <- file.path(meat_dir, pkgs)
for (pkg_path in pkg_paths) {
biocViews::build_db_from_source(pkg_path, repos_root)
}

aliases_db_file <- file.path(meta_dir, "aliases.rds")
meta_aliases_db <- biocViews::build_meta_aliases_db(web_dir, aliases_db_file)
saveRDS(meta_aliases_db, aliases_db_file, version = 2)

rdxrefs_db_file <- file.path(meta_dir, "rdxrefs.rds")
meta_rdxrefs_db <- biocViews::build_meta_rdxrefs_db(web_dir, rdxrefs_db_file)
saveRDS(meta_rdxrefs_db, rdxrefs_db_file, version = 2)
}