question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-casting single item to array fails

See original GitHub issue

Input

  inputFileName_markDups:
    type: File[]?
    inputBinding:
      position: 4
      prefix: INPUT=

The call uses a single BAM file from a previous step, not an array.

Causes the following error:

Workflow error, try again with --debug for more information:
  Type mismatch between source 'file:///home/ubuntu/gitroot/common-workflow-language/workflows/workflows/GATK/GATK-complete-Workflow-h3abionet.cwl#samtools-sort/sorted' (File) and sink 'file:///home/ubuntu/gitroot/common-workflow-language/workflows/workflows/GATK/GATK-complete-Workflow-h3abionet.cwl#MarkDuplicates/inputFileName_markDups' ([u'null', {u'items': 'File', u'type': u'array'}])

But it works fine when markdup’s input is:

  inputFileName_markDups:
    type: File[]
    inputBinding:
      position: 4
      prefix: INPUT=

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
briandoconnorcommented, Aug 25, 2016

Workaround with javascript:

      inputFileName_markDups:
        source: samtools-sort/sorted
        valueFrom: ${return [ self ];}
0reactions
tetroncommented, Aug 29, 2016

Try this:

     inputFileName_markDups: [samtools-sort/sorted]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can PHP throw an error instead of autocasting strings to ...
+ EXPR': expected number or array but found string 5: 6: echo $c; 7: ?> END parsing of test-p4Gx1L ==== ?: notice: unused...
Read more >
Fix auto-casting of array like values in env #12330 - GitHub
Since 9.7.1 this env setting is causing issues. Currently setting is: gcs,local but since updating to 9.7.1 I am getting the *:split is...
Read more >
Programming patterns | ArcGIS Maps SDK for JavaScript 4.25
Autocasting casts JavaScript objects as ArcGIS Maps SDK for JavaScript class types without the need for these classes to be explicitly imported by...
Read more >
Array | Apple Developer Documentation
You use arrays to organize your app's data. Specifically, you use the Array type to hold elements of a single type, the array's...
Read more >
Type Juggling - Manual - PHP
Two exceptions exist, the first one is: if the value is of type int and the ... [] --> TypeError // array not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found