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

[Bug]: Removing neurodata type from file does not work #649

Open
2 tasks done
ehennestad opened this issue Jan 16, 2025 · 0 comments
Open
2 tasks done

[Bug]: Removing neurodata type from file does not work #649

ehennestad opened this issue Jan 16, 2025 · 0 comments
Labels
category: bug errors in the code or code behavior topic: nwb-file relates to how an exported nwb file is structured

Comments

@ehennestad
Copy link
Collaborator

ehennestad commented Jan 16, 2025

What happened?

If a group or dataset is removed from an NWB file object which is read from disk, and the NWB file object is exported to the same file path, the group or dataset will still be present the next time the file is read in.

Steps to Reproduce

>> run('ophys');
- - - 
>> nwb = nwbRead('ophys_tutorial.nwb');
>> nwb.processing.get('ophys').nwbdatainterface

ans = 

  3×1 Set array with properties:

         Fluorescence: [types.core.Fluorescence]
    ImageSegmentation: [types.core.ImageSegmentation]
     MotionCorrection: [types.core.MotionCorrection]

>> nwb.processing.get('ophys').nwbdatainterface.remove("Fluorescence")

ans = 

  2×1 Set array with properties:

    ImageSegmentation: [types.core.ImageSegmentation]
     MotionCorrection: [types.core.MotionCorrection]

>> nwbExport(nwb, 'ophys_tutorial.nwb')
>> nwb = nwbRead('ophys_tutorial.nwb');
>> nwb.processing.get('ophys').nwbdatainterface

ans = 

  3×1 Set array with properties:

         Fluorescence: [types.core.Fluorescence]
    ImageSegmentation: [types.core.ImageSegmentation]
     MotionCorrection: [types.core.MotionCorrection]

>>

Error Message

No error

Operating System

Windows

Matlab Version

R2023b

Code of Conduct

@ehennestad ehennestad added category: bug errors in the code or code behavior topic: nwb-file relates to how an exported nwb file is structured labels Jan 16, 2025
@ehennestad ehennestad changed the title [Bug]: [Bug]: Removing neurodata type from file does not work Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior topic: nwb-file relates to how an exported nwb file is structured
Projects
None yet
Development

No branches or pull requests

1 participant