From bee467d6fb1df94eae64ab942a2e4b1c606af2e2 Mon Sep 17 00:00:00 2001 From: Amy Paguirigan Date: Thu, 16 Jan 2020 12:56:36 -0800 Subject: [PATCH] REMOVE CROMWELL send to fh.wdlR --- NAMESPACE | 14 - R/cromwelljobmanagement.R | 150 --------- R/cromwellmetadata.R | 633 ------------------------------------- R/cromwellmisc.R | 96 ------ man/cromwellAbort.Rd | 26 -- man/cromwellBackends.Rd | 23 -- man/cromwellCache.Rd | 34 -- man/cromwellCall.Rd | 34 -- man/cromwellFailures.Rd | 32 -- man/cromwellGlob.Rd | 34 -- man/cromwellJobs.Rd | 29 -- man/cromwellLogs.Rd | 26 -- man/cromwellOutputs.Rd | 26 -- man/cromwellSubmitBatch.Rd | 37 --- man/cromwellTiming.Rd | 26 -- man/cromwellVersion.Rd | 23 -- man/cromwellWorkflow.Rd | 34 -- man/womtoolValidate.Rd | 28 -- 18 files changed, 1305 deletions(-) delete mode 100644 R/cromwelljobmanagement.R delete mode 100644 R/cromwellmetadata.R delete mode 100644 R/cromwellmisc.R delete mode 100644 man/cromwellAbort.Rd delete mode 100644 man/cromwellBackends.Rd delete mode 100644 man/cromwellCache.Rd delete mode 100644 man/cromwellCall.Rd delete mode 100644 man/cromwellFailures.Rd delete mode 100644 man/cromwellGlob.Rd delete mode 100644 man/cromwellJobs.Rd delete mode 100644 man/cromwellLogs.Rd delete mode 100644 man/cromwellOutputs.Rd delete mode 100644 man/cromwellSubmitBatch.Rd delete mode 100644 man/cromwellTiming.Rd delete mode 100644 man/cromwellVersion.Rd delete mode 100644 man/cromwellWorkflow.Rd delete mode 100644 man/womtoolValidate.Rd diff --git a/NAMESPACE b/NAMESPACE index 69cad94..210f1f1 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,19 +2,6 @@ export("%>%") export(copyAnnotations) -export(cromwellAbort) -export(cromwellBackends) -export(cromwellCache) -export(cromwellCall) -export(cromwellFailures) -export(cromwellGlob) -export(cromwellJobs) -export(cromwellLogs) -export(cromwellOutputs) -export(cromwellSubmitBatch) -export(cromwellTiming) -export(cromwellVersion) -export(cromwellWorkflow) export(dropWhen) export(getAWSLogs) export(getDictionary) @@ -32,5 +19,4 @@ export(validIdentifiers) export(validateDataFrame) export(validateDataset) export(validateUpload) -export(womtoolValidate) importFrom(magrittr,"%>%") diff --git a/R/cromwelljobmanagement.R b/R/cromwelljobmanagement.R deleted file mode 100644 index 6891ebe..0000000 --- a/R/cromwelljobmanagement.R +++ /dev/null @@ -1,150 +0,0 @@ -#' Submit a workflow job to Cromwell -#' -#' Supports the submission of a fully defined workflow job to a Cromwell instance. -#' -#' @param WDL Local path to the wdl file describing the workflow. (Required) -#' @param Params Local path to the json containing the parameters to use with the workflow. (Optional) -#' @param Batch Local path to the json containing a reference to any batch file desired if the workflow is a batch. (Required) -#' @param Options Local path to the json containing workflow options to apply.(Optional) -#' @param Labels A data frame containing the labels for this workflow.(Optional) -#' @param Dependencies A zip'd file of subworkflow dependencies. (Optional) -#' @return Returns the response from the API post which includes the workflow ID that you'll need to monitor the job. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellSubmitBatch <- - function(WDL, Params, Batch=NULL, Options=NULL, Labels=NULL, Dependencies = NULL) { - if("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Submitting a batch workflow to Cromwell.") - - bodyList <- list( - workflowSource = httr::upload_file(WDL), - workflowInputs = httr::upload_file(Batch)) - - if(is.null(Dependencies) == F) bodyList <- c(bodyList, workflowDependencies = list(httr::upload_file(Dependencies))) - if(is.null(Options) == F) bodyList <- c(bodyList, workflowOptions = list(httr::upload_file(Options))) - if(is.null(Labels) == F) bodyList <- c(bodyList, labels = list(jsonlite::toJSON(as.list(Labels), auto_unbox = TRUE))) - if(is.null(Params) == F) bodyList <- c(bodyList, workflowInputs_2 = list(httr::upload_file(Params))) - - cromDat <- - httr::POST( - url = paste0(Sys.getenv("CROMWELLURL"), "/api/workflows/v1"), - body = bodyList, - encode = "multipart" - ) - cromResponse <- - data.frame(httr::content(cromDat), stringsAsFactors = F) - return(cromResponse) - } - -#' Abort a workflow job on Cromwell -#' -#' Aborts any given workflow job on Cromwell. -#' -#' @param workflow_id Unique workflow id of the job you wish to kill. -#' @return Returns the response from the API post -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellAbort <- function(workflow_id) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Aborting job in Cromwell.") - cromAbort <- - httr::POST(url = paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/abort" - )) - cromResponse <- - data.frame(httr::content(cromAbort), stringsAsFactors = F) - return(cromResponse) -} -#' Gets outputs for a workflow in Cromwell -#' -#' -#' -#' @param workflow_id Unique workflow id of the job. -#' @return Returns the response from the API post -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellOutputs <- function(workflow_id) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else { - print(paste0("Querying for outputs list for workflow id: ", workflow_id)) - } - cromOut <- - httr::GET(url = paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/outputs" - )) - cromResponse <- httr::content(cromOut, as = "parsed") - if (length(cromResponse$outputs) > 0) { - outputsDf <- purrr::map_dfr(cromResponse$outputs, function(x) { - Z <- data.frame("s3URL" = unlist(x), stringsAsFactors = F) - dplyr::mutate(Z, shardIndex = gsub("/.*$", "", gsub("^.*shard-", "", Z$s3URL))) - }, .id = "workflowOutputType") - outputsDf$s3Prefix <- gsub("s3://[^/]*/", "", outputsDf$s3URL) - outputsDf$s3Bucket <- - gsub("/.*$", "", gsub("s3://", "", outputsDf$s3URL)) - outputsDf$workflow_id <- workflow_id - outputsDf$workflowName <- - gsub("/.*$", - "", - gsub("cromwell-output/", "", outputsDf$s3Prefix)) - } else { - print("No outputs are available for this workflow.") - } - return(outputsDf) -} -#' Gets logs for a workflow in Cromwell -#' -#' -#' @param workflow_id Unique workflow id of the job. -#' @return Returns the response from the API post -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellLogs <- function(workflow_id) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Getting list of logs from Cromwell.") - cromDat <- - httr::GET(url = paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/logs" - )) - cromResponse <- httr::content(cromDat, as = "parsed") - calls <- purrr::pluck(cromResponse, "calls") - callsFlat <- purrr::map_dfr(calls, function(x) { - justcalls <- purrr::map_dfr(x, function(s) { - shard <- - data.frame(rbind(unlist(s)), stringsAsFactors = F) # flatten them and make them a data frame - }) - }, .id = "callName") - callsFlat$workflow_id <- workflow_id - return(callsFlat) -} diff --git a/R/cromwellmetadata.R b/R/cromwellmetadata.R deleted file mode 100644 index 024b978..0000000 --- a/R/cromwellmetadata.R +++ /dev/null @@ -1,633 +0,0 @@ -#' Pull information about recent Cromwell workflow jobs -#' -#' Requests metadata about Cromwell workflow jobs during a time period specified. -#' -#' @param days The number of days of history to return, defaults to 1 day. -#' @return Returns a long form data frame of metadata on workflow jobs submitted to a specific Cromwell instance. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' ## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -#' setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -#' ## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -#' recentJobs <- cromwellJobs(days = 7) -#' @export -cromwellJobs <- function(days = 1) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print(paste0("Querying cromwell for jobs in the last ", days, " days.")) - beforeNow <- Sys.Date() - round(days, 0) - cromDat <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/query?submission=", - beforeNow, - "T00%3A00Z" - ) - ))$results - cromTable <- purrr::map_dfr(cromDat, dplyr::bind_rows) - if (nrow(cromTable) > 0) { - cromTable <- dplyr::rename(cromTable, "workflow_id" = "id") - if ("end" %in% colnames(cromTable) == T & - "start" %in% colnames(cromTable) == T) { - cromTable$start <- - as.POSIXct(cromTable$start, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - cromTable$end <- - as.POSIXct(cromTable$end, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - cromTable$submission <- - as.character(as.POSIXct(cromTable$submission, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 )# because PST/hack) - cromTable$workflowDuration <- - round(difftime(cromTable$end, cromTable$start, units = "mins"), - 3) - cromTable$workflowDuration <- - as.numeric(cromTable$workflowDuration) - } else { - cromTable$workflowDuration <- "NA" - } - } else { - cromTable <- data.frame("workflow_id" = NA, - stringsAsFactors = F) - } - return(cromTable) -} - -#' Pull metadata for a specific Cromwell workflow job -#' -#' Retrieve and process all labels, submission and workflow level metadata for a specific workflow. -#' -#' @param workflow_id The workflow ID to return metadata for. -#' @param expandSubWorkflows Boolean, whether to expand subworkflows in the results or not, default is F. -#' @return Returns a long form data frame of metadata on a workflow. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' ## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -#' setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -#' ## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -#' recentJobs <- cromwellJobs(days = 7) -#' ## Request workflow metadata for a specific job that was run in your Cromwell instance. -#' thisWorkflowID <- recentJobs$workflow_id[1] -#' workflowMeta <- cromwellWorkflow(workflow_id = thisWorkflowID) -#' @export -cromwellWorkflow <- function(workflow_id, expandSubWorkflows = F) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else { - print(paste0("Querying for metadata for workflow id: ", workflow_id)) - } - if (expandSubWorkflows == F) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=false" - ) - ), as = "parsed") - } - if (expandSubWorkflows == T) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=true" - ) - ), as = "parsed") - } - if (crommetadata$status == "fail") { - #this is when a workflow itself fails to start - return(data.frame( - "workflow_id" = crommetadata$message, - stringsAsFactors = F - )) - } else { - if ("id" %in% names(crommetadata)) { - # if a workflow starts then the id will be there - # if a workflow has a list of labels - if (is.list(crommetadata$labels) == T) { - drag <- purrr::pluck(crommetadata, "labels") - drag <- - data.frame(purrr::flatten(drag), stringsAsFactors = F) - drag$workflow_id <- - gsub("cromwell-", "", drag$cromwell.workflow.id) - drag$cromwell.workflow.id <- NULL - } else { - drag <- data.frame("workflow_id" = workflow_id) - } - # Get submission data - submit <- - data.frame(purrr::flatten(purrr::pluck(crommetadata, "submittedFiles")), stringsAsFactors = F) - submit$labels <- - NULL # why do they have labels here TOO!!?!>!> - submit$workflow_id <- workflow_id - # Get remaining workflow level data - remainder <- - data.frame(purrr::discard(crommetadata, is.list), - stringsAsFactors = F) - remainder <- dplyr::rename(remainder, "workflow_id" = "id") - # Get workflow failure data if it exists - if (crommetadata$status == "Failed") { - failureData <- - unlist(purrr::pluck( - purrr::pluck(crommetadata, "failures", .default = NA), - "causedBy", - "message", - .default = NA - )) - if (is.na(failureData) == F) { - failures <- - data.frame(failureData[failureData != ""], stringsAsFactors = F) - failures$workflow_id <- workflow_id - resultdf <- - purrr::reduce(list(remainder, drag, submit, failures), - dplyr::full_join, - by = "workflow_id") - } # if failures is na, then keep going - resultdf <- - purrr::reduce(list(remainder, drag, submit), dplyr::full_join, by = "workflow_id") - } else { - resultdf <- - purrr::reduce(list(remainder, drag, submit), dplyr::full_join, by = "workflow_id") - } - #resultdf <- dplyr::mutate_all(resultdf, as.character) - resultdf$submission <- - as.character(as.POSIXct(resultdf$submission, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 )# because PST/hack) - if ("start" %in% colnames(resultdf) == T) { - # if the workflow has started - if (is.na(resultdf$start) == F) { - # and if the value of start is not NA - resultdf$start <- - as.POSIXct(resultdf$start, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - } else { - # if start is NA, then make sure it's set to NA???? Stupid. - resultdf$start <- NA - } - if ("end" %in% colnames(resultdf) == T) { - # and if end is present - if (is.na(resultdf$end) == F) { - # and it is not NA - resultdf$end <- - as.POSIXct(resultdf$end, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - resultdf <- - dplyr::mutate(resultdf, workflowDuration = round(difftime(end, start, units = "mins"), 3)) - } - } 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 - } - } else { - # if start doesn't exist, then create it and set it to NA - resultdf$start <- NA - } - resultdf <- dplyr::mutate_all(resultdf, as.character) - resultdf$workflowDuration <- - as.numeric(resultdf$workflowDuration) - } else { - # if id is not in the names, then - resultdf <- - data.frame("workflow_id" = "No metadata available.", stringsAsFactors = F) - } - return(resultdf) - } -} - -#' Pull metadata for the calls made in a Cromwell workflow job -#' -#' Retrieve and process call metadata for a specific workflow. -#' -#' @param workflow_id The workflow ID to return call metadata on. -#' @param expandSubWorkflows Boolean, whether to expand subworkflows in the results or not, default is F. -#' @return Returns a long form data frame of metadata on calls. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' ## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -#' setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -#' ## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -#' recentJobs <- cromwellJobs(days = 7) -#' ## Request workflow metadata for a specific job that was run in your Cromwell instance. -#' thisWorkflowID <- recentJobs$workflow_id[1] -#' callsMeta <- cromwellCall(workflow_id = thisWorkflowID) -#' @export -cromwellCall <- function(workflow_id, expandSubWorkflows = F) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else { - print(paste0("Querying for call metadata for workflow id: ", workflow_id)) - } - if (expandSubWorkflows == F) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=false" - ) - ), as = "parsed") - } - if (expandSubWorkflows == T) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=true" - ) - ), as = "parsed") - } - if(is.character(crommetadata) == T) stop(crommetadata) - if (is.list(crommetadata$calls) == T) { - # if the workflow has made calls, nab them - bob <- purrr::pluck(crommetadata, "calls") - if (length(bob) > 0) { - # this is redudant but a better error catch isn't quite clear yet. - justCalls <- purrr::map(bob, function(callData) { - purrr::map_dfr(callData, function(shardData) { - y <- - purrr::discard(shardData, is.list) # only keep data that isn't a list itself! - Z <- data.frame(rbind(unlist(y)), stringsAsFactors = F) - - if (shardData$executionStatus == "Failed") { - failureData <- - unlist(purrr::pluck( - purrr::pluck(shardData, "failures", .default = NA), - "causedBy", - "message", - .default = NA - )) - if (is.na(failureData) == F) { - Zf <- - data.frame(failureData[failureData != ""], stringsAsFactors = F) - Z <- cbind(Z, Zf) - } - } - - if (is.null(shardData$runtimeAttributes) == F) { - # if there are runtimeAttributes then.. - runTime <- - purrr::pluck(shardData, "runtimeAttributes") # pull them out - Z1 <- - data.frame(rbind(unlist(runTime)), stringsAsFactors = F) # and make into a data frame - Z <- cbind(Z, Z1) # put those together into just Z - } - return(Z) - }) - }) %>% purrr::map_dfr(., function(x) { - x - }, .id = "callName") # melt it all down by callName - - justCalls$workflow_id <- - workflow_id # This lets you take this output in a map_dfr and just do rbind as the function. ;) - ## Big Chunk of dealing with start and end times. - if ("start" %in% colnames(justCalls) == T) { - # if the workflow has started - justCalls$start <- - as.POSIXct(justCalls$start, tz = "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - if ("end" %in% colnames(justCalls) == T) { - # and if end is present - justCalls$end <- - as.POSIXct(justCalls$end, tz = "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - justCalls <- - dplyr::mutate(justCalls, callDuration = round(difftime(end, start, units = "mins"), 3)) - } 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 - } - } else { - # if start doesn't exist, then create it and set it to NA - justCalls$start <- NA - } - justCalls <- dplyr::mutate_all(justCalls, as.character) - justCalls$callDuration <- as.numeric(justCalls$callDuration) - - ############# Subworkflows ################ - # if (expandSubWorkflows == T) { - # subCalldata <- purrr::keep(bob, is.list) - # subWay <- purrr::map(subCalldata, function(x) { - # a <- purrr::flatten(x) - # b <- purrr::pluck(a, "subWorkflowMetadata") - # return(b) - # }) - # - # subworkflowCallData <- purrr::map_dfr(subWay, function(indSubCalls){ - # - # if (is.list(indSubCalls$calls) == T) { - # # if the workflow has made calls, nab them - # sub <- purrr::pluck(indSubCalls, "calls") - # if (length(sub) > 0) { - # # this is redudant but a better error catch isn't quite clear yet. - # justCallsSub <- purrr::map(sub, function(callData) { - # purrr::map_dfr(callData, function(shardData) { - # y <- purrr::discard(shardData, is.list) # only keep data that isn't a list itself! - # Z <- data.frame(rbind(unlist(y)), stringsAsFactors = F) - # - # if (shardData$executionStatus == "Failed") { - # failureData <- - # unlist(purrr::pluck( - # purrr::pluck(shardData, "failures", .default = NA), - # "causedBy", - # "message", - # .default = NA - # )) - # if (is.na(failureData) == F) { - # Zf <- - # data.frame(failureData[failureData != ""], stringsAsFactors = F) - # Z <- cbind(Z, Zf) - # } - # } - # - # if (is.null(shardData$runtimeAttributes) == F) { - # # if there are runtimeAttributes then.. - # runTime <- - # purrr::pluck(shardData, "runtimeAttributes") # pull them out - # Z1 <- - # data.frame(rbind(unlist(runTime)), stringsAsFactors = F) # and make into a data frame - # Z <- cbind(Z, Z1) # put those together into just Z - # } - # return(Z) - # }) - # - # }) %>% purrr::map_dfr(., function(x) {x}, .id = "callName") # melt it all down by subCallName - # justCallsSub$subWorkflow_id <- indSubCalls$id - # justCallsSub$subWorkflowCallName <- indSubCalls$workflowName - # justCallsSub$workflow_id <- workflow_id # This lets you take this output in a map_dfr and just do rbind as the function. ;) - # ## Big Chunk of dealing with start and end times. - # if ("start" %in% colnames(justCallsSub) == T) { - # # if the workflow has started - # justCallsSub$start <- - # as.POSIXct(justCallsSub$start, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - # if ("end" %in% colnames(justCallsSub) == T) { - # # and if end is present - # justCallsSub$end <- - # as.POSIXct(justCallsSub$end, "UTC", "%Y-%m-%dT%H:%M:%S") - 8*60*60 # because PST/hack - # justCallsSub <- - # dplyr::mutate(justCallsSub, callDuration = round(difftime(end, start, units = "mins"), 3)) - # } else { - # # if end doesn't exist or it is already NA (???), make it and workflowDuration but set to NA - # justCallsSub$end <- NA - # justCallsSub$callDuration <- NA - # } - # } else { - # # if start doesn't exist, then create it and set it to NA - # justCallsSub$start <- NA - # } - # justCallsSub <- dplyr::mutate_all(justCallsSub, as.character) - # justCallsSub$callDuration <- as.numeric(justCallsSub$callDuration) - # } - # } - # justCallsSub$subWorkflowName <- indSubCalls$workflowName - # return(justCallsSub) - # }) - # - # justCalls <- dplyr::full_join(justCalls, justCallsSub) - # - # - # } - # } - } else { - justCalls <- - data.frame("workflow_id" = "No call metadata available.", stringsAsFactors = F) - } - } else { - justCalls <- - data.frame("workflow_id" = "No call metadata available.", stringsAsFactors = F) - } - return(justCalls) -} - -#' Pull metadata for the failed calls made in a Cromwell workflow job -#' -#' Gets info about failed calls for a specific workflow -#' -#' @param workflow_id The workflow ID to return call failure metadata for. -#' @return Returns a long form data frame of metadata on failed calls in a workflow. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' ## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -#' setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -#' ## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -#' recentJobs <- cromwellJobs(days = 7) -#' ## Request workflow metadata for a specific job that was run in your Cromwell instance. -#' thisWorkflowID <- recentJobs$workflow_id[1] -#' failsMeta <- cromwellFailures(workflow_id = thisWorkflowID) -#' @export -cromwellFailures <- function(workflow_id) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else { - print(paste0("Querying for failure metadata for workflow id: ", workflow_id)) - } - cromfail <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?includeKey=failures&includeKey=jobId" - ) - ), as = "parsed") - if (is.list(cromfail$calls) == T) { - bobfail <- purrr::pluck(cromfail, "calls") - if (length(bobfail) > 0) { - faildf <- purrr::map(bobfail, function(callData) { - purrr::map_dfr(callData, function(shardData) { - Z <- data.frame(rbind(unlist(shardData)), stringsAsFactors = F) - }) - }) %>% purrr::map_dfr(., function(x) { - x - }, .id = "callName") - faildf$workflow_id <- workflow_id - # this section creates a URL for where the stderr log for the failed jobs likely are. - # This is hardcoded for ALP right now b/c it's not part of what Cromwell returns. - temp1 <- data.frame(do.call('rbind',strsplit(faildf$callName, split = "[.]"))) - colnames(temp1)<- c("workflowName", "call") - faildf <- cbind(faildf, temp1) - faildf$stderrPrefix <- paste0("cromwell-output/", - faildf$workflowName,"/", faildf$workflow_id, "/call-", faildf$call, - "/shard-", faildf$shardIndex, "/", faildf$call, "-", faildf$shardIndex, - "-stderr.log") - - if ("failures.message" %in% colnames(faildf)) { - faildf <- dplyr::filter(faildf, is.na(failures.message) == F) - } else { - faildf <- faildf[0,] - } - } else { - faildf <- - data.frame("workflow_id" = "No failure metadata available.", stringsAsFactors = F) - } - } else { - faildf <- - data.frame("workflow_id" = "No failure metadata available.", stringsAsFactors = F) - } - return(faildf) -} - -#' Pull Cromwell Call Caching Data -#' -#' Gets info about call caching status for the calls of a workflow -#' -#' @param workflow_id The workflow ID to return call caching metadata for. -#' @param expandSubWorkflows Boolean, whether to expand subworkflows in the results or not, default is F. -#' @return Returns a long form data frame of metadata on call caching in a workflow. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' ## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -#' setCreds(tokenSet = "file", path = "~/R/requiredCredentials.R") -#' ## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -#' recentJobs <- cromwellJobs(days = 7) -#' ## Request workflow metadata for a specific job that was run in your Cromwell instance. -#' thisWorkflowID <- recentJobs$workflow_id[1] -#' cacheMeta <- cromwellCache(workflow_id = thisWorkflowID) -#' @export -cromwellCache <- function(workflow_id, expandSubWorkflows = F) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else { - print(paste0( - "Querying for call caching metadata for workflow id: ", - workflow_id - )) - } - if (expandSubWorkflows == F) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=false" - ) - ), as = "parsed") - } - if (expandSubWorkflows == T) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=true" - ) - ), as = "parsed") - } - - if (length(crommetadata$calls) > 0) { - # if there are calls to be queried, continue - bobCalls <- - purrr::pluck(crommetadata, "calls") # we only want the calls data from the metadata for this workflow - bobCallMeta <- - purrr::map(bobCalls, function(callData) { - # for each of the calls in the workflow... - purrr::map_dfr(callData , function(shardData) { - # and for each of the shards in that workflow... - if ("inputs" %in% names(shardData) == T) { - a <- - purrr::keep(shardData, - names(shardData) %in% c("callCaching", "inputs", "outputs")) # select only these lists - b <- - data.frame(rbind(unlist(a)), stringsAsFactors = F) # flatten them and make them a data frame - b$shardIndex <- - shardData$shardIndex # add the shard Index associated - } else { - b <- - data.frame("shardIndex" = shardData$shardIndex, - stringsAsFactors = F) - } - b$shardIndex <- as.character(b$shardIndex) - b$executionStatus <- shardData$executionStatus # and this - b$returnCode <- shardData$returnCode # and this - #b$returnCode <- as.character(b$returnCode) - b$jobId <- shardData$jobId # and especially this - b <- - b %>% dplyr::select(-dplyr::starts_with("callCaching.hitFailures")) # then remove any data from the messy hitFailures lists - return(b) - }) - }) - geocache <- purrr::map_dfr(bobCallMeta, rbind, .id = "callName") - } else { - geocache <- - data.frame("workflow_id" = "No call caching metadata available.", stringsAsFactors = F) - } - return(geocache) -} - -#' Pull a glob of metadata for a specific Cromwell workflow job -#' -#' Retrieve a glob of workflow level metadata for a specific workflow. -#' -#' @param workflow_id The workflow ID to return metadata for. -#' @param expandSubWorkflows Boolean, whether to expand subworkflows in the results or not, default is F. -#' @return Returns a gross list of lists of metadata on a workflow. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' ## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -#' setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -#' ## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -#' recentJobs <- cromwellJobs(days = 7) -#' ## Request workflow metadata for a specific job that was run in your Cromwell instance. -#' thisWorkflowID <- recentJobs$workflow_id[1] -#' workflowMeta <- cromwellGlob(workflow_id = thisWorkflowID) -#' @export -cromwellGlob <- function(workflow_id, expandSubWorkflows = F) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else { - print(paste0("Querying for metadata for workflow id: ", workflow_id)) - } - if (expandSubWorkflows == F) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=false" - ) - ), as = "parsed") - } - if (expandSubWorkflows == T) { - crommetadata <- - httr::content(httr::GET( - paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/metadata?expandSubWorkflows=true" - ) - ), as = "parsed") - } - return(crommetadata) -} - - -# ## Mongodb query for AWS Batch -# batchQuery <- function(callDat) { -# require(mongolite); require(dplyr) -# a <- mongo(collection = "events", url = mongoBatchURL, verbose = TRUE) -# awsBatchMeta <- a$find(query = '{"jobQueue":"arn:aws:batch:us-west-2:064561331775:job-queue/cromwell-1999"}', -# fields = '{"jobName":1, "jobId":1,"status":1, "timestamp":1, "statusReason":1}') -# awsBatchMeta <- awsBatchMeta %>% group_by(jobId) %>% arrange(desc(timestamp)) -# batchDat <- left_join(awsBatchMeta, callDat) -# #mostRecentBatch <<- awsBatchMeta %>% select(-"_id") %>% group_by(jobName, jobId) %>% -# # filter(timestamp == max(timestamp)) %>% arrange(desc(timestamp)) -# return(batchDat) -# } diff --git a/R/cromwellmisc.R b/R/cromwellmisc.R deleted file mode 100644 index bf09b46..0000000 --- a/R/cromwellmisc.R +++ /dev/null @@ -1,96 +0,0 @@ -#' Get a timing diagram for a Cromwell workflow -#' -#' -#' @param workflow_id Unique workflow id of the job. -#' @return Opens a timing diagram in a browser -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellTiming <- function(workflow_id) { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Getting timing diagram from Cromwell.") - utils::browseURL(paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/", - workflow_id, - "/timing" - )) -} -#' Get the version of a Cromwell server -#' -#' -#' @return Cromwell version -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellVersion <- function() { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Getting timing diagram from Cromwell.") - httr::content(httr::GET(paste0( - Sys.getenv("CROMWELLURL"), - "/engine/v1/version" - ))) -} - -#' Validates a workflow for submission -#' -#' -#' @param WDL Local path to the wdl file describing the workflow. (Required) -#' @param allInputs Local path to the json containing ALL the inputs the parameters to use with the workflow - if a batch and parameters json are present they must first be combined. (Optional) -#' @return Returns the response from the API post which includes the workflow ID that you'll need to monitor the job. -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -womtoolValidate <- - function(WDL, allInputs=NULL) { - if("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Validating a workflow for Cromwell.") - - bodyList <- list(workflowSource = httr::upload_file(WDL)) - if(is.null(allInputs) == F) bodyList <- c(bodyList, workflowInputs = list(httr::upload_file(allInputs))) - - cromDat <- - httr::POST( - url = paste0(Sys.getenv("CROMWELLURL"), "/api/womtool/v1/describe"), - body = bodyList, - encode = "multipart" - ) - cromResponse <-httr::content(cromDat) - return(cromResponse) - } - -#' Get the available backends of a Cromwell server -#' -#' -#' @return Cromwell backend options -#' @author Amy Paguirigan -#' @details -#' Requires valid Cromwell URL to be set in the environment. -#' @examples -#' TBD -#' @export -cromwellBackends <- function() { - if ("" %in% Sys.getenv("CROMWELLURL")) { - stop("CROMWELLURL is not set.") - } else - print("Getting backend options from Cromwell.") - httr::content(httr::GET(paste0( - Sys.getenv("CROMWELLURL"), - "/api/workflows/v1/backends" - ))) -} diff --git a/man/cromwellAbort.Rd b/man/cromwellAbort.Rd deleted file mode 100644 index 310dd28..0000000 --- a/man/cromwellAbort.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwelljobmanagement.R -\name{cromwellAbort} -\alias{cromwellAbort} -\title{Abort a workflow job on Cromwell} -\usage{ -cromwellAbort(workflow_id) -} -\arguments{ -\item{workflow_id}{Unique workflow id of the job you wish to kill.} -} -\value{ -Returns the response from the API post -} -\description{ -Aborts any given workflow job on Cromwell. -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellBackends.Rd b/man/cromwellBackends.Rd deleted file mode 100644 index 175891c..0000000 --- a/man/cromwellBackends.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmisc.R -\name{cromwellBackends} -\alias{cromwellBackends} -\title{Get the available backends of a Cromwell server} -\usage{ -cromwellBackends() -} -\value{ -Cromwell backend options -} -\description{ -Get the available backends of a Cromwell server -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellCache.Rd b/man/cromwellCache.Rd deleted file mode 100644 index 41f4cd7..0000000 --- a/man/cromwellCache.Rd +++ /dev/null @@ -1,34 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmetadata.R -\name{cromwellCache} -\alias{cromwellCache} -\title{Pull Cromwell Call Caching Data} -\usage{ -cromwellCache(workflow_id, expandSubWorkflows = F) -} -\arguments{ -\item{workflow_id}{The workflow ID to return call caching metadata for.} - -\item{expandSubWorkflows}{Boolean, whether to expand subworkflows in the results or not, default is F.} -} -\value{ -Returns a long form data frame of metadata on call caching in a workflow. -} -\description{ -Gets info about call caching status for the calls of a workflow -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -setCreds(tokenSet = "file", path = "~/R/requiredCredentials.R") -## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -recentJobs <- cromwellJobs(days = 7) -## Request workflow metadata for a specific job that was run in your Cromwell instance. -thisWorkflowID <- recentJobs$workflow_id[1] -cacheMeta <- cromwellCache(workflow_id = thisWorkflowID) -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellCall.Rd b/man/cromwellCall.Rd deleted file mode 100644 index f7b212d..0000000 --- a/man/cromwellCall.Rd +++ /dev/null @@ -1,34 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmetadata.R -\name{cromwellCall} -\alias{cromwellCall} -\title{Pull metadata for the calls made in a Cromwell workflow job} -\usage{ -cromwellCall(workflow_id, expandSubWorkflows = F) -} -\arguments{ -\item{workflow_id}{The workflow ID to return call metadata on.} - -\item{expandSubWorkflows}{Boolean, whether to expand subworkflows in the results or not, default is F.} -} -\value{ -Returns a long form data frame of metadata on calls. -} -\description{ -Retrieve and process call metadata for a specific workflow. -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -recentJobs <- cromwellJobs(days = 7) -## Request workflow metadata for a specific job that was run in your Cromwell instance. -thisWorkflowID <- recentJobs$workflow_id[1] -callsMeta <- cromwellCall(workflow_id = thisWorkflowID) -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellFailures.Rd b/man/cromwellFailures.Rd deleted file mode 100644 index df569fe..0000000 --- a/man/cromwellFailures.Rd +++ /dev/null @@ -1,32 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmetadata.R -\name{cromwellFailures} -\alias{cromwellFailures} -\title{Pull metadata for the failed calls made in a Cromwell workflow job} -\usage{ -cromwellFailures(workflow_id) -} -\arguments{ -\item{workflow_id}{The workflow ID to return call failure metadata for.} -} -\value{ -Returns a long form data frame of metadata on failed calls in a workflow. -} -\description{ -Gets info about failed calls for a specific workflow -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -recentJobs <- cromwellJobs(days = 7) -## Request workflow metadata for a specific job that was run in your Cromwell instance. -thisWorkflowID <- recentJobs$workflow_id[1] -failsMeta <- cromwellFailures(workflow_id = thisWorkflowID) -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellGlob.Rd b/man/cromwellGlob.Rd deleted file mode 100644 index 8a4f11e..0000000 --- a/man/cromwellGlob.Rd +++ /dev/null @@ -1,34 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmetadata.R -\name{cromwellGlob} -\alias{cromwellGlob} -\title{Pull a glob of metadata for a specific Cromwell workflow job} -\usage{ -cromwellGlob(workflow_id, expandSubWorkflows = F) -} -\arguments{ -\item{workflow_id}{The workflow ID to return metadata for.} - -\item{expandSubWorkflows}{Boolean, whether to expand subworkflows in the results or not, default is F.} -} -\value{ -Returns a gross list of lists of metadata on a workflow. -} -\description{ -Retrieve a glob of workflow level metadata for a specific workflow. -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -recentJobs <- cromwellJobs(days = 7) -## Request workflow metadata for a specific job that was run in your Cromwell instance. -thisWorkflowID <- recentJobs$workflow_id[1] -workflowMeta <- cromwellGlob(workflow_id = thisWorkflowID) -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellJobs.Rd b/man/cromwellJobs.Rd deleted file mode 100644 index cbc0938..0000000 --- a/man/cromwellJobs.Rd +++ /dev/null @@ -1,29 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmetadata.R -\name{cromwellJobs} -\alias{cromwellJobs} -\title{Pull information about recent Cromwell workflow jobs} -\usage{ -cromwellJobs(days = 1) -} -\arguments{ -\item{days}{The number of days of history to return, defaults to 1 day.} -} -\value{ -Returns a long form data frame of metadata on workflow jobs submitted to a specific Cromwell instance. -} -\description{ -Requests metadata about Cromwell workflow jobs during a time period specified. -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -recentJobs <- cromwellJobs(days = 7) -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellLogs.Rd b/man/cromwellLogs.Rd deleted file mode 100644 index 9947c91..0000000 --- a/man/cromwellLogs.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwelljobmanagement.R -\name{cromwellLogs} -\alias{cromwellLogs} -\title{Gets logs for a workflow in Cromwell} -\usage{ -cromwellLogs(workflow_id) -} -\arguments{ -\item{workflow_id}{Unique workflow id of the job.} -} -\value{ -Returns the response from the API post -} -\description{ -Gets logs for a workflow in Cromwell -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellOutputs.Rd b/man/cromwellOutputs.Rd deleted file mode 100644 index a4f9afa..0000000 --- a/man/cromwellOutputs.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwelljobmanagement.R -\name{cromwellOutputs} -\alias{cromwellOutputs} -\title{Gets outputs for a workflow in Cromwell} -\usage{ -cromwellOutputs(workflow_id) -} -\arguments{ -\item{workflow_id}{Unique workflow id of the job.} -} -\value{ -Returns the response from the API post -} -\description{ -Gets outputs for a workflow in Cromwell -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellSubmitBatch.Rd b/man/cromwellSubmitBatch.Rd deleted file mode 100644 index 6a27a51..0000000 --- a/man/cromwellSubmitBatch.Rd +++ /dev/null @@ -1,37 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwelljobmanagement.R -\name{cromwellSubmitBatch} -\alias{cromwellSubmitBatch} -\title{Submit a workflow job to Cromwell} -\usage{ -cromwellSubmitBatch(WDL, Params, Batch = NULL, Options = NULL, - Labels = NULL, Dependencies = NULL) -} -\arguments{ -\item{WDL}{Local path to the wdl file describing the workflow. (Required)} - -\item{Params}{Local path to the json containing the parameters to use with the workflow. (Optional)} - -\item{Batch}{Local path to the json containing a reference to any batch file desired if the workflow is a batch. (Required)} - -\item{Options}{Local path to the json containing workflow options to apply.(Optional)} - -\item{Labels}{A data frame containing the labels for this workflow.(Optional)} - -\item{Dependencies}{A zip'd file of subworkflow dependencies. (Optional)} -} -\value{ -Returns the response from the API post which includes the workflow ID that you'll need to monitor the job. -} -\description{ -Supports the submission of a fully defined workflow job to a Cromwell instance. -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellTiming.Rd b/man/cromwellTiming.Rd deleted file mode 100644 index 54c70a5..0000000 --- a/man/cromwellTiming.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmisc.R -\name{cromwellTiming} -\alias{cromwellTiming} -\title{Get a timing diagram for a Cromwell workflow} -\usage{ -cromwellTiming(workflow_id) -} -\arguments{ -\item{workflow_id}{Unique workflow id of the job.} -} -\value{ -Opens a timing diagram in a browser -} -\description{ -Get a timing diagram for a Cromwell workflow -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellVersion.Rd b/man/cromwellVersion.Rd deleted file mode 100644 index 88eae52..0000000 --- a/man/cromwellVersion.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmisc.R -\name{cromwellVersion} -\alias{cromwellVersion} -\title{Get the version of a Cromwell server} -\usage{ -cromwellVersion() -} -\value{ -Cromwell version -} -\description{ -Get the version of a Cromwell server -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -} diff --git a/man/cromwellWorkflow.Rd b/man/cromwellWorkflow.Rd deleted file mode 100644 index 842eb06..0000000 --- a/man/cromwellWorkflow.Rd +++ /dev/null @@ -1,34 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmetadata.R -\name{cromwellWorkflow} -\alias{cromwellWorkflow} -\title{Pull metadata for a specific Cromwell workflow job} -\usage{ -cromwellWorkflow(workflow_id, expandSubWorkflows = F) -} -\arguments{ -\item{workflow_id}{The workflow ID to return metadata for.} - -\item{expandSubWorkflows}{Boolean, whether to expand subworkflows in the results or not, default is F.} -} -\value{ -Returns a long form data frame of metadata on a workflow. -} -\description{ -Retrieve and process all labels, submission and workflow level metadata for a specific workflow. -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -## Set credentials from a file with the specified format, called `secrets.R` in path `~/myCreds/`. -setCreds(tokenSet = "file", path = "~/myCreds/secrets.R") -## Request what jobs have been submitted to your Cromwell instance in the past 7 days. -recentJobs <- cromwellJobs(days = 7) -## Request workflow metadata for a specific job that was run in your Cromwell instance. -thisWorkflowID <- recentJobs$workflow_id[1] -workflowMeta <- cromwellWorkflow(workflow_id = thisWorkflowID) -} -\author{ -Amy Paguirigan -} diff --git a/man/womtoolValidate.Rd b/man/womtoolValidate.Rd deleted file mode 100644 index b858430..0000000 --- a/man/womtoolValidate.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cromwellmisc.R -\name{womtoolValidate} -\alias{womtoolValidate} -\title{Validates a workflow for submission} -\usage{ -womtoolValidate(WDL, allInputs = NULL) -} -\arguments{ -\item{WDL}{Local path to the wdl file describing the workflow. (Required)} - -\item{allInputs}{Local path to the json containing ALL the inputs the parameters to use with the workflow - if a batch and parameters json are present they must first be combined. (Optional)} -} -\value{ -Returns the response from the API post which includes the workflow ID that you'll need to monitor the job. -} -\description{ -Validates a workflow for submission -} -\details{ -Requires valid Cromwell URL to be set in the environment. -} -\examples{ -TBD -} -\author{ -Amy Paguirigan -}