Workflow: xenbase-sra-to-fastq-se.cwl

Fetched 2023-01-03 19:45:29 GMT
children parents
Workflow as SVG
  • Selected
  • Default Values
  • Nested Workflows
  • Tools
  • Inputs/Outputs

Inputs

ID Type Title Doc
threads Integer (Optional)
sra_input_file File
illumina_adapters_file File

Steps

ID Runs Label Doc
fastqc
../tools/fastqc.cwl (CommandLineTool)

Tool runs FastQC from Babraham Bioinformatics

trimmomatic
../tools/trimmomatic.cwl (CommandLineTool)

Tool runs trimmomatic with ILLUMINACLIP step by default.

`-basein` and `-baseout` inputs are skipped.

If set `lib_type` to `PE`, both of the inputs `fastq_file_upstream` and `fastq_file_downstream` shoul be provided.

If input `trigger` is set to `true` or isn't set at all (`true` is used by default), run `trimmomatic` and return FASTQ file[s] with trimmed adapters, alongside with the uppaired reads FASTQ files (if `lib_type` is set to `PE` and such files are present after running `trimmomatic`) If input `trigger` is set to `false`, return unchanged `fastq_file_upstream` and `fastq_file_downstream`, previously staged into output directory.

Before execution `baseCommand`, `fastq_file_upstream` and `fastq_file_downstream` (if provided) are staged into directory set as docker parameter `--workdir` (tool's output directory), using `InitialWorkDirRequirement`. They are mount to docker container with `ro` mode as part of `--workdir`, because all generated files will have `trimmed` suffix in their names, so the staged files will not be overwritten.

Trigger logic is implemented in a bash scripts set by default as `bash_script` input. If the first argument $0 (which is `trigger` input) is true, run `trimmomatic` with the rest of the arguments. If $0 is not true, skip `trimmomatic` and return `fastq_file_upstream` and `fastq_file_downstream` (if provided) staged into output directory.

Input `trigger` is Boolean, but returns String, because of `valueFrom` field. The `valueFrom` is used, because if `trigger` is false, cwl-runner doesn't append this argument at all to the the `baseCommand` - new feature of CWL v1.0.2. Alternatively, `prefix` field could be used, but it causes changing in script logic.

`default_output_name` function is used for generating output filename based on `input_file.basename` and provided extension.

sra_to_fastq
../tools/fastq-dump.cwl (CommandLineTool)

Tool runs fastq-dump from NCBI SRA toolkit Supports only file inputs. Output file names are formed on the base of `sra_file` input basename.

Outputs

ID Type Label Doc
fastq File
Permalink: https://w3id.org/cwl/view/git/e627079d8431e4f1f1c7531af1ca2e7dcc684b90/subworkflows/xenbase-sra-to-fastq-se.cwl