From c67b71f2da6efc583f06c5dac9e95448f3f563e3 Mon Sep 17 00:00:00 2001 From: Dominik Brilhaus <brilhaus@nfdi4plants.org> Date: Tue, 18 Mar 2025 09:00:55 +0100 Subject: [PATCH] replace sampleRecord logic in kallisto --- workflows/kallisto/workflow.cwl | 42 ++++++++++++++------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/workflows/kallisto/workflow.cwl b/workflows/kallisto/workflow.cwl index 1d020e1..ea6b79d 100644 --- a/workflows/kallisto/workflow.cwl +++ b/workflows/kallisto/workflow.cwl @@ -8,20 +8,18 @@ requirements: inputs: IndexInput: File[] - InputReadsMultipleSamples: - type: + sampleRecord: + type: type: array - items: - type: array - items: File - # numCharsFileName: - # type: int - # default: 6 - numUnderscoresFileName: - type: int - default: 2 + items: + type: record + fields: + readsOfOneSample: + type: File[] + sampleName: + type: string? isSingle: boolean - FragmentLength: double? + FragmentLength: double? StandardDeviation: double? BootstrapSamples: int? resultsFolder: string @@ -31,28 +29,24 @@ steps: run: kallisto-index.cwl in: InputFiles: IndexInput - IndexName: + IndexName: source: IndexInput valueFrom: $(self[0].nameroot) out: [index] quant: run: kallisto-quant.cwl - scatter: - - InputReads - - QuantOutfolder + scatter: [InputReads, QuantOutfolder] scatterMethod: dotproduct in: - InputReads: InputReadsMultipleSamples - # numChars: - # source: numCharsFileName - numUnderscores: numUnderscoresFileName + InputReads: + source: sampleRecord + valueFrom: $(self.readsOfOneSample) QuantOutfolder: - source: InputReadsMultipleSamples - # valueFrom: $(self[0].nameroot.substring(0, inputs.numChars)) - valueFrom: $(self[0].nameroot.split('_').slice(0, inputs.numUnderscores).join('_')) + source: sampleRecord + valueFrom: $(self.sampleName) Index: index/index isSingle: isSingle - FragmentLength: FragmentLength + FragmentLength: FragmentLength StandardDeviation: StandardDeviation BootstrapSamples: BootstrapSamples out: [outFolder] -- GitLab