From 95da97e7fc481422d6f0ddf2ca23c627db642056 Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Sat, 3 Aug 2024 23:21:15 -0400 Subject: [PATCH] Fix perl modules --- workflow/qhtcp-workflow | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/workflow/qhtcp-workflow b/workflow/qhtcp-workflow index 3b95dc1f..48ebca2f 100755 --- a/workflow/qhtcp-workflow +++ b/workflow/qhtcp-workflow @@ -380,6 +380,7 @@ interactive_header() { echo "$line" >> ~/.bashrc fi fi + declare -gx R_LIBS_USER="$HOME/R/$SCRIPT_NAME" else debug "R_LIBS_USER already set to $HOME/R/$SCRIPT_NAME" fi @@ -584,14 +585,14 @@ install_dependencies() { # Install R packages for d in "${depends_r[@]}"; do - debug "$RSCRIPT -e \"if (!require(\"$d\", quietly = TRUE)) {install.packages(\"$d\", dep=TRUE, repos=\"https://cloud.r-project.org\")}\"" - "$RSCRIPT" -e "if (!require(\"$d\", quietly = TRUE)) {install.packages(\"$d\", dep=TRUE, repos=\"https://cloud.r-project.org\")}" + debug "$RSCRIPT -e \"if (!require(\"$d\", quietly = TRUE)) {install.packages(\"$d\", dep=TRUE, lib=\"$R_LIBS_USER\" repos=\"https://cloud.r-project.org\")}\"" + "$RSCRIPT" -e "if (!require(\"$d\", quietly = TRUE)) {install.packages(\"$d\", dep=TRUE, lib=\"$R_LIBS_USER\" repos=\"https://cloud.r-project.org\")}" done # Install Bioc packages for d in "${depends_bioc[@]}"; do - debug "$RSCRIPT -e \"BiocManager::install(\"$d\")\"" - "$RSCRIPT" -e "BiocManager::install(\"$d\")" + debug "$RSCRIPT -e \"BiocManager::install(\"$d\", lib=\"$R_LIBS_USER\")\"" + "$RSCRIPT" -e "BiocManager::install(\"$d\", lib=\"$R_LIBS_USER\")" done hash "$MATLAB" &>/dev/null || echo "You will also need MATLAB installed for GUI modules" @@ -678,6 +679,7 @@ module easy # * Don't create output in the scans folder, put it in an output directory # * The !!Results output files need standardized naming # * The input MasterPlate and DrugMedia sheets need to be converted to something standard like csv/tsv +# * This would allow them to be created programmatically as well # # NOTES # @@ -2066,6 +2068,7 @@ main() { declare -gx STUDY_TEMPLATE_DIR="$TEMPLATES_DIR/exp" declare -gx STUDY_INFO_FILE="$QHTCP_PROJECT_DIR/StudyInfo.csv" declare -gx EASY_OUT_DIR="$QHTCP_PROJECT_DIR/easy" + declare -gx R_LIBS_USER=${R_LIBS_USER:-"$HOME/R/$SCRIPT_NAME"} if ((DEBUG)); then declare -p SCANS_DIR OUT_DIR TEMPLATES_DIR APPS_DIR \ PROJECTS PROJECT_NAME \