Fix RScript input
This commit is contained in:
@@ -19,7 +19,7 @@ args <- commandArgs(TRUE)
|
|||||||
exp_name <- args[1]
|
exp_name <- args[1]
|
||||||
exp_name2 <- args[2]
|
exp_name2 <- args[2]
|
||||||
|
|
||||||
if (length(args) > 3) {
|
if (length(args) >= 3) {
|
||||||
study_info_file <- args[3]
|
study_info_file <- args[3]
|
||||||
} else {
|
} else {
|
||||||
study_info_file <- "StudyInfo.csv"
|
study_info_file <- "StudyInfo.csv"
|
||||||
|
|||||||
@@ -9,25 +9,25 @@ library(sos)
|
|||||||
|
|
||||||
args=commandArgs(TRUE)
|
args=commandArgs(TRUE)
|
||||||
|
|
||||||
if (length(args) > 1) {
|
if (length(args) >= 1) {
|
||||||
finalTable <- args[1]
|
finalTable <- args[1]
|
||||||
} else {
|
} else {
|
||||||
finalTable <- "REMcRdy_lm_only.csv-finalTable.csv" # for legacy workflow
|
finalTable <- "REMcRdy_lm_only.csv-finalTable.csv" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(args) > 2) {
|
if (length(args) >= 2) {
|
||||||
shiftFile <- args[2]
|
shiftFile <- args[2]
|
||||||
} else {
|
} else {
|
||||||
shiftFile <- "Shift_only.csv" # for legacy workflow
|
shiftFile <- "Shift_only.csv" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(args) > 3) {
|
if (length(args) >= 3) {
|
||||||
studyInfo <- args[3]
|
studyInfo <- args[3]
|
||||||
} else {
|
} else {
|
||||||
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow
|
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(args) > 4) {
|
if (length(args) >= 4) {
|
||||||
output <- args[4]
|
output <- args[4]
|
||||||
} else {
|
} else {
|
||||||
output<- "REMcHeatmaps/REMcWithShift.csv" # for legacy workflow
|
output<- "REMcHeatmaps/REMcWithShift.csv" # for legacy workflow
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ library(gplots)
|
|||||||
args <- commandArgs(TRUE)
|
args <- commandArgs(TRUE)
|
||||||
|
|
||||||
# Set output dir
|
# Set output dir
|
||||||
if (length(args) > 1) {
|
if (length(args) >= 1) {
|
||||||
input_finalTable <- args[1]
|
input_finalTable <- args[1]
|
||||||
} else {
|
} else {
|
||||||
input_finalTable <- "/REMcHeatmaps/REMcWithShift.csv" # for legacy workflow
|
input_finalTable <- "/REMcHeatmaps/REMcWithShift.csv" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(args) > 2) {
|
if (length(args) >= 2) {
|
||||||
outDir <- args[2]
|
outDir <- args[2]
|
||||||
} else {
|
} else {
|
||||||
outDir <- "/REMcHeatmaps/REMcWithShift.csv" # for legacy workflow
|
outDir <- "/REMcHeatmaps/REMcWithShift.csv" # for legacy workflow
|
||||||
|
|||||||
@@ -16,25 +16,25 @@ args <- commandArgs(TRUE)
|
|||||||
|
|
||||||
exp_name <- args[1]
|
exp_name <- args[1]
|
||||||
|
|
||||||
if (length(args) > 2) {
|
if (length(args) >= 2) {
|
||||||
zscores_file <- args[2]
|
zscores_file <- args[2]
|
||||||
} else {
|
} else {
|
||||||
zscores_file <- "zscores/zscores_interaction.csv" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd
|
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]
|
sgd_terms_file <- args[3]
|
||||||
} else {
|
} else {
|
||||||
sgd_terms_file <- "go_terms.tab"
|
sgd_terms_file <- "go_terms.tab"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(args) > 4) {
|
if (length(args) >= 4) {
|
||||||
sgd_features_file <- args[4]
|
sgd_features_file <- args[4]
|
||||||
} else {
|
} else {
|
||||||
sgd_features_file <- "gene_association.sgd" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd
|
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]
|
output_dir <- args[5]
|
||||||
} else {
|
} else {
|
||||||
output_dir <- "../../out/gta" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd
|
output_dir <- "../../out/gta" # https://downloads.yeastgenome.org/curation/chromosomal_feature/gene_association.sgd
|
||||||
|
|||||||
@@ -26,28 +26,28 @@ args <- commandArgs(TRUE)
|
|||||||
inputFile <- args[1]
|
inputFile <- args[1]
|
||||||
|
|
||||||
# Set output dir
|
# Set output dir
|
||||||
if (length(args) > 2) {
|
if (length(args) >= 2) {
|
||||||
outDir <- args[2]
|
outDir <- args[2]
|
||||||
} else {
|
} else {
|
||||||
outDir <- "/ZScores/" # for legacy workflow
|
outDir <- "/ZScores/" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set StudyInfo file path
|
# Set StudyInfo file path
|
||||||
if (length(args) > 3) {
|
if (length(args) >= 3) {
|
||||||
studyInfo <- args[3]
|
studyInfo <- args[3]
|
||||||
} else {
|
} else {
|
||||||
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow
|
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set SGDgeneList file path
|
# Set SGDgeneList file path
|
||||||
if (length(args) > 4) {
|
if (length(args) >= 4) {
|
||||||
SGDgeneList <- args[4]
|
SGDgeneList <- args[4]
|
||||||
} else {
|
} else {
|
||||||
SGDgeneList <- "../Code/SGD_features.tab" # for legacy workflow
|
SGDgeneList <- "../Code/SGD_features.tab" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set standard deviation
|
# Set standard deviation
|
||||||
if (length(args) > 5) {
|
if (length(args) >= 5) {
|
||||||
delBGFactor <- args[5]
|
delBGFactor <- args[5]
|
||||||
} else {
|
} else {
|
||||||
# User prompt for std multiplier Value
|
# User prompt for std multiplier Value
|
||||||
@@ -78,11 +78,9 @@ expNumber <- as.numeric(sub("^.*?(\\d+)$", "\\1", getwd()))
|
|||||||
Labels[expNumber,3] <- delBGFactor
|
Labels[expNumber,3] <- delBGFactor
|
||||||
write.csv(Labels,file=studyInfo,row.names = FALSE)
|
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 <- 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("","Scan")),]
|
||||||
#X <- X[!(X[[1]]%in%c(61:76)),] #Remove dAmp plates which are Scans 61 thru 76
|
#X <- X[!(X[[1]]%in%c(61:76)),] #Remove dAmp plates which are Scans 61 thru 76
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ library(dplyr)
|
|||||||
args <- commandArgs(TRUE)
|
args <- commandArgs(TRUE)
|
||||||
|
|
||||||
# Set output dir
|
# Set output dir
|
||||||
if (length(args) > 1) {
|
if (length(args) >= 1) {
|
||||||
outDir <- args[1]
|
outDir <- args[1]
|
||||||
} else {
|
} else {
|
||||||
outDir <- "./" # for legacy workflow
|
outDir <- "./" # for legacy workflow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set sd value
|
# Set sd value
|
||||||
if (length(args) > 2) {
|
if (length(args) >= 2) {
|
||||||
sd <- args[2]
|
sd <- args[2]
|
||||||
} else {
|
} else {
|
||||||
sd <- 2 # default value
|
sd <- 2 # default value
|
||||||
@@ -23,7 +23,7 @@ if (length(args) > 2) {
|
|||||||
print(paste("SD=",sd))
|
print(paste("SD=",sd))
|
||||||
|
|
||||||
# Set studyInfo file
|
# Set studyInfo file
|
||||||
if (length(args) > 3) {
|
if (length(args) >= 3) {
|
||||||
studyInfo <- args[3]
|
studyInfo <- args[3]
|
||||||
} else {
|
} else {
|
||||||
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow
|
studyInfo <- "../Code/StudyInfo.csv" # for legacy workflow
|
||||||
|
|||||||
@@ -1334,7 +1334,7 @@ qhtcp() {
|
|||||||
"$STUDY_INFO_FILE" \
|
"$STUDY_INFO_FILE" \
|
||||||
"$STUDY_DIR/zscores/" \
|
"$STUDY_DIR/zscores/" \
|
||||||
"$APPS_DIR/r/SGD_features.tab" \
|
"$APPS_DIR/r/SGD_features.tab" \
|
||||||
5
|
3
|
||||||
done
|
done
|
||||||
|
|
||||||
# Run remc as part of the QHTCP process
|
# Run remc as part of the QHTCP process
|
||||||
|
|||||||
Reference in New Issue
Block a user