Skip to content

Commit

Permalink
Fixed bug when no gwas or score files specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollie committed Jul 25, 2024
1 parent 08cd76b commit b4e52b5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Scripts/target_scoring/target_scoring_pipeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ if(!is.na(opt$test)){
# Identify score files to be combined
score_files<-list_score_files(opt$config)

if(is.null(score_files)){
log_add(log_file = log_file, message = paste0('No score files specified.'))
end.time <- Sys.time()
time.taken <- end.time - start.time
sink(file = paste(opt$output,'.log',sep=''), append = T)
cat('Analysis finished at',as.character(end.time),'\n')
cat('Analysis duration was',as.character(round(time.taken,2)),attr(time.taken, 'units'),'\n')
sink()
quit(save = "no", status = 0)
}

# Subset score files
if(!is.null(opt$score)){
if(all(score_files$name != opt$score)){
Expand Down

0 comments on commit b4e52b5

Please sign in to comment.