bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
994 stars 354 forks source link

global name 'params' is not defined #1636

Closed eyalbenda closed 8 years ago

eyalbenda commented 8 years ago

Hi,

I'm trying to run bcbio for germline variation. I ran it before without a hitch, but for some reason I now get an error I can't decipher:

[2016-11-10T16:50Z] Identified 156 parallel analysis blocks Block sizes: min: 8660 5%: 501728.0 25%: 519551.5 median: 575533.0 75%: 681988.5 95%: 1100207.5 99%: 1338535.7 max: 1403585 Between block sizes: min: 251 5%: 263.4 25%: 350.0 median: 584.0 75%: 1169.0 95%: 3526.0 99%: 7491.64 max: 34038

[2016-11-10T16:50Z] Timing: hla typing [2016-11-10T16:50Z] Resource requests: freebayes, gatk, gatk-haplotype, picard, platypus, varscan; memory: 2.00, 3.50, 2.00, 3.50, 2.00, 2.00; cores: 16, 1, 16, 1, 16, 16 [2016-11-10T16:50Z] Configuring 1 jobs to run, using 1 cores each with 3.50g of memory reserved for each job [2016-11-10T16:50Z] Timing: alignment post-processing [2016-11-10T16:50Z] multiprocessing: piped_bamprep Traceback (most recent call last): File "/home/multivac/bcbio/tool/bin/bcbio_nextgen.py", line 4, in import('pkg_resources').run_script('bcbio-nextgen==0.9.9', 'bcbio_nextgen.py') File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/pkg_resources/init.py", line 726, in run_script

File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/pkg_resources/init.py", line 1484, in run_script

File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio_nextgen-0.9.9-py2.7.egg-info/scripts/bcbio_nextgen.py", line 226, in main(kwargs) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio_nextgen-0.9.9-py2.7.egg-info/scripts/bcbio_nextgen.py", line 43, in main run_main(kwargs) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/pipeline/main.py", line 43, in run_main fc_dir, run_info_yaml) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/pipeline/main.py", line 87, in _run_toplevel for xs in pipeline(config, run_info_yaml, parallel, dirs, samples): File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/pipeline/main.py", line 149, in variant2pipeline samples = region.parallel_prep_region(samples, run_parallel) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/pipeline/region.py", line 138, in parallel_prep_region "piped_bamprep", _add_combine_info, file_key, ["config"]) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/distributed/split.py", line 59, in parallel_split_combine split_output = parallel_fn(parallel_name, split_args) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/distributed/multi.py", line 28, in run_parallel return run_multicore(fn, items, config, parallel=parallel) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/distributed/multi.py", line 86, in run_multicore for data in joblib.Parallel(parallel["num_jobs"])(joblib.delayed(fn)(x) for x in items): File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/joblib/parallel.py", line 800, in call while self.dispatch_one_batch(iterator): File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/joblib/parallel.py", line 658, in dispatch_one_batch self._dispatch(tasks) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/joblib/parallel.py", line 566, in _dispatch job = ImmediateComputeBatch(batch) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/joblib/parallel.py", line 180, in init self.results = batch() File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/joblib/parallel.py", line 72, in call return [func(*args, *kwargs) for func, args, kwargs in self.items] File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/utils.py", line 51, in wrapper return apply(f, args, *kwargs) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/distributed/multitasks.py", line 120, in piped_bamprep return bamprep.piped_bamprep(args) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/variation/bamprep.py", line 144, in piped_bamprep _piped_bamprep_region(data, region, out_file, tmp_dir) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/variation/bamprep.py", line 122, in _piped_bamprep_region _piped_bamprep_region_gatk(data, region, prep_params, out_file, tmp_dir) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/variation/bamprep.py", line 86, in _piped_bamprep_region_gatk cur_bam, cl = _piped_input_cl(data, region, tmp_dir, out_file, prep_params) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/variation/bamprep.py", line 53, in _piped_input_cl return data["work_bam"], _gatk_extract_reads_cl(data, region, prep_params, tmp_dir) File "/home/multivac/bcbio/data/anaconda/lib/python2.7/site-packages/bcbio/variation/bamprep.py", line 44, in _gatk_extract_reads_cl return broad.gatk_cmd("gatk-framework", jvm_opts, params) NameError: global name 'params' is not defined

eyalbenda commented 8 years ago

Ok, I manually looked into gatk_extract_reads_cl in bamprep.py and for some reason it was looking for "params" as an argument for running GATK. I saw that in the repo it is instead "args", changed it and it's now working. Bizarre...

Is there a way to kind of "reinstall" bcbio without deleting what I have there in case things get corrupted this way?

chapmanb commented 8 years ago

Sorry about the issues and thanks for following up. There was a fix for a related issue that is in the development version:

https://github.com/chapmanb/bcbio-nextgen/commit/9ca689b5e85b19dc8e7343b9c5e2a692e79bab34#diff-811a06c2f6851d9f6e8651f7c7000bf2

but as you mention in your followup doesn't exactly match the report we're getting from your install. If you want to upgrade bcbio you can do with:

bcbio_nextgen.py upgrade -u development

which should replace the code with the latest development without deleting data or other tool installs. Hope this helps get it working for you, feel free to re-open if you still run into issues.