jodyphelan/TBProfiler

TypeError: Parallel.__init__() got an unexpected keyword argument 'return_as

FrancisFCHsu opened this issue · 1 comments

Dear Jody,

I am running TBprofiler 5.0.1. The example run received the error messages below. Could you kindly take a look about it?
Thank you very much.

$ tb-profiler profile -1 ERR1664619_1.fastq.gz -2 ERR1664619_2.fastq.gz -t 4 -p ERR1664619

WARNING Please ensure that this BAM was made using the same reference as in the database. If you are not sure what reference was used it is best to remap the reads. profiler.py:13

INFO Running variant calling bam.py:87

Traceback (most recent call last):
File "/home/fah015/.conda/envs/TBprofiler501/bin/tb-profiler", line 562, in
args.func(args)
File "/home/fah015/.conda/envs/TBprofiler501/bin/tb-profiler", line 110, in main_profile
results.update(pp.run_profiler(args))
File "/home/fah015/.conda/envs/TBprofiler501/lib/python3.10/site-packages/pathogenprofiler/cli.py", line 58, in run_profiler
results = bam_profiler(
File "/home/fah015/.conda/envs/TBprofiler501/lib/python3.10/site-packages/pathogenprofiler/profiler.py", line 31, in bam_profiler
vcf_obj = bam.call_variants(conf["ref"], caller=caller, filters = conf['variant_filters'], bed_file=conf["bed"], threads=threads, calling_params=calling_params, samclip = samclip)
File "/home/fah015/.conda/envs/TBprofiler501/lib/python3.10/site-packages/pathogenprofiler/bam.py", line 88, in call_variants
run_cmd_parallel_on_genome(self.calling_cmd,ref_file,bed_file = bed_file,threads=threads,desc="Calling variants")
File "/home/fah015/.conda/envs/TBprofiler501/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 79, in run_cmd_parallel_on_genome
parallel = Parallel(n_jobs=threads, return_as="generator")
TypeError: Parallel.init() got an unexpected keyword argument 'return_as'
Cleaning up after failed run
ERROR

Hi @FrancisFCHsu ,

This issue should be patched in the latest version of tb-profiler. It was generated due to an old version of joblib installed and was patched in the conda recipe.