cwl-requirements: CWL requirements functions

cwl-requirementsR Documentation

CWL requirements functions

Description

requireDocker: If a workflow component should be run in a Docker container, this function specifies how to fetch or build the image.

requireJS: Indicates that the workflow platform must support inline Javascript expressions. If this requirement is not present, the workflow platform must not perform expression interpolatation.

requireSoftware: A list of software packages that should be configured in the environment of the defined process.

SoftwarePackage from anaconda.

InitialWorkDirRequirement: Define a list of files and subdirectories that must be created by the workflow platform in the designated output directory prior to executing the command line tool.

: Dirent: Define a file or subdirectory that must be placed in the designated output directory prior to executing the command line tool. May be the result of executing an expression, such as building a configuration file from a template.

Create manifest for configure files.

requireShellScript: create shell script to work dir.

CondaTool: create dockerfile for tools.

requireNetwork: Whether a process requires network access.

Usage

requireDocker(
  docker = NULL,
  Load = NULL,
  File = NULL,
  Import = NULL,
  ImageId = NULL,
  OutputDir = NULL
)

requireJS(expressionLib = list())

requireSoftware(packages = list())

condaPackage(package, source = "bioconda", version = NULL)

requireInitialWorkDir(listing = list())

Dirent(entryname = character(), entry, writable = FALSE)

requireManifest(inputID, sep = "\\n")

requireSubworkflow()

requireScatter()

requireMultipleInput()

requireStepInputExpression()

requireEnvVar(envlist)

requireRscript(rscript)

requireResource(
  coresMin = NULL,
  coresMax = NULL,
  ramMin = NULL,
  ramMax = NULL,
  tmpdirMin = NULL,
  tmpdirMax = NULL,
  outdirMin = NULL,
  outdirMax = NULL
)

requireShellCommand()

requireShellScript(script)

ShellScript(shell = "bash", script = "script.sh")

CondaTool(tools)

requireNetwork(networkAccess = TRUE)

Arguments

docker

Character. Specify a Docker image to retrieve using docker pull.

Load

Character. Specify a HTTP URL from which to download a Docker image using docker load.

File

Character. Supply the contents of a Dockerfile which will be built using docker build.

Import

Character. Provide HTTP URL to download and gunzip a Docker images using 'docker import.

ImageId

Character. The image id that will be used for docker run. May be a human-readable image name or the image identifier hash. May be skipped if dockerPull is specified, in which case the dockerPull image id must be used.

OutputDir

Character. Set the designated output directory to a specific location inside the Docker container.

expressionLib

optional list. Additional code fragments that will also be inserted before executing the expression code. Allows for function definitions that may be called from CWL expressions.

packages

The list of software to be configured.

package

The software name.

source

The source of software in anaconda. 'bioconda' is used by default.

version

The version of software.

listing

The list of files or subdirectories that must be placed in the designated output directory prior to executing the command line tool.

entryname

Character or Expression. The name of the file or subdirectory to create in the output directory. The name of the file or subdirectory to create in the output directory. If entry is a File or Directory, the entryname field overrides the value of basename of the File or Directory object. Optional.

entry

Charactor or expression. Required.

writable

Logical. If true, the file or directory must be writable by the tool. Changes to the file or directory must be isolated and not visible by any other CommandLineTool process. Default is FALSE (files and directories are read-only). Optional.

inputID

The input ID from corresponding 'InputParam'.

sep

The separator of the input files in the manifest config.

envlist

A list of environment variables.

rscript

An R script to run.

coresMin

Minimum reserved number of CPU cores (default is 1).

coresMax

Maximum reserved number of CPU cores.

ramMin

Minimum reserved RAM in mebibytes (2**20) (default is 256).

ramMax

Maximum reserved RAM in mebibytes (2**20)

tmpdirMin

Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024).

tmpdirMax

Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20).

outdirMin

Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024).

outdirMax

Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20).

script

script.sh

shell

Default shell.

tools

A character vector for tools to install by conda.

networkAccess

TRUE or FALSE.

Details

More details about 'requireDocker', see: https://www.commonwl.org/v1.0/CommandLineTool.html#DockerRequirement

More details about 'requireJS', see: https://www.commonwl.org/v1.0/CommandLineTool.html#InlineJavascriptRequirement

More details about 'requireSoftware', see: https://www.commonwl.org/v1.0/CommandLineTool.html#SoftwareRequirement

More details about 'requireSoftware', see: https://www.commonwl.org/v1.0/CommandLineTool.html#SoftwarePackage

More details about 'requireInitialWorkDir', See: https://www.commonwl.org/v1.0/CommandLineTool.html#InitialWorkDirRequirement

More details about 'Dirent', See:https://www.commonwl.org/v1.0/CommandLineTool.html#Dirent

Value

requireDocker: A list of docker requirement to fetch or build the image.

requireJS: A list of inline Javascript requirement.

requireSoftware: A list of software requirements.

A list of software package.

requireInitialWorkDir: A list of initial work directory requirements.

Dirent: A list.

requireSubworkflow: A SubworkflowFeatureRequirement list.

rquireScatter: A ScatterFeatureRequirement list.

requireMultipleInput: A MultipleInputFeatureRequirement list.

requireStepInputExpression: A StepInputExpressionRequirement list.

requireEnvVar: A EnvVarRequirementlist.

A requirement list with Rscript as manifest entry.

ResourceRequirement: A ResourceRequirement list.

ShellCommandRequirement: A ShellCommandRequirement list.

requireShellScript: Initial directory with shell script.

baseCommand for shell script

CondaTool: Dockerfile

requireNetwork: a list of NetworkAccess requirement.

Examples

p1 <- InputParam(id = "ifiles", type = "File[]?", position = -1)
CAT <- cwlProcess(baseCommand = "cat",
       requirements = list(requireDocker("alpine"), requireManifest("ifiles"), requireJS()),
       arguments = list("ifiles"),
       inputs = InputParamList(p1))


rworkflow/Rcwl documentation built on May 10, 2024, 6:21 a.m.