Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have problem plot out my result? #3

Open
parisashahnazari opened this issue Dec 14, 2022 · 0 comments
Open

I have problem plot out my result? #3

parisashahnazari opened this issue Dec 14, 2022 · 0 comments

Comments

@parisashahnazari
Copy link

Hello,
I run the commands with my data like your template. However, I have faced with this errors. Could you please help me to solve my problem?
KeyError Traceback (most recent call last)
File ~\anaconda3\envs\torch\lib\site-packages\pandas\core\indexes\base.py:3803, in Index.get_loc(self, key, method, tolerance)
3802 try:
-> 3803 return self._engine.get_loc(casted_key)
3804 except KeyError as err:

File ~\anaconda3\envs\torch\lib\site-packages\pandas_libs\index.pyx:138, in pandas._libs.index.IndexEngine.get_loc()

File ~\anaconda3\envs\torch\lib\site-packages\pandas_libs\index.pyx:165, in pandas._libs.index.IndexEngine.get_loc()

File pandas_libs\hashtable_class_helper.pxi:5745, in pandas._libs.hashtable.PyObjectHashTable.get_item()

File pandas_libs\hashtable_class_helper.pxi:5753, in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'fdr_bh adj. p-value'

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

KeyError Traceback (most recent call last)
Cell In [28], line 1
----> 1 plot_enrichment_analysis_results(results, "fdr_bh")

Cell In [27], line 2, in plot_enrichment_analysis_results(results, adj_method)
1 def plot_enrichment_analysis_results(results: pd.DataFrame, adj_method:str):
----> 2 fold_enrichment = np.abs(np.log(results["%s adj. p-value" % (adj_method)]))
3 plt.figure()
4 plt.title("Metabolite Sets Enrichment Overview")

File ~\anaconda3\envs\torch\lib\site-packages\pandas\core\frame.py:3804, in DataFrame.getitem(self, key)
3802 if self.columns.nlevels > 1:
3803 return self._getitem_multilevel(key)
-> 3804 indexer = self.columns.get_loc(key)
3805 if is_integer(indexer):
3806 indexer = [indexer]

File ~\anaconda3\envs\torch\lib\site-packages\pandas\core\indexes\base.py:3805, in Index.get_loc(self, key, method, tolerance)
3803 return self._engine.get_loc(casted_key)
3804 except KeyError as err:
-> 3805 raise KeyError(key) from err
3806 except TypeError:
3807 # If we have a listlike key, _check_indexing_error will raise
3808 # InvalidIndexError. Otherwise we fall through and re-raise
3809 # the TypeError.
3810 self._check_indexing_error(key)

KeyError: 'fdr_bh adj. p-value'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant