Beginning debug/cleanup
This commit is contained in:
@@ -229,14 +229,19 @@ err() { echo "Error: $*" >&2; }
|
|||||||
ask_pn() {
|
ask_pn() {
|
||||||
unset PROJECT
|
unset PROJECT
|
||||||
declare -g PROJECT
|
declare -g PROJECT
|
||||||
|
example_pn="${PROJECT_PREFIX}_$(random_words 3)"
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
Enter a new or existing project name, ex. ${PROJECT_PREFIX}_$(random_words 3)
|
Enter a new or existing project name
|
||||||
If entering a new project, use the suggested prefix: ${PROJECT_PREFIX}_
|
If entering a new project, use the suggested prefix: ${PROJECT_PREFIX}_
|
||||||
You may choose any combination of words/characters following the prefix, but be sensible.
|
You may choose any combination of words/characters following the prefix, but be sensible.
|
||||||
Make it descriptive and avoid spaces and special characters.
|
Make it descriptive and avoid spaces and special characters.
|
||||||
|
Example: ${example_pn}
|
||||||
EOF
|
EOF
|
||||||
read -r -p "Enter a new or existing project name: " PROJECT
|
read -r -p "Enter a new or existing project name ($example_pn): " PROJECT
|
||||||
[[ -z $PROJECT ]]
|
if [[ -z $PROJECT ]]; then
|
||||||
|
echo "Setting project name to the default: $example_pn"
|
||||||
|
PROJECT="$example_pn"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
debug() { (( DEBUG )) && echo "Debug: $*"; }
|
debug() { (( DEBUG )) && echo "Debug: $*"; }
|
||||||
# Not super portable but nice to have
|
# Not super portable but nice to have
|
||||||
@@ -691,7 +696,6 @@ qhtcp() {
|
|||||||
STUDIES_ARCHIVE_FILE="$OUT_DIR/StudiesDataArchive.txt"
|
STUDIES_ARCHIVE_FILE="$OUT_DIR/StudiesDataArchive.txt"
|
||||||
QHTCP_PROJECT_DIR="$OUT_DIR/$PROJECT"
|
QHTCP_PROJECT_DIR="$OUT_DIR/$PROJECT"
|
||||||
APPS_DIR="$QHTCP_PROJECT_DIR/apps"
|
APPS_DIR="$QHTCP_PROJECT_DIR/apps"
|
||||||
CODE_DIR="$QHTCP_PROJECT_DIR/Code" # legacy location, keeping until can port each script to APPS
|
|
||||||
STUDY_INFO_FILE="$QHTCP_PROJECT_DIR/StudyInfo.csv"
|
STUDY_INFO_FILE="$QHTCP_PROJECT_DIR/StudyInfo.csv"
|
||||||
|
|
||||||
if [[ -d $QHTCP_PROJECT_DIR ]]; then
|
if [[ -d $QHTCP_PROJECT_DIR ]]; then
|
||||||
@@ -1089,7 +1093,7 @@ r_gta_heatmaps() {
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
script="$CODE_DIR/TSHeatmaps5dev2.R"
|
script="$APPS_DIR/r/TSHeatmaps5dev2.R"
|
||||||
|
|
||||||
[[ -d $5 ]] || mkdir -p "$5"
|
[[ -d $5 ]] || mkdir -p "$5"
|
||||||
|
|
||||||
@@ -1468,9 +1472,9 @@ main() {
|
|||||||
SCANS_DIR="$d"
|
SCANS_DIR="$d"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Scans directory: $SCANS_DIR"
|
echo "Using scans directory: $SCANS_DIR"
|
||||||
echo "Change the SCANS environment variable to override"
|
echo "Change the SCANS environment variable to override"
|
||||||
echo "Example: SCANS=/path/to/other/scans ./qhtcp-workflow.sh"
|
echo "Example: SCANS=/path/to/scans ./qhtcp-workflow"
|
||||||
|
|
||||||
# Set the automatic project directory prefix
|
# Set the automatic project directory prefix
|
||||||
PROJECT_USER="$(whoami)"
|
PROJECT_USER="$(whoami)"
|
||||||
|
|||||||
Reference in New Issue
Block a user