input_matrix {sevenbridges} | R Documentation

## Get input/output matrix out of JSON CWL file directly

### 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

    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

    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)

[Package sevenbridges version 1.24.0 Index]