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

Network annotation file incorrect error #56

Open
JGASmits opened this issue Mar 9, 2021 · 0 comments
Open

Network annotation file incorrect error #56

JGASmits opened this issue Mar 9, 2021 · 0 comments

Comments

@JGASmits
Copy link
Contributor

JGASmits commented Mar 9, 2021

When running ananse binding, with a costum bedfile with the wrong chromosome identifiers, the error is:

2021-03-05 14:03:23 | INFO | Loading expression
2021-03-05 14:04:39 | INFO | creating expression dataframe
2021-03-05 14:05:51 | INFO | Aggregate binding
2021-03-05 14:05:51 | INFO | reading enhancers
Traceback (most recent call last):
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 2898, 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 1675, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Start_b'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/vol/mbconda/jsmits/envs/ananse_dev/bin/ananse", line 371, in
args.func(args)
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/ananse/commands/network.py", line 28, in network
b.run_network(
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/ananse/network.py", line 552, in run_network
df_binding = self.aggregate_binding(
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/ananse/network.py", line 372, in aggregate_binding
gene_df = self.enhancer2gene(
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/ananse/network.py", line 274, in enhancer2gene
(genes["Start_b"] + genes["End_b"]) / 2 - genes["Start"]
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/pandas/core/frame.py", line 2906, in getitem
indexer = self.columns.get_loc(key)
File "/vol/mbconda/jsmits/envs/ananse_dev/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 2900, in get_loc
raise KeyError(key) from err
KeyError: 'Start_b'

Changing this to a more insightfull error message would be nice. :)

Gr

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