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

subject_id confusion #78

Closed
bendichter opened this issue Apr 10, 2020 · 5 comments
Closed

subject_id confusion #78

bendichter opened this issue Apr 10, 2020 · 5 comments

Comments

@bendichter
Copy link
Member

bendichter commented Apr 10, 2020

There are a few issues around subject_id:

  1. dandi validate does not enforce that subject_id is present, but dandi organize requires it.
  2. When dandi organize runs on a file that is missing subject_id it complains about missing metadata, but does not specify what this missing metadata is.
  3. Our user guide does not mention what to do in the case of dandi organize complaining, so a user will just carry on and will be confused when no data is uploaded.

This is all exacerbated by the fact that ipfx, the main conversion software for ABF and DAT icephys files out of the Allen Institute, doesn't currently even have a way to add a Subject object to the nwb file in the first place (so you can't specify subject_id). I have made a pull request to be able to add this information here.

@yarikoptic
Copy link
Member

#82 will address 1. and will be rush released later today (if all good)

Re 2. - I think it should have issued a warning like

2020-04-14 11:48:19,247 [ WARNING] subject_id is missing for ../../../.tmp/tmp1j6vvjnd/v2.0.1/test_OptogeneticStimulusSite.nwb

thus specifying which field (subject_id) and in what file. Could you please copy/paste complaint which you saw?

@TheChymera
Copy link
Contributor

@yarikoptic @bendichter has this been addressed in the mean time? can we close this?

@bendichter
Copy link
Member Author

bendichter commented Jul 3, 2023

  1. dandi validate does not enforce that subject_id is present, but dandi organize requires it.

This is fixed

$ dandi validate ../test_no_subj/
[DANDI.NO_DANDISET_FOUND] /Users/bendichter/dev/sandbox/test_no_subj — Path is not inside a Dandiset
[NWBI.check_subject_exists] /Users/bendichter/dev/sandbox/test_no_subj/no_subject.nwb — Subject is missing.
  1. When dandi organize runs on a file that is missing subject_id it complains about missing metadata, but does not specify what this missing metadata is.
$ dandi organize ../test_no_subj/ -f dry
2023-07-03 07:42:23,272 [    INFO] Loading metadata from 1 files
[Parallel(n_jobs=-1)]: Using backend LokyBackend with 10 concurrent workers.
[Parallel(n_jobs=-1)]: Done   1 tasks      | elapsed:    1.7s
[Parallel(n_jobs=-1)]: Done   1 out of   1 | elapsed:    1.7s finished
2023-07-03 07:42:24,962 [ WARNING] subject_id is missing for ../test_no_subj/no_subject.nwb
2023-07-03 07:42:24,962 [    INFO] Logs saved in /Users/bendichter/Library/Logs/dandi-cli/20230703114221Z-28770.log
Error: 1 out of 1 files were found not containing all necessary metadata: ../test_no_subj/no_subject.nwb

This is still the case. It reports that the file does not have all of the necessary metadata, but does not inform the user specifically that the subject_id is missing. I think it would be a smoother UX for dandi organize to output the same itemized messages as dandi validate, including the red color. Or, at least for NWB, you could output the report produced by NWB inspector.

  1. Our user guide does not mention what to do in the case of dandi organize complaining, so a user will just carry on and will be confused when no data is uploaded.

This is still the case, though I think this would be addressed sufficiently by fixing #2.

@yarikoptic
Copy link
Member

This is still the case. It reports that the file does not have all of the necessary metadata, but does not inform the user specifically that the subject_id is missing

isn't that what it says in

2023-07-03 07:42:24,962 [ WARNING] subject_id is missing for ../test_no_subj/no_subject.nwb

? I would also like to see colors to indicate errors

@bendichter
Copy link
Member Author

oh shoot there it is. OK yeah we can close this

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

3 participants