[SQL/MEG] Add physiological_file.DownloadPath field#10411
[SQL/MEG] Add physiological_file.DownloadPath field#10411MaximeBICMTL wants to merge 3 commits intoaces:mainfrom
physiological_file.DownloadPath field#10411Conversation
jeffersoncasimir
left a comment
There was a problem hiding this comment.
LGTM, but missing change to raisinbread/RB_files/RB_physiological_file.sql
|
@jeffersoncasimir Added the Raisinbread SQL, good catch! |
10bfac2 to
df82158
Compare
|
Merged the main branch to resolve conflict, ready to go! |
|
I am not crazy about this because of the possibility of data between the two getting de-synced and not having a single source of truth, and also because of the data duplication. Is it not possible to either:
|
|
Hhhhm, I see your point but I think it would make the code more complicated and less responsive. IMO storing an archive in the BIDS is a big no-no because that is against the BIDS specification and makes it a lot harder to run BIDS libraries on the dataset, especially dataset-wide analyses where we would have to extract/copy every CTF acquisition in the dataset for each analysis. Regarding the opposite approach, I think tarring the directory on-request for download takes too much time and is not responsive enough. In fact, we already use the "copy multiple files into an archive for download" approach with the |
As discussed on Slack.
Problem
For the EEG data types that LORIS currently handles, the acquisition files are "real" files, which is very nice. However, for the MEG CTF data types, the acquisition files are actually directories. The BIDS specification says that these MEG CTF acquisitions must be stored as directories, not as archives, and the neuroscience libraries like MNE only work on directories. As such, it makes sense to store the MEG CTF as directories in the LORIS BIDS dataset. However, the users must also be able to download these acquisition files, which is problematic if those are directories.
Solution
Split
physiological_file.FilePathinto two fieldsFilePath(stays the same) andDownloadPath(new field):FilePathfield points to the directory in the BIDS dataset, and theDownloadPathpoints to an archive of that directory.Whenever computation needs to be done in the dataset, the
FilePathfield is used, whenever the user wants to download an acquisition file,DownloadPathis used.Testing
physiological_file.FilePathin the electrophysiology_modules.DownloadPathto an invalid value only breaks the main file download.