diff --git a/workflow/apps/r/PairwiseLK.R b/workflow/apps/r/PairwiseLK.R index 85af54ff..61a9b8c5 100644 --- a/workflow/apps/r/PairwiseLK.R +++ b/workflow/apps/r/PairwiseLK.R @@ -19,7 +19,7 @@ args <- commandArgs(TRUE) exp_name <- args[1] exp_name2 <- args[2] -if (length(args) > 3) { +if (length(args) >= 3) { study_info_file <- args[3] } else { study_info_file <- "StudyInfo.csv" diff --git a/workflow/apps/r/addShiftVals.R b/workflow/apps/r/addShiftVals.R index 8ddc923f..54eebf31 100644 --- a/workflow/apps/r/addShiftVals.R +++ b/workflow/apps/r/addShiftVals.R @@ -9,25 +9,25 @@ library(sos) args=commandArgs(TRUE) -if (length(args) > 1) { +if (length(args) >= 1) { finalTable <- args[1] } else { finalTable <- "REMcRdy_lm_only.csv-finalTable.csv" # for legacy workflow } -if (length(args) > 2) { +if (length(args) >= 2) { shiftFile <- args[2] } else { shiftFile <- "Shift_only.csv" # for legacy workflow } -if (length(args) > 3) { +if (length(args) >= 3) { studyInfo <- args[3] } else { studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow } -if (length(args) > 4) { +if (length(args) >= 4) { output <- args[4] } else { output<- "REMcHeatmaps/REMcWithShift.csv" # for legacy workflow diff --git a/workflow/apps/r/createHeatMaps.R b/workflow/apps/r/createHeatMaps.R index a574fd5f..adcdb947 100644 --- a/workflow/apps/r/createHeatMaps.R +++ b/workflow/apps/r/createHeatMaps.R @@ -8,13 +8,13 @@ library(gplots) args <- commandArgs(TRUE) # Set output dir -if (length(args) > 1) { +if (length(args) >= 1) { input_finalTable <- args[1] } else { input_finalTable <- "/REMcHeatmaps/REMcWithShift.csv" # for legacy workflow } -if (length(args) > 2) { +if (length(args) >= 2) { outDir <- args[2] } else { outDir <- "/REMcHeatmaps/REMcWithShift.csv" # for legacy workflow diff --git a/workflow/apps/r/gtaTemplate.R b/workflow/apps/r/gtaTemplate.R index b14a3a39..ae0eaf3b 100644 --- a/workflow/apps/r/gtaTemplate.R +++ b/workflow/apps/r/gtaTemplate.R @@ -16,25 +16,25 @@ args <- commandArgs(TRUE) exp_name <- args[1] -if (length(args) > 2) { +if (length(args) >= 2) { zscores_file <- args[2] } else { zscores_file <- "zscores/zscores_interaction.csv" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd } -if (length(args) > 3) { +if (length(args) >= 3) { sgd_terms_file <- args[3] } else { sgd_terms_file <- "go_terms.tab" } -if (length(args) > 4) { +if (length(args) >= 4) { sgd_features_file <- args[4] } else { sgd_features_file <- "gene_association.sgd" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd } -if (length(args) > 5) { +if (length(args) >= 5) { output_dir <- args[5] } else { output_dir <- "../../out/gta" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd diff --git a/workflow/apps/r/interactions.R b/workflow/apps/r/interactions.R index 80663481..1a24f195 100644 --- a/workflow/apps/r/interactions.R +++ b/workflow/apps/r/interactions.R @@ -26,28 +26,28 @@ args <- commandArgs(TRUE) inputFile <- args[1] # Set output dir -if (length(args) > 2) { +if (length(args) >= 2) { outDir <- args[2] } else { outDir <- "/ZScores/" # for legacy workflow } # Set StudyInfo file path -if (length(args) > 3) { +if (length(args) >= 3) { studyInfo <- args[3] } else { studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow } # Set SGDgeneList file path -if (length(args) > 4) { +if (length(args) >= 4) { SGDgeneList <- args[4] } else { SGDgeneList <- "../Code/SGD_features.tab" # for legacy workflow } # Set standard deviation -if (length(args) > 5) { +if (length(args) >= 5) { delBGFactor <- args[5] } else { # User prompt for std multiplier Value @@ -78,11 +78,9 @@ expNumber <- as.numeric(sub("^.*?(\\d+)$", "\\1", getwd())) Labels[expNumber,3] <- delBGFactor write.csv(Labels,file=studyInfo,row.names = FALSE) -############################################################################### -################### BEGIN USER DATA SELECTION SECTION ######################### -############################################################################### +# BEGIN USER DATA SELECTION SECTION -#read in the data +# Read in the data X <- read.delim(inputFile,skip=2,as.is=T,row.names=1,strip.white=TRUE) X <- X[!(X[[1]]%in%c("","Scan")),] #X <- X[!(X[[1]]%in%c(61:76)),] #Remove dAmp plates which are Scans 61 thru 76 diff --git a/workflow/apps/r/joinInteractExps.R b/workflow/apps/r/joinInteractExps.R index 5ddc2aa6..48dfa3ec 100644 --- a/workflow/apps/r/joinInteractExps.R +++ b/workflow/apps/r/joinInteractExps.R @@ -8,14 +8,14 @@ library(dplyr) args <- commandArgs(TRUE) # Set output dir -if (length(args) > 1) { +if (length(args) >= 1) { outDir <- args[1] } else { outDir <- "./" # for legacy workflow } # Set sd value -if (length(args) > 2) { +if (length(args) >= 2) { sd <- args[2] } else { sd <- 2 # default value @@ -23,7 +23,7 @@ if (length(args) > 2) { print(paste("SD=",sd)) # Set studyInfo file -if (length(args) > 3) { +if (length(args) >= 3) { studyInfo <- args[3] } else { studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow diff --git a/workflow/qhtcp-workflow b/workflow/qhtcp-workflow index b604da97..e22e6b95 100755 --- a/workflow/qhtcp-workflow +++ b/workflow/qhtcp-workflow @@ -1334,7 +1334,7 @@ qhtcp() { "$STUDY_INFO_FILE" \ "$STUDY_DIR/zscores/" \ "$APPS_DIR/r/SGD_features.tab" \ - 5 + 3 done # Run remc as part of the QHTCP process