Cannot load publicly available nwb files with Matnwb (but works with Pynwb) #104
Unanswered
chrismkkim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to load the nwb files from the paper:
Kim, J. H., Daie, K., & Li, N. (2025). A combinatorial neural code for long-term motor memory. Nature, 637(8046), 663-672.
The nwb files are available in
https://dandiarchive.org/dandiset/001188/0.251008.1146
I was able to load the files in Python with Pynwb by installing its default version. However, in Matlab, loading the nwb file
nwbFile = nwbRead(filepath)with Matnwb produces following errors.It would create a variable type
types.core.VectorDatain the m-filegetNeurodataTypeInfo.m. But, this variable type does not exist in Matnwb version 2.10.0, since VectorData.m is defined under +types/+hdmf_common, not +types/+core. If I check the schema version of the nwb fileutil.getSchemaVersion(filepath), it's 2.7.0. I'm not sure if the Matnwb version should match with the schema version, but I've checked Matnwb version 2.7.0 and VectorData.m is also defined under +types/+hdmf_common.I wanted to ask if there are ways to properly load these nwb files. I can get around the above errors by forcing the variable type to be
types.hdmf_common.VectorData, but then there were additional error messages that appeared.Below is the error message I get from Matlab. I'd appreciate your help!
Error using feval
Unrecognized function or variable 'types.core.VectorData'.
Error in [io.createParsedType](matlab:matlab.lang.internal.introspective.errorDocCallback('io.createParsedType', '/Users/xxx/Documents/GitHub/matnwb/+io/createParsedType.m', 28)) ([line 28](matlab: opentoline('/Users/xxx/Documents/GitHub/matnwb/+io/createParsedType.m',28,0)))
typeInstance = feval(typeName, varargin{:}); % Create the type.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in [io.parseDataset](matlab:matlab.lang.internal.introspective.errorDocCallback('io.parseDataset', '/Users/xxx/Documents/GitHub/matnwb/+io/parseDataset.m', 86)) ([line 86](matlab: opentoline('/Users/xxx/Documents/GitHub/matnwb/+io/parseDataset.m',86,0)))
parsed = io.createParsedType(fullpath, Type.typename, kwargs{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in [io.parseGroup](matlab:matlab.lang.internal.introspective.errorDocCallback('io.parseGroup', '/Users/xxx/Documents/GitHub/matnwb/+io/parseGroup.m', 22)) ([line 22](matlab: opentoline('/Users/xxx/Documents/GitHub/matnwb/+io/parseGroup.m',22,0)))
dataset = io.parseDataset(filename, datasetInfo, fullPath, Blacklist);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in [io.parseGroup](matlab:matlab.lang.internal.introspective.errorDocCallback('io.parseGroup', '/Users/xxx/Documents/GitHub/matnwb/+io/parseGroup.m', 38)) ([line 38](matlab: opentoline('/Users/xxx/Documents/GitHub/matnwb/+io/parseGroup.m',38,0)))
subg = io.parseGroup(filename, group, Blacklist);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in [io.parseGroup](matlab:matlab.lang.internal.introspective.errorDocCallback('io.parseGroup', '/Users/xxx/Documents/GitHub/matnwb/+io/parseGroup.m', 38)) ([line 38](matlab: opentoline('/Users/xxx/Documents/GitHub/matnwb/+io/parseGroup.m',38,0)))
subg = io.parseGroup(filename, group, Blacklist);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in [nwbRead](matlab:matlab.lang.internal.introspective.errorDocCallback('nwbRead', '/Users/xxx/Documents/GitHub/matnwb/nwbRead.m', 99)) ([line 99](matlab: opentoline('/Users/xxx/Documents/GitHub/matnwb/nwbRead.m',99,0)))
nwb = io.parseGroup(filename, h5info(filename), blackList);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in [loadnwb_matlab](matlab:matlab.lang.internal.introspective.errorDocCallback('loadnwb_matlab', '/Users/xxx/Library/CloudStorage/OneDrive/loadnwb_matlab.m', 13)) ([line 13](matlab: opentoline('/Users/xxx/Library/CloudStorage/OneDrive/code/loadnwb_matlab.m',13,0)))
nwbFile = nwbRead(filepath);
Beta Was this translation helpful? Give feedback.
All reactions