New "associations" metadata
See original GitHub issueAdd a new attribute to BIDSFile
with a list of files associated to this particular BIDSFile
. Files listed here are, for instance:
- Events files and physio files corresponding to a particular functional run
- bvecs/bvals tables corresponding to a dwi image
- Any valid path with
IntendedFor
metadata pointing to this hit (e.g. fieldmaps).
The idea would be to minimize subsequent queries to the layout, and having a quick glimpse at the involvement of this hit in the context of the full dataset.
If this feature can be time consuming, then it could be protected by a return_associations
argument to get, which would be False
by default.
What do you guys think? I could work on this if you see it useful.
Proposed associations
-
BOLD runs:
events
,stim
,physio
.- fieldmaps/EPIs with
IntendedFor
pointers - SBRefs with matching names (i.e. sub-01_sbref.nii.gz would match all tasks, although this is unclear in the specs at the moment) or IntendedFor field (this IntendedFor is not in the spec at the moment, but I would submit a PR to have it).
- other echoes of ME-EPI
-
DWI runs:
- bvecs and bvals
- Matching B0s
- Matching SBRefs
- fieldmaps/EPIs with
IntendedFor
pointers
-
Multiecho anats:
- Matching echoes.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
Introduction to Metadata: Setting the Stage
Organization and description. A primary function of metadata is the description and ordering of original objects or items in a repository or collection...
Read more >Manage Association MetaData - Array Suite Wiki
Clear existing attributes for existing samples: If selected, and the metadata table includes Association already in Land, but the new table ...
Read more >WordPress Metadata Associations: How To Do It - Tom McFarlin
When using the CMS, we're used to relating data through WordPress metadata associations. Sometimes it's well-used; other times, it's abused.
Read more >Metadata Society | Matteo Pasquinelli
Metadata Society is the name given to the technopolitical form that emerges alongside and within the network society (Castells 1996) due to the ......
Read more >Metadata Update - IHE Wiki
MV036: Currently is permitted to add new Associations and Folders via Update Document Set so that the reshuffling of metadata to accommodate ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@oesteban okay now that I have a mostly working SQLAlchemy-backed branch of pybids (the variable ingestion stuff is currently broken, but all the core layout tests pass), I’ve thought about this a bit more, and I think it will actually be quite easy to implement using the DB, without needing to worry (yet) about all the I/O stuff I mentioned above. It’s straightforward to treat this purely at a database level. I’ll probably just create a
FileAssociation
join table that links any two files. Then there will be a single mapping function that executes immediately after the current indexing process is done, adding all associations between files. These will be queryable via a bidirectional.associations
property on the model.It would be helpful if you could flesh out as many of the association-defining rules you can think of. The main source of potential ambiguity/problems I can see is inheritance—it feels like it could get messy if we associate a root-level file with 600 files that inherit from it. On the other hand, it would still be good to register this association at DB level, as that would make walking up the tree unnecessary past the initial indexing process. So maybe we can have a closed set of relationship types or indicators, with one binary column being, say,
inherited
, whereTrue
would imply that the file is only associated via inheritance, andFalse
means there’s a direct relationship.Hi @tyarkoni, sorry for my slow response testing this. I’ve found a use case that needs revision:
What I’m missing here is one
<BIDSJSONFile filename='/home/oesteban/Data/sdcflows-tests/testdata/sub-HCP101006/fmap/sub-HCP101006_magnitude.nii.gz'>
, probably of kind"MetadataFrom"
or"InformedBy"
?That would allow reconstructing the whole metadata graph to set up distortion correction:
bold
->phasediff
(via IntendedFor) ->magnitude{1,2,}
(via hierarchy)