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

Neurofinder regions don't load as they lack "regions" #6

Open
sofroniewn opened this issue Nov 23, 2016 · 1 comment
Open

Neurofinder regions don't load as they lack "regions" #6

sofroniewn opened this issue Nov 23, 2016 · 1 comment

Comments

@sofroniewn
Copy link

Trying to load the neurofinder regions using

import extraction as ex
model = ex.load(pathToRegions)

I get an error in the following line
---> 23 regions = many([x['coordinates'] for x in raw['regions']])

as they don't have any regions. If I add in
{"regions": .... }
to the JSON file then everything is ok.

This is easy for me to do, but I'm wondering why the regions keyword was added and if I should keep it in future json files.

@sofroniewn
Copy link
Author

After talking with @freeman-lab solution we agreed on is to check if there is a "regions" field, if yes load the array, if not just try loading the array. This will maintain backwards compatibility with the neurofinder data and allow us to load in the standard data format 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

1 participant