Hi everyone,
I just had a weird situation with Nextflow, and I need some help with that. I have a NF workflow that contains the following command inside a process:
samtools coverage --reference ${fasta} ${bam} > ${bam}.depth
The command works fine when used on a command line outside of nextflow. However, when used within the workflow, I get the error "unknown command "coverage"" which seems to be a samtools error. The "coverage" command is part of the samtools toolkit and works fine outside of nextflow, as stated above.
I navigated to the /work subdirectory where the command was run, and executed the .command.sh file as "sh .command.sh", which throws the same error.
I then executed the .command.run file using "bash .command.run" and it worked fine.
I don't get where the issue could be, I don't know where to start. Does anyone have any hint for me on where to start debugging? Why do .command.sh and .command.run have different behaviors? Does it all come down to the usage of sh instead of bash?
Thanks,
Matteo