common-workflow-library / bio-cwl-tools

CWL CommandLineTool descriptions for biology/life-sciences related applications
https://github.com/common-workflow-library/bio-cwl-tools#readme
Apache License 2.0
74 stars 36 forks source link

Output in Kallisto-quant not working #156

Open Brilator opened 1 week ago

Brilator commented 1 week ago

Hi, I've tested the Kallisto-Quant.cwl with

InputReads:
    - class: File
      path: ../../rnaseq/sample1-1.fastq.gz
    - class: File
      path: ../../rnaseq/sample1-2.fastq.gz
Index:
  class: File
  path: ../../kallisto-index-biocwl/output/Fbid
isSingle: true  
FragmentLength: 200
StandardDeviation: 20  
BootstrapSamples: 0
PseudoBam: false

Unfortunately the output is not wired properly.

("Error collecting output for parameter 'quantification_h5': Kallisto-Quant.cwl:129:7: Did not find output file with glob pattern: ['out/abundances.h5'].", {})

I am new to CWL, so not sure how to fix and PR.

Brilator commented 1 week ago

Also, for the fusions output (l 146), it should probably say glob: "out/fusion.txt" instead of glob: "fusion.txt"

mr-c commented 1 week ago

Thank you @Brilator for reporting this!

If you are running with cwltool, try cwtool --cachedir cache Kallisto-Quant.cwl my_inputs.yml or similar, then check the directory cache and there will be all the files; maybe that will help you suggest a better glob line for quantification_h5

Brilator commented 1 week ago

Thanks, I did that.

For me, adding another input string for the output folder and completely yielding that as output worked.

  QuantOutfolder: 
    type: string

outputs:

#   quantification_h5:
#     type: File
#     outputBinding:
#       glob: out/abundances.h5

# # Long form method for defining optional outputs

#   quantification_tsv:
#     type: File
#     outputBinding:
#       glob: out/abundances.tsv

#   bam:
#     type: ["null", File]
#     outputBinding:
#       glob: "out/*.bam"

#   fusions:
#     type: ["null", File]
#     outputBinding:
#       glob: "fusion.txt"

  outFolder:
    type: Directory
    outputBinding:
      glob: $(runtime.outdir)/$(inputs.QuantOutfolder)