Skip to content

Commit

Permalink
fix when columns don't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
vortexing committed Mar 4, 2020
1 parent ac63a6a commit cc188ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/cromwellCall.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ cromwellCall <- function(workflow_id) {
} else {
# if end doesn't exist or it is already NA (???), make it and workflowDuration but set to NA
justCalls$end <- NA
justCalls$callDuration <- NA
justCalls$callDuration <- 0
}
} else {
# if start doesn't exist, then create it and set it to NA
justCalls$start <- NA
justCalls$end <- NA
justCalls$callDuration <- 0
}
justCalls <- dplyr::mutate_all(justCalls, as.character)
justCalls$callDuration <- as.numeric(justCalls$callDuration)
Expand Down
5 changes: 4 additions & 1 deletion R/cromwellWorkflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ cromwellWorkflow <- function(workflow_id) {
} else {
# if end doesn't exist or it is already NA (???), make it and workflowDuration but set to NA
resultdf$end <- NA
resultdf$workflowDuration <- NA
resultdf$workflowDuration <- 0
}
} else {
# if start doesn't exist, then create it and set it to NA
resultdf$start <- NA
# if start doesn't exist, then probably end and workflow Duration don't either.
resultdf$end <- NA
resultdf$workflowDuration <- 0
}
resultdf <- dplyr::mutate_all(resultdf, as.character)
resultdf$workflowDuration <-
Expand Down

0 comments on commit cc188ab

Please sign in to comment.