rgi icon indicating copy to clipboard operation
rgi copied to clipboard

RGI heatmap/parser Issue [BUG]

Open MicoNick opened this issue 1 year ago • 10 comments

Good day, dear representatives of RGI. I faced a problem when using rgi heatmap and rgi parser.

About heatmap: When trying to build a heatmap and giving as arguments a folder with only json files and a subfolder, an error comes out. That said, all files were generated by searching on peptides annotated with prokka. The search for ARG genes was done in protein mode.

Heatmap construction was done in debug mode, hope it helps:

INFO 2024-01-08 22:00:31,106 : { { "input": "rgi_gene_res_blast", "classification": { "drug_class", "frequency": true, "output": "HM_gene/DJ_HM_DC", "cluster": { "both", "display": "plain", "debug": true } Traceback (most recent call last): File "/home/vasilchenko_ng/miniconda3/envs/rgi/bin/rgi", line 4, in MainBase() File "/home/vasilchenko_ng/miniconda3/envs/rgi/lib/python3.8/site-packages/app/MainBase.py", line 83, in init getattr(self, args.command)() File "/home/vasilchenko_ng/miniconda3/envs/rgi/lib/python3.8/site-packages/app/MainBase.py", line 346, in heatmap self.heatmap_run(args) File "/home/vasilchenko_ng/miniconda3/envs/rgi/lib/python3.8/site-packages/app/MainBase.py", line 365, in heatmap_run obj.run() File "/home/vasilchenko_ng/miniconda3/envs/rgi/lib/python3.8/site-packages/app/Heatmap.py", line 438, in run df = self.create_categories(drug_class, df) File "/home/vasilchenko_ng/miniconda3/envs/rgi/lib/python3.8/site-packages/app/Heatmap.py", line 97, in create_categories df = df.append([df.loc[model]]*(len(class_dict[model])-1))) File "/home/vasilchenko_ng/miniconda3/envs/rgi/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'append'

As for the parser, it accepts json formats generated by the parser on the site without content (0 strict, 0 loose, o perfect) although everything is in the files, checked.

MicoNick avatar Jan 08 '24 19:01 MicoNick

@MicoNick what is the command you used and which version of RGI?

raphenya avatar Jan 09 '24 15:01 raphenya

@MicoNick what is the command you used and which version of RGI? @raphenya You're talking about rgi command for heatmap generation, rgi main or something else?

RGI v 6.0.3

MicoNick avatar Jan 09 '24 17:01 MicoNick

You're talking about rgi command for heatmap generation, rgi main or something else?

Yes, the command for the rgi heatmap.

raphenya avatar Jan 10 '24 15:01 raphenya

@raphenya rgi heatmap -i rgi_gene_res_blast -cat drug_class -f -clus both -d plain -o HM_gene/DJ_HM_DC

MicoNick avatar Jan 10 '24 17:01 MicoNick

You should update the package version because the bug was fixed.The issue was caused by a compatibility problem with pandas versions greater than 2. : stackoverflow

skon7 avatar Jan 23 '24 16:01 skon7

You should update the package version because the bug was fixed.The issue was caused by a compatibility problem with pandas versions greater than 2. : stackoverflow

Dear scon7, which package are we talking about? If RGI, it is already 6.0.3.

MicoNick avatar Jan 24 '24 07:01 MicoNick

@MicoNick the rgi heatmap only uses json files produced by rgi main. The rgi parser is used for generating json files for the RGI wheel on the card.mcmaster.ca website only. Hope that helps.

raphenya avatar Jan 31 '24 16:01 raphenya

@MicoNick the rgi heatmap only uses json files produced by rgi main. The rgi parser is used for generating json files for the RGI wheel on the card.mcmaster.ca website only. Hope that helps.

Dear Raphenya, I'm used rgi heatmap only with json files, which I put in the one directory. And rgi parser used for json generate, but this json has a strange visualised on the website (all wheels be a empty).

MicoNick avatar Jan 31 '24 20:01 MicoNick

Issue is stale and will be closed in 7 days unless there is new activity

github-actions[bot] avatar Apr 01 '24 11:04 github-actions[bot]

Dear colleagues, friends! Could you please suggest possible solutions to the problem?

MicoNick avatar Apr 03 '24 10:04 MicoNick

Issue is stale and will be closed in 7 days unless there is new activity

github-actions[bot] avatar Jun 02 '24 11:06 github-actions[bot]