inst/doc/tidycwl.R

## ----include=FALSE------------------------------------------------------------
knitr::opts_chunk$set(comment = "")

## -----------------------------------------------------------------------------
library("tidycwl")

## -----------------------------------------------------------------------------
flow <- system.file("cwl/sbg/workflow/gatk4-wgs.json", package = "tidycwl") %>%
  read_cwl_json()
flow

## -----------------------------------------------------------------------------
flow %>%
  parse_inputs() %>%
  names()

flow %>%
  parse_outputs() %>%
  names()

flow %>%
  parse_steps() %>%
  names()

## -----------------------------------------------------------------------------
flow %>%
  parse_steps() %>%
  get_steps_label()

## -----------------------------------------------------------------------------
get_graph(
  flow %>% parse_inputs(),
  flow %>% parse_outputs(),
  flow %>% parse_steps()
) %>% str()

## ---- screenshot.force=FALSE--------------------------------------------------
if (rmarkdown::pandoc_available("1.12.3")) {
  get_graph(
    flow %>% parse_inputs(),
    flow %>% parse_outputs(),
    flow %>% parse_steps()
  ) %>% visualize_graph()
}

Try the tidycwl package in your browser

Any scripts or data that you put into this service are public.

tidycwl documentation built on May 3, 2022, 9:07 a.m.