cwltool issue using SoftwareRequirement
2
0
Entering edit mode
6.1 years ago
sf21 ▴ 20

I am having trouble executing the cwl script when supplying "SoftwareRequirement" hints. Tried the below code using both modules (--beta-dependency-resolvers-configuration) and conda (--beta-conda-dependencies). The script works when I provide the complete path to the tool in baseCommand. I am not sure what I am doing wrong. Any feedback is appreciated. thanks!

Tried with cwl version: 1.0.20180809224403

Partial stack trace. The rest was just output from conda. I can update if you think its relevant.

openjdk-8.0.12 100% |##############################################################| Time: 0:00:01  59.85 MB/s
rtg-tools-3.8. 100% |##############################################################| Time: 0:00:00  15.25 MB/s
Extracting packages ...
[      COMPLETE      ]|#################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|#################################################################################| 100%
#
# To activate this environment, use:
# > source activate __rtg-tools@3.8.2
#
# To deactivate this environment, use:
# > source deactivate __rtg-tools@3.8.2
#

Exception while running job
Traceback (most recent call last):
  File "/nethome/usevani/miniconda2/lib/python2.7/site-packages/cwltool/job.py", line 278, in _execute
    name=self.name
  File "/nethome/usevani/miniconda2/lib/python2.7/site-packages/cwltool/job.py", line 575, in _job_popen
    mode="wb") as job_file:
ValueError: binary mode doesn't take an encoding argument
[job rtg.cwl] completed permanentFail
{}
Final process status is permanentFail

CWL script.

cwlVersion: v1.0
class: CommandLineTool
baseCommand: rtg

requirements:
  EnvVarRequirement:
    envDef:
      TOIL_GRIDENGINE_PE: smp

hints:
  SoftwareRequirement:
    packages:
    - package: 'rtg'
      version:
      - '3.8.2'
      specs:
      - https://anaconda.org/bioconda/rtg-tools

arguments:
- valueFrom: vcfeval
  position: 2
- valueFrom: 20G
  position: 1
  prefix: RTG_MEM=
  separate: false
- valueFrom: "$(runtime.outdir)/out"
  prefix: -o
  position: 3
- valueFrom: $(runtime.cores)
  prefix: -T
  position: 4

inputs:
  rtg_reference:
    type: Directory
    inputBinding:
      position: 5
      prefix: -t
  gold_standard:
    type: File
    inputBinding:
      position: 6
      prefix: -b
    secondaryFiles:
    - .tbi
    doc: Genome-In-A-Bottle gold start VCF.
  input:
    type: File
    inputBinding:
      position: 7
      prefix: -c
    secondaryFiles:
    - .tbi
    doc: input compressed and index VCF
  all_records:
    type: boolean
    inputBinding:
      position: 8
      prefix: --all-records
  sample_names:
    type: string
    inputBinding:
      prefix: --sample=
      separate: false
      position: 9
  evaluation_regions:
    type: File
    inputBinding:
      prefix: --evaluation-regions=
      separate: false
      position: 10

outputs:
  output:
    type: Directory
    outputBinding:
      glob: "$(runtime.outdir)/out"
cwltool cwl • 1.8k views
ADD COMMENT
0
Entering edit mode
6.1 years ago

Hello h.mon,

When I've had this issue in the past I've fixed it by running cwltool inside a Python 2.7 virtualenv. But this is a bug, so I've opened an issue at https://github.com/common-workflow-language/cwltool/issues/954 to track it.

Thanks!

ADD COMMENT
0
Entering edit mode
6.1 years ago
sf21 ▴ 20

Thanks for replying and opening a ticket. This is working in cwltool version 1.0.20181012180214 and Python version 3.5.5. In Python 2.7, i am able to run using conda (--beta-conda-dependencies) but not using modules (--beta-dependency-resolvers-configuration).

ADD COMMENT

Login before adding your answer.

Traffic: 1434 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6