input_output_matrix: Get input/output matrix out of JSON CWL file directly

Description Usage Arguments Value Examples

Description

An efficient way to access JSON file, no need to convert a JSON into a Tool or Flow object before access, directly operate on a list parsed from JSON file. Compare to convert_app, it is much faster.

Usage

1
2
3
4
5
6
7
input_matrix(
  from,
  new.order = c("id", "label", "type", "required", "prefix", "fileTypes"),
  required = NULL
)

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

Arguments

from

JSON file path

new.order

a vector of column orders by default for input it's "id", "label", "type", "required", "prefix", "fileTypes"; For output it's "id", "label", "type", "fileTypes"

required

logical value, show requried input node only or not.

Value

A data frame of input/output information.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
tool.in <- system.file("extdata/app", "tool_unpack_fastq.json", package = "sevenbridges")
flow.in <- system.file("extdata/app", "flow_star.json", package = "sevenbridges")
input_matrix(tool.in)
input_matrix(tool.in, required = TRUE)
input_matrix(flow.in)
input_matrix(flow.in, c("id", "type"))
input_matrix(flow.in, required = TRUE)
tool.in <- system.file("extdata/app", "tool_unpack_fastq.json", package = "sevenbridges")
flow.in <- system.file("extdata/app", "flow_star.json", package = "sevenbridges")
output_matrix(tool.in)
output_matrix(flow.in)

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