Rollup for calculation_interaction_zscores refactor
This commit is contained in:
@@ -1464,7 +1464,8 @@ wrapper calculate_interaction_zscores
|
||||
#
|
||||
# TODO
|
||||
#
|
||||
# * Needs simplification w/ StudyInfo, should we just use a studies dir and name the dir with study name?
|
||||
# * More variables can be read in from the config file to allow more configuration
|
||||
# * Add gene names, other threshold values, etc.
|
||||
#
|
||||
# INPUT
|
||||
#
|
||||
@@ -1480,11 +1481,9 @@ wrapper calculate_interaction_zscores
|
||||
# *
|
||||
#
|
||||
# @arg $1 integer output directory
|
||||
# @arg $2 integer delta SD background value (default: 3)
|
||||
# @arg $3 string study info file
|
||||
# @arg $4 string SGD_features.tab
|
||||
# @arg $5 string easy/results_std.txt
|
||||
# @arg $6 array pairs of experiment paths and names
|
||||
# @arg $2 string SGD_features.tab
|
||||
# @arg $3 string easy/results_std.txt
|
||||
# @arg $6 array triplets of experiment paths, names, sd threshold factor
|
||||
calculate_interaction_zscores() {
|
||||
debug "Running: ${FUNCNAME[0]} $*"
|
||||
cat <<-EOF
|
||||
@@ -1499,7 +1498,7 @@ calculate_interaction_zscores() {
|
||||
* Background values are reported in the results sheet and so could also be analyzed there.
|
||||
EOF
|
||||
|
||||
declare script="$APPS_DIR/r/calculate_interaction_zscores.R"
|
||||
declare script="$APPS_DIR/r/calculate_interaction_zscores5.R"
|
||||
declare -a out_paths=("${1:-"$STUDY_RESULTS_DIR/zscores"}")
|
||||
for path in "${EXP_PATHS[@]}"; do
|
||||
out_paths+=("${path}/zscores")
|
||||
@@ -1515,13 +1514,11 @@ calculate_interaction_zscores() {
|
||||
|
||||
execute "$RSCRIPT" "$script" \
|
||||
"${1:-"$STUDY_RESULTS_DIR"}" \
|
||||
"${2:-3}" \
|
||||
"${3:-"$APPS_DIR/r/SGD_features.tab"}" \
|
||||
"${4:-"$EASY_RESULTS_DIR/results_std.txt"}" \
|
||||
"${@:5}" \
|
||||
"${EXP_PATHS_AND_NAMES[@]}"
|
||||
"${2:-"$APPS_DIR/r/SGD_features.tab"}" \
|
||||
"${3:-"$EASY_RESULTS_DIR/results_std.txt"}" \
|
||||
"${@:4}" \
|
||||
"${EXP_PATHS_AND_NAMES_AND_SD_FACTORS[@]}"
|
||||
|
||||
[[ -f "$out_path/zscores_interaction.csv" ]] || (echo "$out_path/zscores_interaction.csv does not exist"; return 1)
|
||||
}
|
||||
|
||||
|
||||
@@ -2136,6 +2133,21 @@ handle_config() {
|
||||
fi
|
||||
done
|
||||
|
||||
declare -ga EXP_PATHS_AND_NAMES_AND_SD_FACTORS
|
||||
for key in "${!config_array_ref[@]}"; do
|
||||
if [[ $key == *,path ]]; then
|
||||
main_key="${key%,*}"
|
||||
name_key="${main_key},name"
|
||||
sd_key="${main_key},sd"
|
||||
if [[ -n ${config_array_ref[$name_key]} ]]; then
|
||||
EXP_PATHS_AND_NAMES_AND_SD_FACTORS+=(
|
||||
"${config_array_ref[$key]}"
|
||||
"${config_array_ref[$name_key]}"
|
||||
"${config_array_ref[$sd_key]}")
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# declare -ga EXP_PATHS_AND_NAMES
|
||||
# for key in "${!config_array_ref[@]}"; do
|
||||
# if [[ $key == *,path ]]; then
|
||||
|
||||
Reference in New Issue
Block a user