link two nodes to form a new Workflow
Usage
link(from, to, ...)
# S4 method for Tool,Tool
link(
from,
to,
id1,
id2,
flow_id = NULL,
flow_label = NULL,
flow_input = NULL,
flow_output = NULL
)
# S4 method for Tool,Workflow
link(
from,
to,
id1,
id2,
flow_id = NULL,
flow_label = NULL,
flow_input = NULL,
flow_output = NULL
)
# S4 method for Workflow,Tool
link(
from,
to,
id1,
id2,
flow_id = NULL,
flow_label = NULL,
flow_input = NULL,
flow_output = NULL
)
# S4 method for Workflow,Workflow
link(from, to, id1, id2)
# S4 method for App,ToolORWorkflow
link(from, to, id1, id2)
# S4 method for 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"
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)
#> $File...
#> $File...$from
#> id label type fileTypes full.name
#> 1 #output_fastq_files Output FASTQ files File... FASTQ #SBG_Unpack_FASTQs
#>
#> $File...$to
#> id label type required prefix
#> 1 #reads Read sequence File... TRUE <NA>
#> 95 #sjdbGTFfile Splice junction file File... FALSE <NA>
#> fileTypes full.name
#> 1 FASTA, FASTQ, FA, FQ, FASTQ.GZ, FQ.GZ, FASTQ.BZ2, FQ.BZ2 #STAR
#> 95 GTF, GFF, TXT #STAR
#>
#>
# link
f1 <- link(t1, t2, "output_fastq_files", "reads")
#> flow_input: #SBG_Unpack_FASTQs.input_archive_file / #STAR.sjdbGTFfile / #STAR.genome
#> flow_output: #STAR.aligned_reads / #STAR.transcriptome_aligned_reads / #STAR.reads_per_gene / #STAR.log_files / #STAR.splice_junctions / #STAR.chimeric_junctions / #STAR.unmapped_reads / #STAR.intermediate_genome / #STAR.chimeric_alignments
# link
f2 <- link(
t1, t2, "output_fastq_files", "reads",
flow_input = "#SBG_Unpack_FASTQs.input_archive_file",
flow_output = "#STAR.log_files"
)
#> flow_input: #SBG_Unpack_FASTQs.input_archive_file / #STAR.genome
#> flow_output: #STAR.log_files