arpcard / rgi

Resistance Gene Identifier (RGI). Software to predict resistomes from protein or nucleotide data, including metagenomics data, based on homology and SNP models.
Other
314 stars 75 forks source link

RGI heatmap/parser Issue [BUG] #263

Closed MicoNick closed 1 month ago

MicoNick commented 6 months ago

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.

raphenya commented 6 months ago

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

MicoNick commented 6 months ago

@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

raphenya commented 6 months ago

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

Yes, the command for the rgi heatmap.

MicoNick commented 6 months ago

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

skon7 commented 6 months ago

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

MicoNick commented 6 months ago

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.

raphenya commented 5 months ago

@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.

MicoNick commented 5 months ago

@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).

github-actions[bot] commented 3 months ago

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

MicoNick commented 3 months ago

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

github-actions[bot] commented 1 month ago

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