chapmanb / cloudbiolinux

CloudBioLinux: configure virtual (or real) machines with tools for biological analyses
http://cloudbiolinux.org
MIT License
257 stars 158 forks source link

UNPACK_DIR: unbound variable #308

Closed mmoisse closed 5 years ago

mmoisse commented 5 years ago

When installing dbNSFP in thet following error:

/software/local/share/bcbio/genomes/Hsapiens/hg38/txtmp/ggd-run.sh: line 27: UNPACK_DIR: unbound variable
Traceback (most recent call last):
  File "/software/local/share/bcbio/anaconda/bin/bcbio_nextgen.py", line 221, in <module>
    install.upgrade_bcbio(kwargs["args"])
  File "/software/local/share/bcbio/anaconda/lib/python3.6/site-packages/bcbio/install.py", line 106, in upgrade_bcbio
    upgrade_bcbio_data(args, REMOTES)
  File "/software/local/share/bcbio/anaconda/lib/python3.6/site-packages/bcbio/install.py", line 348, in upgrade_bcbio_data
    args.cores, ["ggd", "s3", "raw"])
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/genomes.py", line 354, in install_data_local
    _prep_genomes(env, genomes, genome_indexes, ready_approaches, data_filedir)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/genomes.py", line 480, in _prep_genomes
    retrieve_fn(env, manager, gid, idx)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/genomes.py", line 850, in _install_with_ggd
    ggd.install_recipe(os.getcwd(), env.system_install, recipe_file, gid)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/ggd.py", line 30, in install_recipe
    recipe["recipe"]["full"]["recipe_type"], system_install)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/ggd.py", line 62, in _run_recipe
    subprocess.check_output(["bash", run_file])
  File "/software/local/share/bcbio/anaconda/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/software/local/share/bcbio/anaconda/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bash', '/software/local/share/bcbio/genomes/Hsapiens/hg38/txtmp/ggd-run.sh']' returned non-zero exit status 1.

I believe this is because the following line should be in the if statement (bug in both hg38 and hg19)

https://github.com/chapmanb/cloudbiolinux/blob/2bd26875c32126bb901dfb39ea5cba7e50b9d85e/ggd-recipes/hg38/dbnsfp.yaml#L33

naumenko-sa commented 5 years ago

Hi @mmoisse!

Thanks for reporting and sorry about the issue with dbNSFP installation. I've pushed a fix, could you please give it a try (just remove your tmpbcbio-install and try again)? https://github.com/chapmanb/cloudbiolinux/pull/309

Sergey

mmoisse commented 5 years ago

Now I get the following error

cat: /software/local/share/bcbio/genomes/Hsapiens/hg38/txtmp/variation/tmpunpack/header: No such file or directory
Traceback (most recent call last):
  File "/software/local/share/bcbio/anaconda/bin/bcbio_nextgen.py", line 221, in <module>
    install.upgrade_bcbio(kwargs["args"])
  File "/software/local/share/bcbio/anaconda/lib/python3.6/site-packages/bcbio/install.py", line 107, in upgrade_bcbio
    upgrade_bcbio_data(args, REMOTES)
  File "/software/local/share/bcbio/anaconda/lib/python3.6/site-packages/bcbio/install.py", line 349, in upgrade_bcbio_data
    args.cores, ["ggd", "s3", "raw"])
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/genomes.py", line 354, in install_data_local
    _prep_genomes(env, genomes, genome_indexes, ready_approaches, data_filedir)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/genomes.py", line 480, in _prep_genomes
    retrieve_fn(env, manager, gid, idx)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/genomes.py", line 850, in _install_with_ggd
    ggd.install_recipe(os.getcwd(), env.system_install, recipe_file, gid)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/ggd.py", line 30, in install_recipe
    recipe["recipe"]["full"]["recipe_type"], system_install)
  File "/tmpbcbio-install/cloudbiolinux/cloudbio/biodata/ggd.py", line 62, in _run_recipe
    subprocess.check_output(["bash", run_file])
  File "/software/local/share/bcbio/anaconda/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/software/local/share/bcbio/anaconda/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bash', '/software/local/share/bcbio/genomes/Hsapiens/hg38/txtmp/ggd-run.sh']' returned non-zero exit status 1.

https://github.com/chapmanb/cloudbiolinux/blob/f19e059ef01b8cb2ad0d498008df914b0dd465f6/ggd-recipes/hg38/dbnsfp.yaml#L26

should probably be cat $UNPACK_DIR/header.txt > dbNSFP.txt

naumenko-sa commented 5 years ago

Thanks for the fix! Merged! SN