Closed ranijames closed 6 years ago
It looks like you just need to install node.js on your computer. Or docker so it can pull an image of it to run your CWL workflow. Try installing one of those and re-running.
edit: just noticed you're probably on a cluster, if it's a module
based system you might just need to do a module load
of node, otherwise ask the sysadmins to install it
Thanks for your prompt reply. I am running CWL on cluster, where I cannot be super user for node.js
InlineJavascriptRequirement
for the expressions)The javascript expressions are required for input for steps mentioned. I used that in my previous CWL workflow and it worked without complaining.
Was the environment the same between runs? Seems odd that it would evaluate the JS Expression in one run but not the other. Perhaps the first run had some node/node.js module loaded?
As far I understood DOCKer files are for each workflow separately, and I used all in-house bulit tools to run under my CWL workflow
Hello @ranijames ,
This doesn't look like a primarily Javascript error, but an issue with how your workflow connects to the CWL tool descriptions.
Specifically look at
increment_count:
run: count_incrementally.cwl
in:
increment_out: increment_out
out: [increment_out]
ValidationException: ../cwl/pipeline_part2.cwl:44:9: Workflow step output 'increment_out' does not correspond to ../cwl/count_incrementally.cwl:17:1: tool output (expected 'incre_output')
Here the count_incrementally.cwl
tool doesn't have an output named increment_out
, but it does have one named incre_output
.
There may be an additional issue with a CWL parameter reference or expression in your tool descriptions, but without a link to your code I can't diagnose further.
Hello Michael,
Thanks for the comment and reply. My count_increment.cwl
scripts looks like the following.
cwlVersion: v1.0
class: CommandLineTool
doc: "Script to incrementally count expression"
baseCommand: [python, /collect_counts_incrementally.py]
inputs:
increment_out:
type: string
inputBinding:
position: 1
incremnet_tsv:
type: File[]?
inputBinding:
position: 2
outputs:
incre_output:
type: File
outputBinding:
glob: $(inputs.increment_out)
@ranijames You are welcome. Please try updating your step definition to match the actual output name:
increment_count:
run: count_incrementally.cwl
in:
increment_out: increment_out
out: [incre_output]
Hello Micheal, thanks for your suggestion and time, I changed the typos and re-ran my workflow. The error is still there.,
Resolved '/cluster/home/aalva/Projects/PHRT-Immuno/scripts/cwl/pipeline_part2.cwl' to 'file:///cluster/home/aalva/Projects/PHRT-Immuno/scripts/cwl/pipeline_part2.cwl'
I'm sorry, I couldn't load this CWL file.
The error was:
Traceback (most recent call last):
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/main.py", line 673, in main
metadata, uri, loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/load_tool.py", line 346, in make_tool
tool = loadingContext.construct_tool_object(processobj, loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/workflow.py", line 54, in default_make_tool
return Workflow(toolpath_object, loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/workflow.py", line 531, in __init__
loadingContext.prov_obj))
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/workflow.py", line 619, in __init__
toolpath_object["run"], loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/load_tool.py", line 378, in load_tool
loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/load_tool.py", line 346, in make_tool
tool = loadingContext.construct_tool_object(processobj, loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/workflow.py", line 50, in default_make_tool
return command_line_tool.CommandLineTool(toolpath_object, loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/command_line_tool.py", line 229, in __init__
super(CommandLineTool, self).__init__(toolpath_object, loadingContext)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/process.py", line 588, in __init__
validate_js_expressions(cast(CommentedMap, toolpath_object), self.doc_schema.names[toolpath_object["class"]], validate_js_options)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/validate_js.py", line 193, in validate_js_expressions
expression_errors, _ = jshint_js(code_fragment_js, js_globals, jshint_options)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/validate_js.py", line 118, in jshint_js
context=jshint_functions_text
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/sandboxjs.py", line 161, in exec_js_process
new_proc = new_js_proc(js_engine_code, force_docker_pull=force_docker_pull)
File "/cluster/home/aalva/software/anaconda/lib/python3.6/site-packages/cwltool/sandboxjs.py", line 110, in new_js_proc
u"docker run node:slim".format(u", ".join(trynodes)))
cwltool.sandboxjs.JavascriptException: cwltool requires Node.js engine to evaluate and validate Javascript expressions, but couldn't find it. Tried nodejs, node, docker run node:slim
Hello All,
I have a side question: How to source activate
a python environment before a CWL step which needs a particular python version to run it?
I have a side question: How to
source activate
a python environment before a CWL step which needs a particular python version to run it?
Presumably you have this issue because you have not dockerized the tool and it is running bare on your local environment. In that case, you can have . activate ...
as your first command, or create a bash script, and has that as your first command.
Ok, Thanks for the comment. It worked when I ran it by calling in the script in python 2.7
Dear All, I am running my CWL workflow on python 2.7 environment. I am trying to run couple python scripts, on BAM and tsv files. While I try to run my script. It is throwing following error. Following is the code. And I have all files suppiled in yml format
Workflow Code
Full Traceback
Your Environment