These are chat archives for nextflow-io/nextflow

20th
Aug 2017
Paolo Di Tommaso
@pditommaso
Aug 20 2017 17:18
You need to activate the logging with the -log <file name> option
Ghost
@ghost~598345d2d73408ce4f6ff925
Aug 20 2017 19:53
Not sure if anyone will be able to answer this, but I'm calling nextflow through the subprocess module in Python (building a web app to wrap around my nextflow workflow) and I'm getting a very vague error from subprocess. Is there a glaring issue you can see with this?
I can't think of any reason why it would be an issue
Paolo Di Tommaso
@pditommaso
Aug 20 2017 20:12
Does it produce any log file? Any stdout message that can help?
Ghost
@ghost~598345d2d73408ce4f6ff925
Aug 20 2017 20:16
Yes
cmd = '~/absolute/path/to/nextflow main.nf'
subprocess.check_call(cmd, shell=True)
this is the 2 python lines
subprocess.CalledProcessError: Command ~/absolute/path/to/nextflow main.nf' returned non-zero exit status 1.
that's all I get
subprocess docs don't give me much information either
Paolo Di Tommaso
@pditommaso
Aug 20 2017 20:19
Too little, cannot you capture the error message produced by NF (if any)?
Ghost
@ghost~598345d2d73408ce4f6ff925
Aug 20 2017 20:22
Expected a command, got main.nf -- Check the available commands and options and syntax with 'help'
tried to run the python script from terminal and got that from nextflow
which is odd because when I run the exact shell command I'm sending to subprocess, nextflow runs perfectly
Paolo Di Tommaso
@pditommaso
Aug 20 2017 20:26
Uummm, I think there's a problem how are you composing the CLI command when using python
Are you passing as a single string?
Ghost
@ghost~598345d2d73408ce4f6ff925
Aug 20 2017 20:29
yes
Paolo Di Tommaso
@pditommaso
Aug 20 2017 20:30
I think you need to pass the command as a list
Splitting each option as a single token
Ghost
@ghost~598345d2d73408ce4f6ff925
Aug 20 2017 20:33
yes, but because shell=True you can type CLI commands as full string
I tried with list as you suggested but same error
looks like Nextflow doesn't like the command
still getting this "Expected a command, got main.nf -- Check the available commands and options and syntax with 'help'"
"main.nf" is my nextflow pipeline by the way
Paolo Di Tommaso
@pditommaso
Aug 20 2017 20:38
Are you specifying​ the run command?
nextflow run <your script>
Ghost
@ghost~598345d2d73408ce4f6ff925
Aug 20 2017 20:45
Got it
man that took me on the run around
subprocess was executing from the directory of the python script which obviously failed to find my nextflow exec and .nf pipeline
thank you for helping, sorry for over-complicating such a simple issue
Paolo Di Tommaso
@pditommaso
Aug 20 2017 20:47
:+1: