You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"sex": {
"Annotations": {
"IsAbout": {
"TermURL": "nb:Sex",
"Label": ""
},
"Levels": {
"F": {
"TermURL": "snomed:248152002",
"Label": ""
},
"M": {
"TermURL": "snomed:248153007",
"Label": ""
}
}
},
"Description": "There should have been a description here, but there wasn't. :("
}
is a valid data dictionary entry for a categorical column under our current data model for data dictionaries.
It does not however have the "Levels" key in the BIDS portion of the dictionary (i.e. outside the "Annotations" key).
The fact that this is valid is it's own issue (#151 and #152).
But we do rely on the presence of the BIDS "Levels" key to determine whether a column is categorical or not:
The CLI determines that the "sex" column is continuous because it does not have a "Levels" key and therefore is not categorical (and we do not positively assert continous columns, it's just the catch-all bucket if it isn't missing or categorical)
The CLI tries to run get_age_heuristic on the sex column because it thinks it is continuous
Is there an existing issue for this?
Expected Behavior
is a valid data dictionary entry for a categorical column under our current data model for data dictionaries.
It does not however have the
"Levels"
key in the BIDS portion of the dictionary (i.e. outside the"Annotations"
key).The fact that this is valid is it's own issue (#151 and #152).
But we do rely on the presence of the BIDS
"Levels"
key to determine whether a column is categorical or not:bagel-cli/bagel/pheno_utils.py
Lines 166 to 173 in dd54f14
and
bagel-cli/bagel/pheno_utils.py
Lines 107 to 111 in dd54f14
And as a consequence, in the above example these things will happen:
"sex"
column iscontinuous
because it does not have a"Levels"
key and therefore is not categorical (and we do not positively assert continous columns, it's just the catch-all bucket if it isn't missing or categorical)get_age_heuristic
on thesex
column because it thinks it is continuousbagel-cli/bagel/pheno_utils.py
Lines 121 to 122 in dd54f14
4. We get a
KeyError
because our column does not have aTransformation
keyCurrent Behavior
No response
Error message
Long snippet
ToDo:
detect_categorical
heuristic to look for"Levels"
key inside of the"Annotations"
sectionThe text was updated successfully, but these errors were encountered: