Reputation: 190
I would like to call a system command (kat hist) straight from the sbatch (slurm/sge) command without the .sh script. Not sure something like this is possible?
This is what I am currently doing:
"sbatch -p %s -n %s -t %s ./kat_reads_call.sh %s %s %s %s/filter_10xReads.py %s %s" % arg_list
Where .kat_reads.sh
just does this:
#!/bin/bash
kat hist -o $1 -m $2 -t $3 <($4 -1 $5 -2 $6)
The goal is something like this :
"sbatch -p %s -n %s -t %s kat hist -o %s -m %s -t %s <(%s -1 %s -2 %s)" % arg_list
This is the error I recieve:
sbatch: error: This does not look like a batch script. The first
sbatch: error: line must start with #! followed by the path to an interpreter.
sbatch: error: For instance: #!/bin/sh
Upvotes: 1
Views: 190
Reputation: 5762
Check the --wrap
parameter of sbatch
. You will need something like:
"sbatch -p %s -n %s -t %s --wrap \"kat hist -o %s -m %s -t %s <(%s -1 %s -2 %s)\"" % arg_list
Apply the proper escape sequence, as I don't know hich language is it.
Upvotes: 1