Skip to content

TypeError: unhashable type: 'Series' #4

@odionikh

Description

@odionikh

Hello, I found your paper very interesting and I am looking to use your tool on my plasmid genomes. However, I have gone through all the other steps of annotation (prokka and bakta), generating outputs from CD-HIT and AMRfinderplus. However, when trying to run ship I always run into "TypeError: unhashable type: 'Series'" error. Below is a traceback of the error.
I would be grateful for your feedback on this.
Thank you.

Traceback (most recent call last):
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship", line 8, in
sys.exit(main())
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/ship.py", line 132, in main
clusters = phylo.fit_predict(distance_function)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/utils/phylogeny.py", line 269, in fit_predict
self.fit(dist_f)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/utils/phylogeny.py", line 247, in fit
self.affinity = self.__build_affinity_matrix(dist_f)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/utils/phylogeny.py", line 131, in __build_affinity_matrix
graph_genomes[accession] = GraphGenome(
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/utils/genome.py", line 30, in init
self.build()
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/utils/genome.py", line 332, in build
self.get_amr_gene_names()
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/bin/ship_plasmid/utils/genome.py", line 100, in get_amr_gene_names
self.amr = self.amr.loc[self.id]
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/lib/python3.8/site-packages/pandas/core/indexing.py", line 1073, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/lib/python3.8/site-packages/pandas/core/indexing.py", line 1312, in _getitem_axis
return self._get_label(key, axis=axis)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/lib/python3.8/site-packages/pandas/core/indexing.py", line 1260, in _get_label
return self.obj.xs(label, axis=axis)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/lib/python3.8/site-packages/pandas/core/generic.py", line 4056, in xs
loc = index.get_loc(key)
File "/network/rit/lab/andamlab/bin/miniconda3/envs/ship/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 160, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 290, in pandas._libs.index.IndexEngine._ensure_mapping_populated
File "pandas/_libs/hashtable_class_helper.pxi", line 5778, in pandas._libs.hashtable.PyObjectHashTable.map_locations
TypeError: unhashable type: 'Series'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions