NeurodataWithoutBorders / matnwb

A Matlab interface for reading and writing NWB files
BSD 2-Clause "Simplified" License
50 stars 32 forks source link

Version 0.2.1 set up bug #152

Closed shijiegu closed 5 years ago

shijiegu commented 5 years ago

Hello,

I looked for a nearest label for version 0.2.1. I followed the instruction for set up, but it does not work: Java issues, and I hope I could find some support from you.

I also tried generateExtension. And I also tried what was mentioned in the Caveat in ReadMe and used python's schema instead. It returned the same issue.

Besides this Java issue, the ReadMe mentioned version issues with schema and actually I also noticed that there have been some changes in the use of some functions as well. I wonder if the ReadMe is up to date.

Thanks, I hope the issue is not too silly and/or I could get some response... Shijie

-------MATLAB ERROR------ generateCore('/Users/gushijie/Documents/MATLAB/nwb/schema/core/nwb.namespace.yaml'); Error using yaml.getSourceInfo (line 6) Java exception occurred: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map at Schema.read(Schema.java:11)

Error in generateExtension (line 30) schema = yaml.getSourceInfo(localpath, filenames{:});

Error in generateCore (line 22) generateExtension(core);

bendichter commented 5 years ago

Shije,

thanks for the report. I have never seen this issue before. What version of MATLAB are you using?

shijiegu commented 5 years ago

Hello Ben, Thanks for reaching out! I am using R2018a. Too old? Shijie

bendichter commented 5 years ago

2018 should be OK. What is your OS?

shijiegu commented 5 years ago

It's Mac OS X El Capitan, Version 10.11.2

shijiegu commented 5 years ago

How about let me try it on a windows tomorrow and then I will update you and see if it's an OS issue? Thanks!!!

bendichter commented 5 years ago

Could you try running the code from within the matnwb directory as your cwd? i.e. generateCore('schema/core/nwb.namespace.yaml')

shijiegu commented 5 years ago

Hello Ben, So it works on Windows on 2016b MATLAB!

HOWEVER, even though I have set up the namespace yaml, I did not get to read the calcium imaging data in nwb by readnwb as there are only two structures: map(no data at all) and fcn(empty) in the nwb structure.

So then I think I should do this: generateExtension('schema/core/nwb.ophys.yaml'); which took a loooong time so I figured if this the correct thing to do to set up?

Shijie

bendichter commented 5 years ago

No you don't need to run that. What data are you trying to load?

shijiegu commented 5 years ago

I'm trying to load data from Allen's Institute. An example is: http://api.brain-map.org/api/v2/well_known_file_download/662930194

which, i have tried to use HDF5 loading methods to peak into the structure of the file, and it has a lot of stuff. And nwbread's result is apparently not reflecting the correct contents.

Thanks Ben!!!!

shijiegu commented 5 years ago

Hey Ben, I figured things out. I simply used HDF5 tools to read data and matlab's HDF5 functions to load and extract. Shijie

bendichter commented 5 years ago

Some older Allen data is in NWB 1.0 or other formats. It looks like that's the case here so I think using HDF5 tools is best.

On Tue, Jul 2, 2019, 8:25 AM Shijie Gu notifications@github.com wrote:

Hey Ben, I figured things out. I simply used HDF5 tools to read data and matlab's HDF5 functions to load and extract. Shijie

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeurodataWithoutBorders/matnwb/issues/152?email_source=notifications&email_token=AAGOEERXQCPDJNWICZTCAD3P5NCMRA5CNFSM4H3Q6KS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZBC7UI#issuecomment-507654097, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGOEESHV7T7VOA67XSW74TP5NCMRANCNFSM4H3Q6KSQ .

shijiegu commented 5 years ago

Might worth adding this note to ReadMe?

bendichter commented 5 years ago

Yeah we can add that