link {sevenbridges} | R Documentation

## link two nodes to form a new Workflow

### Description

link two nodes to form a new Workflow

### Usage

    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

    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")

[Package sevenbridges version 1.8.1 Index]