jodyphelan / TBProfiler

Profiling tool for Mycobacterium tuberculosis to detect ressistance and strain type from WGS data
GNU General Public License v3.0
102 stars 42 forks source link

issues running tb-profiler 2.3.0 #286

Closed rderelle closed 1 year ago

rderelle commented 1 year ago

Hello,

I'm trying to run the last version of tb-profiler (2.3.0; installed via conda on a linux system) but I encountered several issues

The first issue was related to the variable 'af' that I solved by modifying the following line in the tb-profiler script (I simply removed 'af=args.af'):

traceback (most recent call last): File "/rds//xxx/anaconda3/bin/tb-profiler", line 333, in args.func(args) File "/rds/xxx/anaconda3/bin/tb-profiler", line 82, in main_profile results = pp.profiler(conf_file=conf_file,prefix=args.dir+"/"+args.prefix,r1=args.read1,r2=args.read2,bam_file=args.bam,call_method=args.call_method,min_depth=args.min_depth,threads=args.threads,platform=args.platform,mapper=args.mapper,run_delly=True,af=args.af) TypeError: profiler() got an unexpected keyword argument 'af'

The second issue seems to be a bit mode difficult to solve by an outsider like myself:

Traceback (most recent call last): File "/rds/xxx/anaconda3/bin/tb-profiler", line 333, in args.func(args) File "/rds/xxx/anaconda3/bin/tb-profiler", line 83, in main_profile results = tbp.reformat(results,conf) File "/rds/xxx/anaconda3/lib/python3.9/site-packages/tbprofiler/reformat.py", line 243, in reformat results = add_genes(results,conf) File "/rds/xxx/anaconda3/lib/python3.9/site-packages/tbprofiler/reformat.py", line 135, in add_genes d["gene"] = rv2gene[d["gene_id"]] KeyError: 'gyrB'

Would there be an easy fix? Or is my installation faulty?

Thanks! Romain

rderelle commented 1 year ago

actually the second issue stems from a call of the arguments ('args.func(args)'), so the two issues might be related and my initial fix not very effective.

jodyphelan commented 1 year ago

Hi @rderelle ,

Could you try install the latest version? (v4.4.2). The version you have is quite out of date. If it automatically installed that with from conda it might mean that there are a few dependancy issues and it could be worth installing it in its own environment if you haven't already done so:

conda create -n tb-profiler tb-profiler=4.4.2
rderelle commented 1 year ago

Many thanks for your reply. Everything works after installing tb-profiler in an environment.

Thanks again.

jodyphelan commented 1 year ago

Great! :)