bids-standard / BEP028_BIDSprov

Organizing and coordinating BIDS extension proposal 28 : BIDS Provenance
https://bids.neuroimaging.io/bep028
Creative Commons Attribution 4.0 International
4 stars 12 forks source link

[WIP][VIZ] handle single definition across multiple files - SPM example #31

Closed remiadon closed 4 years ago

remiadon commented 4 years ago

@cmaumet here is the graph I get for SPM default, simply running

python bids_prov/visualize.py examples/spm_default/*.json -o spm_defautl.png

It's a large graph, maybe we can shorten names and identifiers for readability.

spm_defautl

cmaumet commented 4 years ago

Hi @remiadon! Great! It looks like a few links are missing (which might help with getting the schema a bit more vertical): for example segment activity has no used relationship? Or anat unzipped is not used by any activity?

remiadon commented 4 years ago

@cmaumet here is tthe graph I get now, running

python bids_prov/visualize.py examples/spm_default/*.json --omit-details -o spm_defautl.png

spm_defautl

I added an --omit-details flag, to skip optional fields and make the graph clearer

cmaumet commented 4 years ago

Discussed w/ @remiadon on Sept 22:

remiadon commented 4 years ago

@cmaumet I went on the W3C doc and searched for "qualified relationship" According to these graphs, it seems that those relations won't help with simplifying the overall representation of our graph, as such relationship is modeled as an extra node

remiadon commented 4 years ago

@cmaumet I tried to represent the "edit file" operation using prov:wasInfluencedBy. I get a graph with a single SPM.mat file

spm_default

remiadon commented 4 years ago

Note that this is the best looking graph I ever had, "raw"-labeled data sources are located at the top while produced outputs lie at the bottom

remiadon commented 4 years ago

@cmaumet can you comment on the graph above please ? If you are OK we'll have to add this in new_features.md

cmaumet commented 4 years ago

Thanks @remiadon! The graph looks great!!

Agreed on qualified relationship adding complexity to the graph...

I'm not sure about wasInfluencedBy, I'll have to double-check.

cmaumet commented 4 years ago

I'd say let's merge this PR and fix the remaining few things in a separate PR (that do not include the multi-file reading).