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

Empty direct_hit_list because node_list byte objects not decoded #1

Open
rtroper opened this issue Jan 31, 2021 · 1 comment
Open

Comments

@rtroper
Copy link

rtroper commented Jan 31, 2021

On line 117 of connect_all_patients.py, I end up with an empty list for direct_hit_list because the byte objects in node_list (line 28) have not been decoded to get strings. Therefore, the list in line 116 ends up with all False values. I fixed this by adding the following line right after node_list is read from file on line 28:

node_list = np.array([node.decode() for node in node_list])

This fixed the issue, giving me a list of 3183 items for direct_hit_list (on line 117). This, then, gave me the expected output:

SEP STATS: (3183,) Counter({'SideEffect': 1851, 'Compound': 922, 'Symptom': 257, 'Disease': 137, 'Gene': 16})

@zhpinkman
Copy link

@rtroper Thanks a lot for the tip. I reckon the same thing should be done in the make_psevs_by_node_type.py file too.

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

2 participants