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

Improve functionality of ElectrodeCategoryReader #72

Open
ariel215 opened this issue Jun 18, 2018 · 2 comments
Open

Improve functionality of ElectrodeCategoryReader #72

ariel215 opened this issue Jun 18, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@ariel215
Copy link
Contributor

The electrode category file is highly irregular, but we do need to be able to consistently read it in a reasonable form

@ariel215 ariel215 added the enhancement New feature or request label Jun 18, 2018
@mivade
Copy link
Contributor

mivade commented Jun 19, 2018

What's wrong with the current reader for it? It handles a lot of the irregularities.

class ElectrodeCategoriesReader(BaseCMLReader):
"""Reads electrode_categories.txt and handles the many inconsistencies in
those files.
Returns a ``dict``.
"""

@esolomon
Copy link

esolomon commented Jul 12, 2018

@mivade Having looked at my personal code that handles electrode categories, I think providing you with some pseudocode would honestly be more useful:

For each line of electrode_categories.txt to be "decoded":
if 'seizure' in txt.lower() or 'soz' in txt.lower() or 'onset' in txt.lower():
Classify as "Seizure Onset Zone"

if 'ictal' in txt.lower():
Classify as 'Interictal Spiking'

if 'bad' in txt.lower() or 'broken' in txt.lower():
Classify as "Bad Electrode"

if 'lesion' in txt.lower():
Classify as "Brain Lesion"

In other words, search for ('seizure', 'soz') to find Seizure Onset Zone labels, search for ('ictal') to find Interictal Spiking electrodes, and search for ('broken', 'bad') to find Bad Electrodes.

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

No branches or pull requests

3 participants