batch function for task batch execution

batch(input = NULL, criteria = NULL, type = c("ITEM", "CRITERIA"))

Arguments

input

character, ID of the input on which you wish to batch on. You would usually batch on the input containing a list of files. If left out, default batching criteria defined in the app is used.

criteria

a character vector, for example. c("metadata.sample_id", "metadata.library_id"). The meaning of the above batch_by dictionary is - group inputs (usually files) first on sample ID and then on library ID. If NULL, using type "ITEM" by default.

type

Criteria on which to batch on - can be in two formats."ITEM" and "CRITERIA". If you wish to batch per item in the input (usually a file) using "ITEM". If you wish a more complex criteria, specify the "CRITERIA" on which you wish to group inputs on. Please check examples.

Value

a list of 'batch_input' and 'batch_by' used for task batch

Examples

batch(input = "fastq") # by ITEM
#> $batch_input #> [1] "fastq" #> #> $batch_by #> $batch_by$type #> [1] "ITEM" #> #>
batch(input = "fastq", c("metadata.sample_id", "metadata.library_id"))
#> criteria provided, convert type from ITEM to CRITERIA
#> $batch_input #> [1] "fastq" #> #> $batch_by #> $batch_by$type #> [1] "CRITERIA" #> #> $batch_by$criteria #> [1] "metadata.sample_id" "metadata.library_id" #> #>
# shorthand for this batch(input = "fastq", c("metadata.sample_id", "metadata.library_id"), type = "CRITERIA")
#> $batch_input #> [1] "fastq" #> #> $batch_by #> $batch_by$type #> [1] "CRITERIA" #> #> $batch_by$criteria #> [1] "metadata.sample_id" "metadata.library_id" #> #>