link: link two nodes to form a new Workflow

Description Usage Arguments Details Value Examples

Description

link two nodes to form a new Workflow

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
link(from, to, ...)

## S4 method for signature 'Tool,Tool'
link(
  from,
  to,
  id1,
  id2,
  flow_id = NULL,
  flow_label = NULL,
  flow_input = NULL,
  flow_output = NULL
)

## S4 method for signature 'Tool,Workflow'
link(
  from,
  to,
  id1,
  id2,
  flow_id = NULL,
  flow_label = NULL,
  flow_input = NULL,
  flow_output = NULL
)

## S4 method for signature 'Workflow,Tool'
link(
  from,
  to,
  id1,
  id2,
  flow_id = NULL,
  flow_label = NULL,
  flow_input = NULL,
  flow_output = NULL
)

## S4 method for signature 'Workflow,Workflow'
link(from, to, id1, id2)

## S4 method for signature 'App,ToolORWorkflow'
link(from, to, id1, id2)

## S4 method for signature 'ToolORWorkflow,App'
link(from, to, id1, id2)

Arguments

from

either Tool App or Workflow object

to

either Tool App or Workflow object

...

more auguments

id1

id to be connected from the ouput of the first node

id2

id id to be connected from the input of the second first node

flow_id

workflow id, if ignored, going to create one by joning tool id.

flow_label

workflow label, if ignored, going to create one by joning tool labels.

flow_input

full flow input id, e.g. "#SBG_Unpack_FASTQs.input_archive_file"

flow_output

full flow output id, e.g. "#STAR.log_files"

Details

Flexible enought to allow users to connect two objects by ids

Value

A Workflow object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
t1 <- system.file("extdata/app", "tool_unpack_fastq.json", package = "sevenbridges")
t2 <- system.file("extdata/app", "tool_star.json", package = "sevenbridges")
t1 <- convert_app(t1)
t2 <- convert_app(t2)
# check possible link
link_what(t1, t2)
# link
f1 <- link(t1, t2, "output_fastq_files", "reads")
# link
f2 <- link(
  t1, t2, "output_fastq_files", "reads",
  flow_input = "#SBG_Unpack_FASTQs.input_archive_file",
  flow_output = "#STAR.log_files"
)

sbg/sevenbridges-r documentation built on March 26, 2021, 3:33 p.m.