Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcbio_dir undefined in utils.py #3188

Closed
johnziniti opened this issue Apr 14, 2020 · 1 comment
Closed

bcbio_dir undefined in utils.py #3188

johnziniti opened this issue Apr 14, 2020 · 1 comment
Assignees

Comments

@johnziniti
Copy link

Version info

  • bcbio version (bcbio_nextgen.py --version): 1.2.3
  • OS name and version: Red Hat Enterprise Linux Server release 6.10 (Santiago)

To Reproduce

  • Exact bcbio command you have used: bcbio_nextgen.py /proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/rnaseq_snp_concordance/bcbio_system.yaml ../config/301898_accepted_hits_merged_markeddups_recal.yaml
  • Your sample configuration file
details:
- algorithm:
    aligner: bwa
    variantcaller: freebayes
  analysis: variant2
  description: 301898.accepted_hits.merged.markeddups.recal
  files:
  - /proj/regeps/regep00/studies/COPDGene/data/rna/mrna/nasal_shortread/data/raw/TOPMED_11.19.2019/301898.accepted_hits.merged.markeddups.recal.bam
  genome_build: hg38
fc_name: 301898_accepted_hits_merged_markeddups_recal
upload:
  dir: ../final

Observed behavior
Error message or bcbio output.

File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/utils.py", line 55, in wrapper
    return f(*args, **kwargs)
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/distributed/multitasks.py", line 323, in concat_variant_files
    return vcfutils.concat_variant_files(*args)
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/variation/vcfutils.py", line 370, in concat_variant_files
    input_file_list = _get_file_list(orig_files, out_file, regions, ref_file, config)
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/variation/vcfutils.py", line 416, in _get_file_list
    exist_files = _fix_gatk_header(exist_files, out_file, config)
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/variation/vcfutils.py", line 454, in _fix_gatk_header
    (utils.get_java_clprep(), header_file, base_file, base_fix_file, " ".join(ropts)),
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/utils.py", line 776, in get_java_clprep
    return "%s && export PATH=%s:\"$PATH\"" % (clear_java_home(), get_java_binpath(cmd))
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/utils.py", line 758, in get_java_binpath
    cmd = Rscript_cmd()
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/utils.py", line 697, in Rscript_cmd
    rscript = which(os.path.join(get_bcbio_bin(), "Rscript"))
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/utils.py", line 657, in which
    for path in get_all_conda_bins():
  File "/proj/regeps/regep00/studies/COPDGene/analyses/rejpz/bcbio_ea/.snakemake/conda/2460f313/lib/python3.7/site-packages/bcbio/utils.py", line 832, in get_all_conda_bins
    return [bcbio_bin] + list(glob.glob(os.path.join(conda_dir, "envs", "*", "bin")))
NameError: name 'bcbio_bin' is not defined

Expected behavior
get_all_conda_bins() should successfully return a list of paths.

Log files
Please attach (10MB max): bcbio-nextgen.log, bcbio-nextgen-commands.log, and bcbio-nextgen-debug.log.

Additional context
It's seems clear to me that the function get_all_conda_bins is referring to a variable that is not defined within the function. I was able to work around this error by adding:

bcbio_bin = get_bcbio_bin()

immediately before this line.

@naumenko-sa naumenko-sa self-assigned this Apr 14, 2020
naumenko-sa added a commit that referenced this issue Apr 14, 2020
@naumenko-sa
Copy link
Contributor

Thanks for reporting @johnziniti !
We have fixed it. Feel free to reopen if you still experience issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants