Closed bendhouseart closed 11 months ago
I'm still uncertain as to how to match up spreadsheets with imaging data as they often aren't named even remotely close to each other, nor do the spreadsheets necessarily possess subject id or identifiers. It's really helter-skelter in PET land sometimes and it would be desirable that a user could match spreadsheets to PET imaging data via the bids editor.
That said, there's plenty of other testing and tooling for me to work on while I figure that out.
I'm still uncertain as to how to match up spreadsheets with imaging data as they often aren't named even remotely close to each other, nor do the spreadsheets necessarily possess subject id or identifiers. It's really helter-skelter in PET land sometimes and it would be desirable that a user could match spreadsheets to PET imaging data via the bids editor.
That's indeed tricky, because if they don't have a predictable name, how can we automate things? The user then needs to pick the excel for every subject/session, but bidsmaps map source datatypes to bids datatypes, so it is a shortlist of datatypes, not a longlist of sessions. If there is one excel sheet per datatype, then the user can import it, if the excel sheets varies per acquisition, then it needs to have a predictable name
How well behaved will BIDSCoin be if we simply place a spreadsheet into the imaging folder? It might just be easier to have PET2BIDS do PET spreadsheet things if it detects a PET spreadsheet in or near the imaging folder. This won't be wholly transparent to the user, however any inputs from BIDSCoin (editor -> bidsmap) do already override spreadsheet input so idk....
How well behaved will BIDSCoin be if we simply place a spreadsheet into the imaging folder? It might just be easier to have PET2BIDS do PET spreadsheet things if it detects a PET spreadsheet in or near the imaging folder. This won't be wholly transparent to the user, however any inputs from BIDSCoin (editor -> bidsmap) do already override spreadsheet input so idk....
I'm not sure what you mean with imaging folder, but I suppose that's what I call the source folder. But to answer your question, BIDScoin will not notice the spreadsheet so it will behave as normal.
BIDScoin will not notice the spreadsheet so it will behave as normal.
Ok, that might just be the easiest path forward.
Alright, so I've integrated the changes you pushed to Donders-Institute/bidscoin pet-spreadsheets
in, but I'm having trouble collecting the spreadsheet via _extatributes
. It seems like an extra folder is getting inserted into the path, see:
PosixPath('/var/folders/5t/0cjjt4t10hz5_qk4tts9gkv40000gs/T/tmpzb0q6gbw/Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-003/ses-01/30003-Phantom_PetAcquisition_AC Images/X-CAL_7.PT.Kalibrering_xca.30003.1.2022.04.26.15.04.22.218.xlsx')
Where the source data originates at:
`/Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-003/ses-01/X-CAL_7.PT.Kalibrering_xca.30003.1.2022.04.26.15.04.22.218.xlsx'
A BIDScoin datasource()
is an abstraction that reads source properties and, via plugins source attributes, and extended attributes. The get_attribute() function of pet2bids is already reading the excel attributes as normal attributes (next to the DICOM attributes), so the same data doesn't need to be read as extended attributes (you can just delete that code). So in this way, the excel attributes will be specific to pet2bids, and not available to all data formats. Users can enter the Excel key names (as dynamic values) in the bidseditor in the same way (transparently) anywhere in the bidsmap (e.g. in the bids table or in the meta table)
Sorry, the plugin doesn't seem to go forward anymore. You are are welcome to open a new one if you want to work on it again
Hey no worries @marcelzwiers, I can't begrudge you for cleaning up your repository here on github and closing stale PR's.
Have been focused on everything else, apologies if it slowed you down.
Cheers and Happy Holidays!
Adding support for spreadsheets, creating PR for @marcelzwiers to see what I'm up to.