import argparse
argparser = argparse.ArgumentParser()argparser.add_argument('--text', type=str)ARGS = argparser.parse_args()
print(ARGS.text)
process RunPythonScript {
echo true
input:
val v from 'some_text'
"""
#!/usr/bin/env python ../../../python_script.py --text $v
"""
}
python_script.py: error: unrecognized arguments: .command.sh
#!/usr/bin/env python ../../../python_script.py --text some_text/usr/bin/env python ../../../python_script.py --text some_text /home/pietro/code/nextflow_practice/my_simplest_flow/work/31/888424bbdffc5668b41b607d867913/.command.sh--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.
Hi Pietro,
about your second issue, it’s a scripting problem. The #!/usr/bin/env python cannot be used like this. Either you
#!/usr/bin/env python at the beginning of the python script and make it executable Here is an example for 2.:
process RunPythonScript {
echo true
input:
val v from 'some_text'
"""
python ../../../python_script.py --text $v
"""
}
Anyway, the best would be to use 1. and put the script in the bin folder as Paolo suggested.
Best,
Emilio
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.