plot_flow: Plot a clean and scalable flowchart describing the (work)flow

Description Usage Arguments Examples

View source: R/plot.R

Description

Plot a flowchart using a flow object or flowdef

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
plot_flow(x, ...)

## S3 method for class 'flow'
plot_flow(x, ...)

## S3 method for class 'list'
plot_flow(x, ...)

## S3 method for class 'character'
plot_flow(x, ...)

## S3 method for class 'flowdef'
plot_flow(x, detailed = TRUE, type = c("1", "2"), pdf = FALSE, pdffile, ...)

## S3 method for class 'flowdef'
plot(x, detailed = TRUE, type = c("1", "2"), pdf = FALSE, pdffile, ...)

## S3 method for class 'flow'
plot(x, ...)

Arguments

x

Object of class flow, or a list of flow objects or a flowdef

...

experimental and only for advanced use.

detailed

include submission and dependency types in the plot [TRUE]

type

1 is original, and 2 is a ellipse with less details [1]

pdf

create a pdf instead of plotting interactively [FALSE]

pdffile

output file name for the pdf file. [flow_path/flow_details.pdf]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
qobj = queue(type="lsf")
cmds = rep("sleep 5", 10)
jobj1 <- job(q_obj=qobj, cmd = cmds, submission_type = "scatter", name = "job1")
jobj2 <- job(q_obj=qobj, name = "job2", cmd = cmds, submission_type = "scatter",
             dependency_type = "serial", previous_job = "job1")
fobj <- flow(jobs = list(jobj1, jobj2))
plot_flow(fobj)

### Gather: many to one relationship
jobj1 <- job(q_obj=qobj, cmd = cmds, submission_type = "scatter", name = "job1")
jobj2 <- job(q_obj=qobj, name = "job2", cmd = cmds, submission_type = "scatter",
             dependency_type = "gather", previous_job = "job1")
fobj <- flow(jobs = list(jobj1, jobj2))
plot_flow(fobj)

### Burst: one to many relationship
jobj1 <- job(q_obj=qobj, cmd = cmds, submission_type = "serial", name = "job1")
jobj2 <- job(q_obj=qobj, name = "job2", cmd = cmds, submission_type = "scatter",
             dependency_type = "burst", previous_job = "job1")
fobj <- flow(jobs = list(jobj1, jobj2))
plot_flow(fobj)

sahilseth/flowr documentation built on March 20, 2021, 8:44 a.m.