staramr fails with "KeyError: 'Predicted Phenotype"

Hello, staramr doesn’t work anymore with my contigs or scaffolds (on galaxy.org or .eu). Maybe the problem come to panda version…

2022-05-09 02:41:45,626 INFO: No --plasmidfinder-database-type specified. Will search the entire PlasmidFinder database
2022-05-09 02:41:45,627 INFO: --output-dir not set. Files will be output to the respective --output-[type] setting
2022-05-09 02:41:45,629 INFO: Will exclude ResFinder/PointFinder genes listed in [/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/databases/exclude/data/genes_to_exclude.tsv]. Use --no-exclude-genes to disable
2022-05-09 02:42:09,897 INFO: Making BLAST databases for input files
2022-05-09 02:42:20,460 INFO: Scheduling blasts for S19LNR1552.fasta.fasta
2022-05-09 02:42:20,561 INFO: Scheduling blasts for S19LNR1326.fasta.fasta



2022-05-09 02:42:24,727 INFO: Scheduling blasts for 2009LSAL00864.fasta.fasta
2022-05-09 02:42:24,736 INFO: Scheduling blasts for 2009LSAL00195.fasta.fasta
2022-05-09 02:46:12,980 ERROR: ‘Predicted Phenotype’
Traceback (most recent call last):
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 3080, in get_loc
return self._engine.get_loc(casted_key)
File “pandas/_libs/index.pyx”, line 70, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/index.pyx”, line 101, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/hashtable_class_helper.pxi”, line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas/_libs/hashtable_class_helper.pxi”, line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘Predicted Phenotype’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/generic.py”, line 259, in aggregate
return self._python_agg_general(func, *args, **kwargs)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/groupby.py”, line 1173, in _python_agg_general
result, counts = self.grouper.agg_series(obj, f)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/ops.py”, line 706, in agg_series
return self._aggregate_series_fast(obj, func)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/ops.py”, line 732, in _aggregate_series_fast
result, counts = grouper.get_result()
File “pandas/_libs/reduction.pyx”, line 260, in pandas._libs.reduction.SeriesGrouper.get_result
File “pandas/_libs/reduction.pyx”, line 76, in pandas._libs.reduction._BaseGrouper._apply_to_group
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/groupby.py”, line 1160, in
f = lambda x: func(x, *args, **kwargs)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/results/AMRDetectionSummaryResistance.py”, line 23, in _aggregate_gene_phenotype
flattened_phenotype_list = [y.strip() for x in dataframe[‘Predicted Phenotype’].tolist() for y in
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/series.py”, line 851, in getitem
return self._get_value(key)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/series.py”, line 959, in _get_value
loc = self.index.get_loc(label)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 3082, in get_loc
raise KeyError(key) from err
KeyError: ‘Predicted Phenotype’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 3080, in get_loc
return self._engine.get_loc(casted_key)
File “pandas/_libs/index.pyx”, line 70, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/index.pyx”, line 101, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/hashtable_class_helper.pxi”, line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas/_libs/hashtable_class_helper.pxi”, line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘Predicted Phenotype’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/bin/staramr”, line 68, in
args.run_command(args)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/subcommand/Search.py”, line 426, in run
ignore_invalid_files=args.ignore_valid_files)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/subcommand/Search.py”, line 256, in _generate_results
report_all_blast, ignore_invalid_files)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/detection/AMRDetection.py”, line 131, in run_amr_detection
self._pointfinder_dataframe, self._plasmidfinder_dataframe)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/detection/AMRDetectionResistance.py”, line 70, in _create_amr_summary
return amr_detection_summary.create_summary(self._include_negative_results)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/results/AMRDetectionSummary.py”, line 132, in create_summary
resistance_frame = self._compile_results(resistance_frame)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/results/AMRDetectionSummaryResistance.py”, line 41, in _compile_results
.aggregate(self._aggregate_gene_phenotype)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/generic.py”, line 965, in aggregate
result = agg_list_like(self, [func], _axis=self.axis)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/aggregation.py”, line 637, in agg_list_like
new_res = colg.aggregate(arg)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/generic.py”, line 247, in aggregate
ret = self._aggregate_multiple_funcs(func)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/generic.py”, line 315, in _aggregate_multiple_funcs
results[base.OutputKey(label=name, position=idx)] = obj.aggregate(func)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/generic.py”, line 263, in aggregate
result = self._aggregate_named(func, *args, **kwargs)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/groupby/generic.py”, line 480, in _aggregate_named
output = func(group, *args, **kwargs)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/staramr/results/AMRDetectionSummaryResistance.py”, line 23, in _aggregate_gene_phenotype
flattened_phenotype_list = [y.strip() for x in dataframe[‘Predicted Phenotype’].tolist() for y in
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/series.py”, line 851, in getitem
return self._get_value(key)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/series.py”, line 959, in _get_value
loc = self.index.get_loc(label)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__staramr@0.5.1/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 3082, in get_loc
raise KeyError(key) from err
KeyError: ‘Predicted Phenotype’