Finish R script linting

This commit is contained in:
2024-08-13 21:32:56 -04:00
parent 79862ddab4
commit 1ba1f14537
7 changed files with 1559 additions and 1211 deletions

View File

@@ -1620,7 +1620,12 @@ gta() {
for combo in "${study_combos[@]}"; do
# Split on comma and assign to array
IFS=',' read -ra studies <<< "$combo"
r_gta_pairwiselk "${studies[0]}" "${studies[1]}" "$STUDY_INFO_FILE" "$gta_out_dir"
r_gta_pairwiselk \
"${studies[0]}" \
"${studies[1]}" \
"$STUDY_INFO_FILE" \
"Average_GOTerms_All.csv" \
"$gta_out_dir"
done
# All studies
@@ -1660,17 +1665,18 @@ wrapper r_gta
#
# TODO
#
# * Is GTAtemplate.R actually a template?
# * Do we need to allow user customization?
# * Is GTAtemplate.R actually a template?
# * Do we need to allow user customization?
#
# Files
# INPUT
#
# * [gene_association.sgd](https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd)
# * go_terms.tab
# * [gene_association.sgd](https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd)
# * go_terms.tab
#
# Output
# OUTPUT
#
# * Average_GOTerms_All.csv
#
# *
#
# @arg $1 string Exp# name
# @arg $2 string ZScores_Interaction.csv file
@@ -1683,7 +1689,7 @@ r_gta() {
cat <<-EOF
EOF
script="$APPS_DIR/r/GTAtemplate.R"
script="$APPS_DIR/r/gtaTemplate.R"
[[ -d $5 ]] || mkdir -p "$5"
debug "$RSCRIPT $script $*"
"$RSCRIPT" "$script" \
@@ -1701,16 +1707,18 @@ wrapper r_gta_pairwiselk
#
# TODO
#
# * Should move directory creation from PairwiseLK.R to gta module
# * Move directory creation from PairwiseLK.R to gta module
# * Needs better output filenames and directory organization
# * Needs more for looping to reduce verbosity
#
# Files
# INPUT
#
# *
# *
# * Average_GOTerms_All.csv
# *
#
# Output
#
# *
# *
#
# This wrapper:
#
@@ -1724,7 +1732,7 @@ wrapper r_gta_pairwiselk
# @arg $4 string output directory
#
r_gta_pairwiselk() {
debug "Running: ${FUNCNAME[0]}"
debug "Running: ${FUNCNAME[0]} $*"
cat <<-EOF
EOF
@@ -1734,7 +1742,12 @@ r_gta_pairwiselk() {
[[ -d $4 ]] || mkdir -p "$4"
debug "$RSCRIPT $script $*"
"$RSCRIPT" "$script" "$@"
"$RSCRIPT" "$script" \
"$1" \
"$2" \
"$3" \
"$4" \
"${@:5}"
}
@@ -1842,6 +1855,10 @@ r_interactions() {
wrapper r_join_interactions
# @description JoinInteractExps3dev.R creates REMcRdy_lm_only.csv and Shift_only.csv
#
# TODO
# * Needs more loops to reduce verbosity
#
#
# Output
#
# * REMcRdy_lm_only.csv