Learn R Programming

sevenbridges (version 1.2.4)

SBGWorkflow-class: Build workflow

Description

Build workflow

Usage

Flow(..., graph = TRUE, x.width = 1000, y.width = 400, x.start = 100, y.start = 200, canvas_zoom = 1, canvas_x = 40, canvas_y = 130)
"+"(e1, e2)
"+"(e1, e2)
"+"(e1, e2)
"+"(e1, e2)
"+"(e1, e2)
e1 %>>% e2
"%>>%"(e1, e2)
"%>>%"(e1, e2)
"%>>%"(e1, e2)
"%>>%"(e1, e2)
"%>>%"(e1, e2)

Arguments

...
extra arguments passed to SBGWorkflow
graph
if add graph coordinates or not, used for visualization on seven bridges platform.
x.width
x scale width
y.width
y scale width
x.start
node x start point for a flow
y.start
node y start point for a flow
canvas_zoom
zoom factor
canvas_x
canvas x
canvas_y
canvas y
e1
either Tool App or Workflow object
e2
either Tool App or Workflow object

Value

a SBGWorkflow object.

Methods

get_input(ids, force = FALSE)
get input by pure input id from all steps
get_input_exposed()
exposed input id other than file
get_input_node()
get input file nodes id
get_output(ids, force = FALSE)
get output by pure output id from all steps
get_output_node()
get output file nodes id
linked_input_id()
input id that linked to an output
linked_output_id()
output id that linked to an input
run(run_inputs = list(), engine = c("bunny", "rabix", "cwlrun"))
run this tool with inputs locally. engine supported: bunny, rabix, cwlrun. inputs accept list or json
set_required(ids, required = TRUE)
require full input id (with tool id prefix)

Examples

Run this code
f1 = system.file("extdata/app", "flow_star.json", package = "sevenbridges")
f1 = convert_app(f1)
## flow inputs
f1$input_type()
## flow outouts
f1$output_type()
## flow input id
f1$input_id()
## linked input id
f1$linked_input_id()
## flow output id
f1$output_id()
## linked output id
f1$linked_output_id()
## link_map
f1$link_map()
## all step input id
f1$step_input_id()
## all step input full id with type
f1$step_input_id(TRUE)
## all step output id
f1$step_output_id()
## all step output full id with type
f1$step_output_id(TRUE)
## get inputs objects
f1$get_input("#clip3pNbases")
f1$get_input(c("#clip3pNbases", "#chimScoreMin"))
f1$get_input(c("#clip3pNbases", "#chimScoreMin", "#STAR.outFilterMismatchNoverLmax"))
## get outputs objects
f1$get_output("#log_files")
f1$get_output(c("#log_files", "intermediate_genome"))
f1$get_output(c("#log_files", "intermediate_genome", "#STAR.unmapped_reads"))
f1$get_output("#log_files")
## set flow input
f1$set_flow_input("#SBG_FASTQ_Quality_Detector.fastq")
f1$set_flow_output(c("#log_files", "intermediate_genome"))
## get required node
f1$get_required()
## set required node
f1$steps[[1]]$run$set_required("genomeChrBinNbits")
f1$get_required()
f1$steps[[1]]$run$set_required("genomeChrBinNbits", FALSE)
f1$get_required()
## get Tool object from Flow by id and name
f1$list_tool()
## return two
f1$get_tool("STAR")
## return one
f1$get_tool("^STAR$")
## get included input ports
f1$get_input_port()
## set included input ports
f1$set_input_port(c("#STAR.alignSJDBoverhangMin", "chimScoreSeparation"))
f1$get_input_port()
f1$set_input_port(c("#STAR.alignSJDBoverhangMin", "chimScoreSeparation"), FALSE)
f1$get_input_port()
f1$get_input_node()
f1$get_output_node()
f1$get_input_exposed()
f1$step_input_id(TRUE)
f1$input_id()
f1$set_flow_input("#STAR.reads")
f1$input_id()

Run the code above in your browser using DataLab