CWL: WorkflowException: 'location'
1
0
Entering edit mode
7.0 years ago

Hi there,

Following my previous post about nucmer description (as my first real prog description), I tried the solution proprosed by Mickael, but I have now another problem.

The command

nucmer test.ref.fa test.in.fa

works fine, but with cwl tool I got a workflow error.

Traceback (most recent call last):
  File "/home/.../cwltool/main.py", line 226, in single_job_executor
    for r in jobiter:
  File "/home/.../cwltool/draft2tool.py", line 284, in job
    builder.pathmapper = self.makePathMapper(reffiles, builder.stagedir, **make_path_mapper_kwargs)
  File "/home/.../cwltool/draft2tool.py", line 171, in makePathMapper
    return PathMapper(reffiles, kwargs["basedir"], stagedir)
  File "/home/.../cwltool/pathmapper.py", line 177, in __init__
    self.setup(dedup(referenced_files), basedir)
  File "/home/.../cwltool/pathmapper.py", line 99, in dedup
    if r["location"] not in marksub and r["location"] not in markdup:
  File "/home/.../ruamel/yaml/comments.py", line 678, in __getitem__
    return ordereddict.__getitem__(self, key)
KeyError: 'location'
Workflow error, try again with --debug for more information:
'location'

--debug does not show anything about location. path values for reference and query exist.

From the user guide I supposed 'location' is related to output, but I can't guess what's wrong.

cwl exception output nucmer • 1.4k views
ADD COMMENT
1
Entering edit mode

Would you mind please copying the content of your files : test.ref.fa and test.in.fa, confirming they are actually named test.ref.fa and test.in.fa, indicating their path in your file system, and the full command line you are running to execute your cwl tool and job, Thanks

ADD REPLY
0
Entering edit mode

They are both fasta files, they exist and the nucmer command alone works well. test.in.fa, 50 seq, 2 lines per seq

>scaffold_1
TTTTATTTATTTCTTTTTATCTTTTAATTTTAAAAAATAATATAATTTGACAATATTTTGTTTCTTTTTTTAAAAGATATCGAATATGAAATAATACAATCCTATTGGTTGGTGAACTTAGAGGTTCACCCTAGGAGGTGAACCCAAGAAAAAGTCTTTTGGAAATGCTCTTAGTAGTTGTACATATTACCTTTTTCCAAGGAAAAGCACAGTATTTATGGCCATCGATTCTTTGTGCTTGACCTAGATTTTTAATTTATTTTTAATTTGAGTATATCTGAACCGAATTCCA...
>scaffold_2
ACGACTTGGAGAGAGAGAGAGAGGCGGCTTGGAGAAAAGGAAACCATTTTTCATTTTCCTTGTAATTGTTATCTTTCCATTATTATGTATTAGTAGTTTTCCTAATCCTAATGGATTTAGGTTTTGGATACTTTCTTTTTTACTTATCTTGTAATCCTCTATAAAAAAAGAACACTTATTCATTAATGAAATATAGAAACATTCGGTTCTCAAACCTTCTTTTTACAACAATTTATTTGTTTGTCAACAACTCTCAAGTTGAATCTCAACGCTACTAGTTTACTACAATCAT
...

test.ref.fa, 200 seq, 2 lines per seq

>scaffold_1
ACCAGACACTAGTGAAGTTCAGAGTCCATATACAATCTCCTACTACTGAGACAACTCCTTTAATGTGTCTGTCAACCACCTGTAACATCATTATCGATAAGCTTTTTATAGCAAACTCCATAGCAAGAGAGTCAACAAGCAGATCA...
>scaffold_2
TTATTATTTATTTTTAGAAAACATATCTCATATATTACGAGATTATATGGTCATATTTGTGTTTATTTGCCAAATTAGACGTAGAATACTTTTAAATTCTGAAATTAGTTAAAAACCTCTCATTTCTATAGAAAACATCCTTCTAC...

Here is the output of cwltool using --debug (workflow error not reported)

$ cwltool --debug nucmer.cwl nucmer_cwl.mum.yml 
/home/sletort/logiciels/virtenv/cwl/bin/cwltool 1.0.20170309164828
Resolved 'nucmer.cwl' to 'file:///home/sletort/assemblage/Bnapus/traces/nucmer.cwl'
[job nucmer.cwl] initializing from file:///home/sletort/assemblage/Bnapus/traces/nucmer.cwl
[job nucmer.cwl] {
    "reference": {
        "class": "file", 
        "path": "file:///home/sletort/assemblage/Bnapus/traces/test.ref.fa"
    }, 
    "query": {
        "class": "file", 
        "path": "file:///home/sletort/assemblage/Bnapus/traces/test.in.fa"
    }
}
Got workflow error

And files exist.

$ ll /home/sletort/assemblage/Bnapus/traces/test.ref.fa /home/sletort/assemblage/Bnapus/traces/test.in.fa
-rw-r--r-- 1 sletort 157K  3 avril 14:25 /home/sletort/assemblage/Bnapus/traces/test.in.fa
-rw-r--r-- 1 sletort 502K  3 avril 14:27 /home/sletort/assemblage/Bnapus/traces/test.ref.fa

Last the yml file nucmer_cwl.mum.yml

# nucmer_cwl.mum : test nucmer -mum description
reference :
    class : file
    path  : test.ref.fa

query     :
    class : file
    path  : test.in.fa

All files (.cwl, *.yml, *.fa) are in the same path */home/sletort/assemblage/Bnapus/traces

Thanks

ADD REPLY
1
Entering edit mode
7.0 years ago

The error seems to come from the yaml file used as input. The following command works

cwl-runner nucmer.cwl --query test.ref.fa --reference test.ref.fa

Ok I've found what's wrong. Class is 'File' and not 'file'.

I suggest to have a more precise output error message. "No class 'file' exists." ?

ADD COMMENT

Login before adding your answer.

Traffic: 2763 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