Before old plotting removal

This commit is contained in:
2024-09-04 02:03:23 -04:00
parent 111909914c
commit d52903f8fa
2 changed files with 327 additions and 282 deletions

View File

@@ -785,7 +785,7 @@ init_project() {
debug "Running: ${FUNCNAME[0]}"
# Create a project scans dir
[[ -d $PROJECT_SCANS_DIR ]] || (execute mkdir -p "$PROJECT_SCANS_DIR" || return 1)
[[ -d $PROJECT_SCANS_DIR ]] || { execute mkdir -p "$PROJECT_SCANS_DIR" || return 1; }
# TODO eventually copy scans from robot but for now let's pause and wait for transfer
echo "In the future we will copy scans from robot here"
@@ -1561,7 +1561,7 @@ join_interaction_zscores() {
"${EXP_PATHS_AND_NAMES[@]}"
for f in "${out_files[@]}"; do
[[ -f $f ]] || (echo "$f does not exist"; return 1)
[[ -f $f ]] || { echo "$f does not exist"; return 1; }
done
}
@@ -1606,7 +1606,7 @@ r_gta() {
"${5:-"$GTA_OUT_DIR"}" \
"${@:6}" # future arguments
[[ -f $out_file ]] || (echo "$out_file does not exist"; return 1)
[[ -f $out_file ]] || { echo "$out_file does not exist"; return 1; }
}
@@ -1779,7 +1779,7 @@ r_add_shift_values() {
rm -f "$STUDY_RESULTS_DIR/REMcHeatmaps/"*.pdf # TODO why?
out_file="${4:-"$STUDY_RESULTS_DIR/REMcWithShift.csv"}"
[[ -f $out_file ]] || (echo "$out_file does not exist"; return 1)
[[ -f $out_file ]] || { echo "$out_file does not exist"; return 1; }
}
@@ -1815,7 +1815,7 @@ r_create_heat_maps() {
pdfs=(REMcHeatmaps/*.pdf)
execute pdftk "${pdfs[@]}" output "$out_file"
out_file="$2/compiledREMcHeatmaps.pdf"
[[ -f $out_file ]] || (echo "$out_file does not exist"; return 1)
[[ -f $out_file ]] || { echo "$out_file does not exist"; return 1; }
}
@@ -1845,7 +1845,7 @@ r_heat_maps_homology() {
pdfs=("${1:-"$STUDY_RESULTS_DIR/homology"}"/*.pdf)
execute pdftk "${pdfs[@]}" output "$out_file"
[[ -f $out_file ]] || (echo "$out_file does not exist"; return 1)
[[ -f $out_file ]] || { echo "$out_file does not exist"; return 1; }
}
@@ -1869,7 +1869,7 @@ py_gtf_dcon() {
"$2/" \
"${@:3}" # future arguments
out_file="$2/1-0-0-finaltable.csv"
[[ -f $out_file ]] || (echo "$out_file does not exist"; return 1)
[[ -f $out_file ]] || { echo "$out_file does not exist"; return 1; }
}
@@ -1930,7 +1930,7 @@ py_gtf_concat() {
debug "Running: ${FUNCNAME[0]} $*"
script="$APPS_DIR/python/concatGTFResults.py"
execute "$PYTHON" "$script" "$1/" "$2"
[[ -f $2 ]] || (echo "$2 does not exist"; return 1)
[[ -f $2 ]] || { echo "$2 does not exist"; return 1; }
}
@@ -1983,7 +1983,7 @@ handle_results_dir() {
results_dir="${results_dirs[0]}"
else
# Print results dirs
[[ ${#results_dirs[@]} -gt 0 ]] || (err "No ${2}s found"; return 1)
[[ ${#results_dirs[@]} -gt 0 ]] || { err "No ${2}s found"; return 1; }
print_in_columns "results_dirs"
# Results selection prompt
cat <<-EOF
@@ -2091,7 +2091,7 @@ handle_config() {
# Declare a nameref to refer to the actual array using the variable name
declare -n config_array_ref="$config_array_name"
[[ -z ${!config_array_ref[*]} ]] && (err "No $config_array_name array found in $config_file" && return 1)
[[ -z ${!config_array_ref[*]} ]] && { err "No $config_array_name array found in $config_file" && return 1; }
for key in "${!config_array_ref[@]}"; do
IFS=',' read -r main_key sub_key <<< "$key"
@@ -2298,7 +2298,7 @@ main() {
if ! [[ " ${ALL_MODULES[*]} " =~ [[:space:]]${MODULES[i]}[[:space:]] ]]; then
echo "Module ${MODULES[$i]} is not available, removing"
read -r -p "Enter replacement module name: " module
! [[ " ${ALL_MODULES[*]} " =~ [[:space:]]${module}[[:space:]] ]] || (echo "RTFM"; return 1)
! [[ " ${ALL_MODULES[*]} " =~ [[:space:]]${module}[[:space:]] ]] || { echo "RTFM"; return 1; }
MODULES[i]="$module"
fi
unset module