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

Error running rgi heatmap #284

Closed mradz19 closed 1 month ago

mradz19 commented 1 month ago

I am trying to run rgi heatmap on a metagenomic samples that were analyzed using rgi bwt. However I am getting this error:

rgi heatmap -i rgi_json/ -cat gene_family
Traceback (most recent call last):
  File "/kusers/ancillary/anaconda3/envs/rgi/bin/rgi", line 4, in <module>
    MainBase()
  File "/kusers/ancillary/anaconda3/envs/rgi/lib/python3.8/site-packages/app/MainBase.py", line 83, in __init__
    getattr(self, args.command)()
  File "/kusers/ancillary/anaconda3/envs/rgi/lib/python3.8/site-packages/app/MainBase.py", line 346, in heatmap
    self.heatmap_run(args)
  File "/kusers/ancillary/anaconda3/envs/rgi/lib/python3.8/site-packages/app/MainBase.py", line 365, in heatmap_run
    obj.run()
  File "/kusers/ancillary/anaconda3/envs/rgi/lib/python3.8/site-packages/app/Heatmap.py", line 469, in run
    complete_class_df= complete_class_df.set_index(["drug_class", "resistance_mechanism"], append=True)["gene_family"].apply(pd.Series).stack()
  File "/kusers/ancillary/anaconda3/envs/rgi/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'Series' object has no attribute 'stack'