Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...


withName: 'process1|process2|process3' { scratch = '/scratch/' }
withName: 'process3' { stageInMode = 'copy' } // Copy the input files to scratch instead of symlinking to shared network diskprocess {
maxRetries = 4
errorStrategy = { sleep(task.attempt * 60000 as long); return'retry'} // Retry with increasing delay
}trace.enabled = true
trace.file = '.ica/user/trace-report.txt'
trace.fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem,peak_rss,peak_vmem,rchar,wchar,syscr,syscw,read_bytes,write_bytes,vol_ctxt,inv_ctxt,env,workdir,script,scratch,error_action'standard-smallResourceRequirementsrequirements:
ResourceRequirement:
ramMin: 10240
coresMin: 6requirements:
ResourceRequirement:
https://platform.illumina.com/rdf/ica/resources:type: fpga2
https://platform.illumina.com/rdf/ica/resources:size: medium
https://platform.illumina.com/rdf/ica/resources:tier: standardrequirements:
ResourceRequirement:
https://platform.illumina.com/rdf/ica/resources:type: himem
https://platform.illumina.com/rdf/ica/resources:size: small
https://platform.illumina.com/rdf/ica/resources:tier: economyicav2 projectpipelines start cwl cli-tutorial --data-id fil.a725a68301ee4e6ad28908da12510c25 --input-json '{
"ipFQ": {
"class": "File",
"path": "test.fastq"
},
"cwltool:overrides": {
"tool-fqTOfa.cwl": {
"requirements": {
"EnvVarRequirement": {
"envDef": {
"MESSAGE": "override_value"
}
}
}
}
}
}' --type-input JSON --user-reference overrides-example
process split {
cpus 1
memory '512 MB'
input:
path x
output:
path("split.*.tsv")
"""
split -a10 -d -l3 --numeric-suffixes=1 --additional-suffix .tsv ${x} split.
"""
}process sort {
cpus 1
memory '512 MB'
input:
path x
output:
path '*.sorted.tsv'
"""
sort -gk1,1 $x > ${x.baseName}.sorted.tsv
"""
}process merge {
cpus 1
memory '512 MB'
publishDir 'out', mode: 'move'
input:
path x
output:
path 'merged.tsv'
"""
cat $x > merged.tsv
"""
}nextflow.enable.dsl=2
include { sort } from './sort.nf'
include { split } from './split.nf'
include { merge } from './merge.nf'
params.myinput = "test.test"
workflow {
input_ch = Channel.fromPath(params.myinput)
split(input_ch)
sort(split.out.flatten())
merge(sort.out.collect())
}{
"fields": [
{
"id": "myinput",
"label": "myinput",
"type": "data",
"dataFilter": {
"dataType": "file",
"dataFormat": ["TSV"]
},
"maxValues": 1,
"minValues": 1
}
]
}function onSubmit(input) {
var validationErrors = [];
return {
'settings': input.settings,
'validationErrors': validationErrors
};
}function onRender(input) {
var validationErrors = [];
var validationWarnings = [];
if (input.currentAnalysisSettings === null) {
//null first time, to use it in the remainder of he javascript
input.currentAnalysisSettings = input.analysisSettings;
}
switch(input.context) {
case 'Initial': {
renderInitial(input, validationErrors, validationWarnings);
break;
}
case 'FieldChanged': {
renderFieldChanged(input, validationErrors, validationWarnings);
break;
}
case 'Edited': {
renderEdited(input, validationErrors, validationWarnings);
break;
}
default:
return {};
}
return {
'analysisSettings': input.currentAnalysisSettings,
'settingValues': input.settingValues,
'validationErrors': validationErrors,
'validationWarnings': validationWarnings
};
}
function renderInitial(input, validationErrors, validationWarnings) {
}
function renderEdited(input, validationErrors, validationWarnings) {
}
function renderFieldChanged(input, validationErrors, validationWarnings) {
}
function findField(input, fieldId){
var fields = input.currentAnalysisSettings['fields'];
for (var i = 0; i < fields.length; i++){
if (fields[i].id === fieldId) {
return fields[i];
}
}
return null;
}<pipeline code="" version="1.0" xmlns="xsd://www.illumina.com/ica/cp/pipelinedefinition">
<dataInputs>
</dataInputs>
<steps>
</steps>
</pipeline> <pd:dataInput code="in" format="TXT, CSV, FASTA" type="FILE" required="true" multiValue="false">
<pd:label>Input file</pd:label>
<pd:description>Input file can be either in TXT, CSV or FASTA format.</pd:description>
</pd:dataInput> <pd:dataInput code="fastq_folder" format="UNKNOWN" type="DIRECTORY" required="false" multiValue="false">
<pd:label>fastq folder path</pd:label>
<pd:description>Providing Fastq folder</pd:description>
</pd:dataInput><pd:dataInput code="tumor_fastqs" format="FASTQ" type="FILE" required="false" multiValue="true">
<pd:label>Tumor FASTQs</pd:label>
<pd:description>Tumor FASTQ files to be provided as input. FASTQ files must have "_LXXX" in its filename to denote the lane and "_RX" to denote the read number. If either is omitted, lane 1 and read 1 will be used in the FASTQ list. The tool will automatically write a FASTQ list from all files provided and process each sample in batch in tumor-only mode. However, for tumor-normal mode, only one sample each can be provided.
</pd:description>
</pd:dataInput> <pd:steps>
<pd:step execution="MANDATORY" code="General">
<pd:label>General</pd:label>
<pd:description>General parameters</pd:description>
<pd:tool code="generalparameters">
<pd:label>generalparameters</pd:label>
<pd:description></pd:description>
<pd:parameter code="inp1" minValues="1" maxValues="3" classification="USER">
<pd:label>inp1</pd:label>
<pd:description>first</pd:description>
<pd:stringType/>
<pd:value></pd:value>
</pd:parameter>
</pd:tool>
</pd:step>
</pd:steps><pd:parameter code="ht_seed_len" minValues="0" maxValues="1" classification="USER">
<pd:label>Seed Length</pd:label>
<pd:description>Initial length in nucleotides of seeds from the reference genome to populate into the hash table. Consult the DRAGEN manual for recommended lengths. Corresponds to DRAGEN argument --ht-seed-len.
</pd:description>
<pd:integerType minimumValue="10" maximumValue="50"/>
<pd:value>21</pd:value>
</pd:parameter><pd:parameter code="cnv_segmentation_mode" minValues="0" maxValues="1" classification="USER">
<pd:label>Segmentation Algorithm</pd:label>
<pd:description> DRAGEN implements multiple segmentation algorithms, including the following algorithms, Circular Binary Segmentation (CBS) and Shifting Level Models (SLM).
</pd:description>
<pd:optionsType>
<pd:option>CBS</pd:option>
<pd:option>SLM</pd:option>
<pd:option>HSLM</pd:option>
<pd:option>ASLM</pd:option>
</pd:optionsType>
<pd:value>false</pd:value>
</pd:parameter><pd:parameter code="output_format" minValues="1" maxValues="1" classification="USER">
<pd:label>Map/Align Output</pd:label>
<pd:description></pd:description>
<pd:optionsType>
<pd:option>BAM</pd:option>
<pd:option>CRAM</pd:option>
</pd:optionsType>
<pd:value>BAM</pd:value>
</pd:parameter><pd:parameter code="output_file_prefix" minValues="1" maxValues="1" classification="USER">
<pd:label>Output File Prefix</pd:label>
<pd:description></pd:description>
<pd:stringType/>
<pd:value>tumor</pd:value>
</pd:parameter><pd:parameter code="quick_qc" minValues="0" maxValues="1" classification="USER">
<pd:label>quick_qc</pd:label>
<pd:description></pd:description>
<pd:booleanType/>
<pd:value></pd:value>
</pd:parameter>nextflow.enable.dsl = 2
// Define parameters with default values
params.file = false
params.str = false
// Check that at least one of the parameters is specified
if (!params.file && !params.str) {
error "You must specify at least one input: --file or --str"
}
process printInputs {
container 'public.ecr.aws/lts/ubuntu:22.04'
pod annotation: 'scheduler.illumina.com/presetSize', value: 'standard-small'
input:
file(input_file)
script:
"""
echo "File contents:"
cat $input_file
"""
}
process printInputs2 {
container 'public.ecr.aws/lts/ubuntu:22.04'
pod annotation: 'scheduler.illumina.com/presetSize', value: 'standard-small'
input:
val(input_str)
script:
"""
echo "String input: $input_str"
"""
}
workflow {
if (params.file) {
file_ch = Channel.fromPath(params.file)
file_ch.view()
str_ch = Channel.empty()
printInputs(file_ch)
}
else {
file_ch = Channel.empty()
str_ch = Channel.of(params.str)
str_ch.view()
file_ch.view()
printInputs2(str_ch)
}
}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pd:pipeline xmlns:pd="xsd://www.illumina.com/ica/cp/pipelinedefinition" code="" version="1.0">
<pd:dataInputs>
<pd:dataInput code="file" format="TXT" type="FILE" required="false" multiValue="false">
<pd:label>in</pd:label>
<pd:description>Generic file input</pd:description>
</pd:dataInput>
</pd:dataInputs>
<pd:steps>
<pd:step execution="MANDATORY" code="general">
<pd:label>General Options</pd:label>
<pd:description locked="false"></pd:description>
<pd:tool code="general">
<pd:label locked="false"></pd:label>
<pd:description locked="false"></pd:description>
<pd:parameter code="str" minValues="0" maxValues="1" classification="USER">
<pd:label>String</pd:label>
<pd:description></pd:description>
<pd:stringType/>
<pd:value>string</pd:value>
</pd:parameter>
</pd:tool>
</pd:step>
</pd:steps>
</pd:pipeline>process foo {
// Assuming that params.compute_size is set to a valid size such as 'standard-small', 'standard-medium', etc.
pod annotation: 'scheduler.illumina.com/presetSize', value: "${params.compute_size}"
}// Set the default pod
pod = [
annotation: 'scheduler.illumina.com/presetSize',
value : 'standard-small'
]
withName: 'big_memory_process' {
pod = [
annotation: 'scheduler.illumina.com/presetSize',
value : 'himem-large'
]
}
// Use an FPGA2 instance for dragen processes
withLabel: 'dragen' {
pod = [
annotation: 'scheduler.illumina.com/presetSize',
value : 'fpga2-medium'
]
}process ALIGN {
cpus = 4
memory = '16 GB'
script:
"""
your_command_here
"""
}process {
withName: ALIGN {
cpus = 4
memory = '16 GB'
}
}pod annotation: 'scheduler.illumina.com/presetSize', value: 'fpga2-medium'process foo {
pod annotation: 'scheduler.illumina.com/lifecycle', value: "economy"
}process.withName: PROCESS_NAME {
pod.annotations = [
'scheduler.illumina.com/lifecycle': 'economy'
]
}publishDir 'out', mode: 'symlink'executor.name
executor.queueSize
k8s.namespace
k8s.serviceAccount
k8s.launchDir
k8s.projectDir
k8s.workDir
k8s.storageClaimName
k8s.storageMountPath
trace.enabled
trace.file
trace.fields
timeline.enabled
timeline.file
report.enabled
report.file
dag.enabled
dag.file
output-testing-01 and output-testing-02).
```json
{
...
"analysisOutput":
[
{
"sourcePath": "out/test1",
"type": "FOLDER",
"targetProjectId": "4d350d0f-88d8-4640-886d-5b8a23de7d81",
"targetPath": "/output-testing-01/"
},
{
"sourcePath": "out/test2",
"type": "FOLDER",
"targetProjectId": "4d350d0f-88d8-4640-886d-5b8a23de7d81",
"targetPath": "/output-testing-02/"
}
]
}
```{
"$id": "#ica-pipeline-input-form",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ICA Pipeline Input Forms",
"description": "Describes the syntax for defining input setting forms for ICA pipelines",
"type": "object",
"additionalProperties": false,
"properties": {
"fields": {
"description": "The list of setting fields",
"type": "array",
"items": {
"$ref": "#/definitions/ica_pipeline_input_form_field"
}
}
},
"required": [
"fields"
],
"definitions": {
"ica_pipeline_input_form_field": {
"$id": "#ica_pipeline_input_form_field",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "The unique identifier for this field. Will be available with this key to the pipeline script.",
"type": "string",
"pattern": "^[a-zA-Z-0-9\\-_\\.\\s\\+\\[\\]]+$"
},
"type": {
"type": "string",
"enum": [
"textbox",
"checkbox",
"radio",
"select",
"number",
"integer",
"data",
"section",
"text",
"fieldgroup"
]
},
"label": {
"type": "string"
},
"minValues": {
"description": "The minimal amount of values that needs to be present. Default is 0 when not provided. Set to >=1 to make the field required.",
"type": "integer",
"minimum": 0
},
"maxValues": {
"description": "The maximal amount of values that needs to be present. Default is 1 when not provided.",
"type": "integer",
"exclusiveMinimum": 0
},
"minMaxValuesMessage": {
"description": "The error message displayed when minValues or maxValues is not adhered to. When not provided a default message is generated.",
"type": "string"
},
"helpText": {
"type": "string"
},
"placeHolderText": {
"description": "An optional short hint (a word or short phrase) to aid the user when the field has no value.",
"type": "string"
},
"value": {
"description": "The value for the field. Can be an array for multi-value fields. For 'number' type values the exponent needs to be between -300 and +300 and max precision is 15. For 'integer' type values the value needs to between -100000000000000000 and 100000000000000000"
},
"minLength": {
"type": "integer",
"minimum": 0
},
"maxLength": {
"type": "integer",
"exclusiveMinimum": 0
},
"min": {
"description": "Minimal allowed value for 'integer' and 'number' type. Exponent needs to be between -300 and +300 and max precision is 15.",
"type": "number"
},
"max": {
"description": "Maximal allowed value for 'integer' and 'number' type. Exponent needs to be between -300 and +300 and max precision is 15.",
"type": "number"
},
"choices": {
"type": "array",
"items": {
"$ref": "#/definitions/ica_pipeline_input_form_field_choice"
}
},
"fields": {
"description": "The list of setting sub fields for type fieldgroup",
"type": "array",
"items": {
"$ref": "#/definitions/ica_pipeline_input_form_field"
}
},
"dataFilter": {
"description": "For defining the filtering when type is 'data'.",
"type": "object",
"additionalProperties": false,
"properties": {
"nameFilter": {
"description": "Optional data filename filter pattern that input files need to adhere to when type is 'data'. Eg parts of the expected filename",
"type": "string"
},
"dataFormat": {
"description": "Optional dataformat name array that input files need to adhere to when type is 'data'",
"type": "array",
"contains": {
"type": "string"
}
},
"dataType": {
"description": "Optional data type (file or directory) that input files need to adhere to when type is 'data'",
"type": "string",
"enum": [
"file",
"directory"
]
}
}
},
"regex": {
"type": "string"
},
"regexErrorMessage": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"emptyValuesAllowed": {
"type": "boolean",
"description": "When maxValues is greater than 1 and emptyValuesAllowed is true, the values may contain null entries. Default is false."
},
"updateRenderOnChange": {
"type": "boolean",
"description": "When true, the onRender javascript function is triggered ech time the user changes the value of this field. Default is false."
},
"streamable": {
"type": "boolean",
"description": "EXPERIMENTAL PARAMETER! Only possible for fields of type 'data'. When true, the data input files will be offered in streaming mode to the pipeline instead of downloading them."
},
"required": [
"id",
"type"
],
"allOf": [
{
"if": {
"description": "When type is 'textbox' then 'dataFilter', 'fields', 'choices', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"textbox"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"choices",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'checkbox' then 'dataFilter', 'fields', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"checkbox"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"choices",
"placeHolderText",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'radio' then 'dataFilter', 'fields', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"radio"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"placeHolderText",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'select' then 'dataFilter', 'fields', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"select"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'number' or 'integer' then 'dataFilter', 'fields', 'choices', 'regex', 'regexErrorMessage', 'maxLength' and 'minLength' are not allowed",
"properties": {
"type": {
"enum": [
"number",
"integer"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"fields",
"choices",
"regex",
"regexErrorMessage",
"maxLength",
"minLength"
]
}
}
}
},
{
"if": {
"description": "When type is 'data' then 'dataFilter' is required and 'fields', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"data"
]
}
},
"required": [
"type"
]
},
"then": {
"required": [
"dataFilter"
],
"propertyNames": {
"not": {
"enum": [
"fields",
"choices",
"placeHolderText",
"regex",
"regexErrorMessage",
"max",
"min",
"maxLength",
"minLength"
]
}
}
}
},
{
"if": {
"description": "When type is 'section' or 'text' then 'disabled', 'fields', 'updateRenderOnChange', 'classification', 'value', 'minValues', 'maxValues', 'minMaxValuesMessage', 'dataFilter', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' are not allowed",
"properties": {
"type": {
"enum": [
"section",
"text"
]
}
},
"required": [
"type"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"disabled",
"fields",
"updateRenderOnChange",
"classification",
"value",
"minValues",
"maxValues",
"minMaxValuesMessage",
"dataFilter",
"choices",
"regex",
"placeHolderText",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min"
]
}
}
}
},
{
"if": {
"description": "When type is 'fieldgroup' then 'fields' is required and then 'dataFilter', 'choices', 'placeHolderText', 'regex', 'regexErrorMessage', 'maxLength', 'minLength', 'max' and 'min' and 'emptyValuesAllowed' are not allowed",
"properties": {
"type": {
"enum": [
"fieldgroup"
]
}
},
"required": [
"type",
"fields"
]
},
"then": {
"propertyNames": {
"not": {
"enum": [
"dataFilter",
"choices",
"placeHolderText",
"regex",
"regexErrorMessage",
"maxLength",
"minLength",
"max",
"min",
"emptyValuesAllowed"
]
}
}
}
}
]
},
"ica_pipeline_input_form_field_choice": {
"$id": "#ica_pipeline_input_form_field_choice",
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"description": "The value which will be set when selecting this choice. Must be unique over the choices within a field"
},
"text": {
"description": "The display text for this choice, similar as the label of a field. ",
"type": "string"
},
"selected": {
"description": "Optional. When true, this choice value is picked as default selected value. As in selected=true has precedence over an eventual set field 'value'. For clarity it's better however not to use 'selected' but use field 'value' as is used to set default values for the other field types. Only maximum 1 choice may have selected true.",
"type": "boolean"
},
"disabled": {
"type": "boolean"
},
"parent": {
"description": "Value of the parent choice item. Can be used to build hierarchical choice trees."
}
},
"required": [
"value",
"text"
]
}
}
}
}{
"fields": [
{
"id": "myTreeList",
"type": "select",
"label": "Selection Tree Example",
"choices": [
{
"text": "trunk",
"value": "treetrunk"
},
{
"text": "branch",
"value": "treebranch",
"parent":"treetrunk"
},
{
"text": "leaf",
"value": "treeleaf",
"parent":"treebranch"
},
{
"text": "bird",
"value": "happybird",
"parent":"treebranch"
},
{
"text": "cat",
"value": "cat",
"parent": "treetrunk",
"disabled": true
}
],
"minValues": 1,
"maxValues": 3,
"helpText": "This is a tree example"
}
]
}