codeTool class extends CommandLineTool with more seven bridges flabored fields the SBG class. obj$toJSON(), obj$toJSON(pretty = TRUE) or obj$toYAML() will convert a Tool object into a text JSON/YAML file.

Value

a Tool object.

Fields

context

[character] by default: http://www.commonwl.org/draft-2/

owner

[list] a list of owner names.

contributor

[list] a list of contributor names.

Methods

copy_obj()

this is a hack to make copy of reference cwl object

get_input(name = NULL, id = NULL)

get input objects by names or id

get_input_port()

the inputs node with sbg:includeInPorts equals TRUE

get_output(name = NULL, id = NULL)

get output objects by names or id

get_required()

return required input fields types, names of them are input id

input_id(full = FALSE, requiredOnly = FALSE)

Get input id from a Tool, when full = TRUE, connect tool id with input id. e.g. If requiredOnly = TRUE, return required field only.

input_matrix( new.order = c("id", "label", "type", "required", "prefix", "fileTypes"), required = NULL )

This return a matrix of input parameters, by default, following the order id, label, type, required, prefix, fileTypes. new.order accept names of column you want to print, but it has to be a field of inputs. When its set to NULL, it prints all fields. When required = TRUE, only print required field.

input_type()

this return a vector of types, names of them are input id

output_id(full = FALSE)

Get output id from a Tool, when full = TRUE, connect tool id with input id.

output_matrix(new.order = c("id", "label", "type", "fileTypes"))

This return a matrix of output parameters, by default, following the order id, label, type, fileTypes. new.order accept names of column you want to print, but it has to be a field of outputs. When its set to NULL, it prints all fields. when required = TRUE, only print required field.

output_type()

this return a vector of types, names of them are output id

run(run_inputs = list(), engine = c("bunny", "rabix", "cwlrun"))

Run this tool with inputs locally. Engines supported: bunny, rabix, cwlrun. Inputs accept list or JSON.

set_input_port(ids, include = TRUE)

Set inputs ports field sbg:includeInPorts to the value of include, default is TRUE.

set_required(ids, required = TRUE)

Set an input node required or not required. The first parameter takes single input id or more than one ids. The second parameters required is the value you want to set to inputs. TRUE means set to required.

Examples