Skip to content

Commit

Permalink
create directory at the very beginning
Browse files Browse the repository at this point in the history
moved the function to create directory at the very beginning.
This is only needed for the image to quit properly in Condor and not hang forever in the system.
  • Loading branch information
aliceminotto authored Nov 4, 2016
1 parent 6b2ba94 commit eba6869
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions GWASSER.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ processArgs <- function(){
return(arguments)
}

if(!interactive()){
if(!dir.exists(args$outdir)){
message("Output directory is missing, creating directory...")
dir.create(args$outdir, recursive = TRUE)
}
}

if(!interactive()) {
args <- processArgs()
if (!args$noplots) {
Expand Down Expand Up @@ -298,11 +305,6 @@ if(!interactive()){
message("------------------------")
message("Start Analysis:\n")

if(!dir.exists(args$outdir)){
message("Output directory is missing, creating directory...")
dir.create(args$outdir, recursive = TRUE)
}

message("Now reading genotype file...")
genotypes <- parseGeno(args$gfile)

Expand Down

0 comments on commit eba6869

Please sign in to comment.