Fix RScript input

This commit is contained in:
2024-08-04 23:01:10 -04:00
parent 0715c2b150
commit 4059cc965f
7 changed files with 21 additions and 23 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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