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

Multiple Entities as input/output #46

Closed remiadon closed 4 years ago

remiadon commented 4 years ago

Update proposal for BIDS Prov (BEP028)

Problem Statement

Defining a pipeline usually consist in linking functions (Activities) to their inputs/outputs (entities), knowing the context (Agents) Allowing only one input/output pair per Activity will probably end up in defining an artificially high number of activities, and quickly become cumbersome

Rationale

As an example, the segment activity in the SPM default example takes a single entity as input : a .nii updated header, and generates 5 distinct tissue files, so we need to allow for multiple entries/outputs to be declared. This way we can quickly link to the same activity, which is appropriate for reading/querying

Minimal example

Here is the entity definition for spm_default/coreg_and_segment.json

      {
        "@id": "niiri:fsiud1",
        "label": "tissue1",
        "wasAttributedTo": "RRID:SCR_007037",
        "wasGeneratedBy": "niiri:sdfsdofjiosdf",
        "derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
        "prov:atLocation": "$HOME/spm12/tpm/TPM.nii,1"
      },
      {
        "@id": "niiri:fsiud2",
        "label": "tissue2",
        "wasAttributedTo": "RRID:SCR_007037",
        "wasGeneratedBy": "niiri:sdfsdofjiosdf",
        "derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
        "prov:atLocation": "$HOME/spm12/tpm/TPM.nii,2"
      },
...

and here is the associated subgraph

Screen Shot 2020-11-03 at 10 17 21
cmaumet commented 4 years ago

Hi @remiadon! Thanks for this! I think we are good with having multiple entry/output per Activity. I don't recall the single entry/output as a constraint that was explicitely mentionned in the spec, is this something you've seen in there?

remiadon commented 4 years ago

@cmaumet nope but we listed it as an new feature ... don't recall why exactly

If you think this is redundant or not even relevant I can remove it :)

cmaumet commented 4 years ago

I think we are good on this one. At least this is what we had done for NIDM-Results and NIDM-Experiment.

remiadon commented 4 years ago

@cmaumet then closing this