rfeng2023 / mmcloud

1 stars 10 forks source link

mm_jobman.sh gives wrong syntax when there is only one command to submit #31

Closed gaow closed 9 months ago

gaow commented 9 months ago

To reproduce:

bash test_jobman.sh

observed, erroneous behavior:

{
    while IFS= read -r command; do
        eval $command || true
    done <<< '''" sos run xqtl-pipeline/pipeline/cis_workhorse.ipynb susie_twas ... " '''

The correct expected behavior is that in this case there are no " around the command:

{
    while IFS= read -r command; do
        eval $command || true
    done <<< ''' sos run xqtl-pipeline/pipeline/cis_workhorse.ipynb susie_twas ...  '''

Otherwise there will be an error when we run it: "No such file or directory" something like that.

However we do need " aroudn the command, when we generate the command for parallel, eg parallel ::: "cmd1" "cmd2"

So we need to fix it for when there is only one command to generate. I've posted the test scripts to our slack channel.