Clarify that age Units could be overriden + that type is number OR "89+" string#1791
Clarify that age Units could be overriden + that type is number OR "89+" string#1791yarikoptic wants to merge 1 commit intobids-standard:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1791 +/- ##
=======================================
Coverage 87.93% 87.93%
=======================================
Files 16 16
Lines 1351 1351
=======================================
Hits 1188 1188
Misses 163 163 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sappelhoff
left a comment
There was a problem hiding this comment.
I think it's a good idea to support other units than "Years" and have it be specified under "units"
|
conflict since since then JSON schema so @effigies, to get back on this one and to allow to overload units for the age (needed or desired for animal and babies research and #1839 ) -- I should replace current |
|
The JSON-sidecar-style column definitions are overridable by JSON sidecars, so age is overridable. What we have here is something that's not describable by the JSON sidecar definitions. There's no notion of "anyOf" in column definitions in BIDS. |
|
so what do you think we should do then @effigies? could/should we switch back to "BIDS YAML" definition? |
|
I suppose our options are:
For option (3), we could allow anyOf:
- type: number
- type: string
enum: {Levels.keys()}Then we would update this description to be: definition: {
"LongName": "Subject age",
"Description": "Subject age in postnatal years",
"Units": "year",
+ "Levels": {
+ "89+": "Subject at least 89 years old"
+ }
}cc @rwblair for thoughts. |
|
eh, I wish we had discussed this issue and overall dichotomy of two types of column definitions (#2048) at the recent BIDS maintainers meeting, since it remains very confusing, non-intuitive (to me at least), and not documented AFAIK. and people keep coming up with new "Units" values thus making them not "machine usable"$> for j in ds*/participants.json; do jq '.age.Units' $j; done | sort | uniq -c
jq: error (at ds002873/participants.json:577): Cannot index array with string "age"
1 "full year"
2 "Measurement units. [<prefix symbol>]<unit symbol> format following the SI standard is RECOMMENDED"
344 null
1 "week olds"
1 "weeks"
17 "year"
1 "(years)"
303 "years"
29 "Years"
3 "years old"
1 "years (rounded down)"
3 "Years, with one quantile precision"
for j in ds*/participants.json; do; jq '.age.Units' $j; done 28.85s user 2.61s system 65% cpu 47.874 total
sort 0.00s user 0.02s system 0% cpu 47.875 total
uniq -c 0.00s user 0.00s system 0% cpu 47.874 totaland likely validator does not even warn about those unknown "Units" values, as e.g. in https://openneuro.org/datasets/ds003505/versions/1.1.2 which has definition: {
"LongName": "Subject age",
"Description": "Subject age in postnatal years",
"Units": "year",
}we do not even validate that it is a numeric value and thus ok with anything, including In case of going with
don't we still leave people ability to override |
|
Maybe it would be good to have a call? We've gone back and forth several times, and I'm not really sure what else to write. |
|
Worst comes to worst, let's meet and discuss late July I am back to East coast, may be in some convenient BBQ atmosphere. |
Ultimately closes #1633
FWIW here is what I see among openneuro datasets ATM
and among examples
so nobody uses it really besides 1 "weeks". If we decide to go for it we need