Visualize the CWL workflow

visualize_graph(
  g,
  hierarchical = TRUE,
  direction = "LR",
  separation = 300,
  palette = c("#C3C3C3", "#FF8F00", "#00AAA8"),
  width = "100%",
  height = 600
)

Arguments

g

Graph generated by get_graph.

hierarchical

Enable the hierarchical layout? Default is TRUE.

direction

Direction of the hierarchical layout. Options include "LR", "RL", "UD", and "DU" (up-down, down-up, left-right, right-left). Default is "LR".

separation

Level separation parameter from visHierarchicalLayout.

palette

Three-color palette for inputs, outputs, and steps.

width

Canvas width, see visNetwork. Default is "100%".

height

Canvas height, see visNetwork. Default is 600.

Value

A visNetwork output.

Examples

flow <- system.file("cwl/sbg/workflow/gatk4-wgs.json", package = "tidycwl") %>% read_cwl_json()
get_graph(
  flow %>% parse_inputs(),
  flow %>% parse_outputs(),
  flow %>% parse_steps()
) %>% visualize_graph()
#> Error in x$width %||% settings$fig.width * settings$dpi: non-numeric argument to binary operator