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

Dandi export of nwb w/ external files #1092

Closed
samuelbray32 opened this issue Sep 6, 2024 · 2 comments
Closed

Dandi export of nwb w/ external files #1092

samuelbray32 opened this issue Sep 6, 2024 · 2 comments
Assignees
Labels
infrastructure Unix, MySQL, etc. settings/issues impacting users

Comments

@samuelbray32
Copy link
Collaborator

samuelbray32 commented Sep 6, 2024

Describe the bug

  • Dandi has specific rules about nwb with external files.
    • Key example: raw nwb file with video
  • Our current organizing of the dandiset here results in the dandiset skipping all nwb with external files
  • dandi.organize.orgaize does provide an argument update_external_filepaths that fixes the issue to dandi standards and allows inclusion
    • However, this does edit the nwb file in the paper_dir/destination_dir folder
    • This currently is a symlink to the file on server. Edits would edit that file and break checksum

Proposed Solution

  • when putting symlinks in the paper_dir/destination_dir folder, check if the nwb has eternal filepaths
    • If so, copy the file to the folder instead
    • This is memory inneficient, but the file is only needed temporarily so can delete after
    • Open to other ideas here as well!
  • Now can allow update_external_filepaths=True in dandi.orgaize call.
    • edits the copied files with external filepaths, leaves originals inact
    • No checksum issue created or changes to originals
  • Files with external filepaths uploaded to dandi will have different checksum than database
    • fetch_nwb from dandi source doesn't trigger a checksum check so shouldn't be an issue
@samuelbray32 samuelbray32 added the infrastructure Unix, MySQL, etc. settings/issues impacting users label Sep 6, 2024
@samuelbray32 samuelbray32 self-assigned this Sep 6, 2024
@samuelbray32 samuelbray32 mentioned this issue Sep 9, 2024
7 tasks
@samuelbray32
Copy link
Collaborator Author

Update

  • Dandi will not accept the copied_.nwb files because they contain external links to objects in the original nwb file (e.g. acquisition['e-series']
  • We will instead need to upload the original nwb files to DANDI

Issues

  • Since the original nwb file is not tracked in spyglass the export process will need to find it and get it into the dandiset
  • Edits to external filepaths will affect the original unless we copy the whole file (very expensive)
  • Will need a tool to recreate the copy_.nwb file within the docker image filesystem from the original uploaded to DANDI

@edeno
Copy link
Collaborator

edeno commented Oct 3, 2024

Fixed by #1095

@edeno edeno closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Unix, MySQL, etc. settings/issues impacting users
Projects
None yet
Development

No branches or pull requests

2 participants