Skip to content

Commit

Permalink
Merge pull request #62 from bids-standard/remove_wasAttributedTo
Browse files Browse the repository at this point in the history
[RM] wasAttributedTo
  • Loading branch information
cmaumet authored Jun 18, 2021
2 parents ebd8b85 + 564df3a commit 8ece8a5
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 35 deletions.
6 changes: 4 additions & 2 deletions bids_prov/spm_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def get_input_entity(left, right):
"@id": "niiri:" + entity_label + get_id(),
"label": entity_label,
"prov:atLocation": right[2:-3],
# "wasAttributedTo": "RRID:SCR_007037",
}
return entity

Expand All @@ -55,6 +54,9 @@ def preproc_param_value(val):
def readlines(filename):
with open(filename) as fd:
for line in fd:
if line.count("{") != line.count("}"):
# TODO handle multiline definition
continue
if line.startswith("matlabbatch"):
yield line[:-1] # remove "\n"

Expand Down Expand Up @@ -166,7 +168,7 @@ def get_records(task_groups: dict, records=defaultdict(list)):
"label": parts[-1],
# "prov:atLocation": TODO
"wasGeneratedBy": closest_activity["@id"],
# "wasAttributedTo": "RRID:SCR_007037",
#
}
)
else:
Expand Down
4 changes: 0 additions & 4 deletions context.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
"@id": "http://www.w3.org/ns/prov#wasGeneratedBy",
"@type": "http://www.w3.org/2001/XMLSchema#Entity"
},
"wasAttributedTo" : {
"@id": "http://www.w3.org/ns/prov#wasAttributedTo",
"@type": "http://www.w3.org/2001/XMLSchema#Agent"
},
"wasAssociatedWith" : {
"@id": "http://www.w3.org/ns/prov#wasAssociatedWith",
"@type": "http://www.w3.org/2001/XMLSchema#Agent"
Expand Down
2 changes: 1 addition & 1 deletion examples/fmriprep/simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@id": "niiri:dsk100010",
"label": "preprocessed functional images",
"prov:atLocation": "niiri:bids-input-dir/T1/*.nii.gz",
"attributedTo": "RRID:SCR_016216",

"wasGeneratedBy": "niiri:1489292_call"
}
]
Expand Down
12 changes: 6 additions & 6 deletions examples/fsl_default/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,39 +61,39 @@
"@id": "niiri:dskjn1902",
"label": "functional",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_002823"

},
{
"@id": "niiri:ksdqndns100201",
"label": "Aligned functional",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_002823",

"wasGeneratedBy": "niiri:sqlspspsppsp20202"
},
{
"@id": "niiri:vbvbbvbv_undistorted_func",
"label": "un-distorted functional",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_00184",

"wasGeneratedBy": "niiri:fsqjklnfqljnfnfnnf_unwarp"
},
{
"@id": "niiri:dfsjnsqkdfnjsn_contrasts",
"label": "contrasts",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_00184"

},
{
"@id": "niiri:dfsjnsqkdfnjsn_design_matrix",
"label": "Design matrix",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_00184"

},
{
"@id": "niiri:dfsjnsqkdfnjsn_prestats_output",
"label": "Prestats output",
"prov:atLocation": "TODO",
"attributedTo": "RRID:SCR_00184",

"wasGeneratedBy": "niiri:fsqjklnfqljnfnfnnf_prestats"
}
]
Expand Down
6 changes: 3 additions & 3 deletions examples/fsl_default/group_analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
"@id": "niiri:rezoiurozeiuriozuro",
"label": "Transformation files",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_00184",

"wasGeneratedBy": "niiri:qndjnqndnfsdnfnsdf_registration"
},
{
"@id": "niiri:dfsjnsqkdfnjsn_copes",
"label": "copes",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_00184",

"wasGeneratedBy": "niiri:qndjnqndnfsdnfnsdf_registration"
},
{
"@id": "niiri:dfsjnsqkdfnjsn_varcopes",
"label": "varcopes",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_00184",

"wasGeneratedBy": "niiri:qndjnqndnfsdnfnsdf_registration"
}
]
Expand Down
6 changes: 3 additions & 3 deletions examples/fsl_default/single_subject_inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
"@id": "niiri:dskjn1904_zstats",
"label": "zstats.nii.gz",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_002823",

"wasGeneratedBy": "niiri:fsqjklnfqljnfnfnnf_stats"
},
{
"@id": "niiri:dskjn1904_thresh",
"label": "tresholds",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_002823"

},
{
"@id": "niiri:dskjn1904_results",
"label": "results",
"prov:atLocation": "niiri:TODO",
"attributedTo": "RRID:SCR_002823",

"wasGeneratedBy": "niiri:sqlspspsppsp_significance_testing"
}
]
Expand Down
4 changes: 2 additions & 2 deletions examples/spm_default/copies.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
"label": "anat unzipped",
"prov:atLocation": "??????",
"derivedFrom": "niiri:sjhgdfhjsgd63q5aaafa",
"attributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:6534673543aaaaaaa"
},
{
"@id": "niiri:sjhgdqd",
"label": "func unzipped",
"prov:atLocation": "$HOME/nidm-results-examples/spm_default/ds011/PREPROCESSING/FUNCTIONAL/*",
"derivedFrom": "niiri:sjhgdf673gbdsjdfsqjnfd",
"attributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:653467354367537g345523efdghs"
}
]
Expand Down
16 changes: 8 additions & 8 deletions examples/spm_default/coreg_and_segment.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
{
"@id": "niiri:fsiudfqsoi938409283409fdskj",
"label": ".nii updated header",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:fdsljfnqkljfdklqsjdfq",
"derivedFrom": [
"niiri:fdsjnflqj12381U39fdskjnf",
Expand All @@ -104,55 +104,55 @@
{
"@id": "niiri:102983fsdkjnfskjdfnks129",
"label": "anat bias corrected",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:sdfsdofjiosdf",
"derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
"prov:atLocation": "$HOME/spm12/tpm/"
},
{
"@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"
},
{
"@id": "niiri:fsiud3",
"label": "tissue3",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:sdfsdofjiosdf",
"derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
"prov:atLocation": "$HOME/spm12/tpm/TPM.nii,3"
},
{
"@id": "niiri:fsiud4",
"label": "tissue4",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:sdfsdofjiosdf",
"derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
"prov:atLocation": "$HOME/spm12/tpm/TPM.nii,4"
},
{
"@id": "niiri:fsiud5",
"label": "tisue5",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:sdfsdofjiosdf",
"derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
"prov:atLocation": "$HOME/spm12/tpm/TPM.nii,5"
},
{
"@id": "niiri:fsiud6",
"label": "tissue6",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:sdfsdofjiosdf",
"derivedFrom": "niiri:fsiudfqsoi938409283409fdskj",
"prov:atLocation": "$HOME/spm12/tpm/TPM.nii,6"
Expand Down
2 changes: 1 addition & 1 deletion examples/spm_default/model_and_contrast.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@id": "niiri:dsjknl1029d",
"label": "SPM.mat",
"prov:atLocation": "TODO",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:fsdfksnf1290883",
"prov:wasInfluencedBy": "niiri:fsdfksnf1290883"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/spm_default/normalise.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"@id": "niiri:2378783298182821NDN",
"label": "normalised func",
"prov:atLocation": "func_normalised_location.nii",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:fsdknfsqkldf12238123818288",
"derivedFrom": "niiri:fdsjnflqj12381U39fdskjnf"
},
{
"@id": "niiri:12837873NDN",
"label": "normalised anat",
"prov:atLocation": "anat_normalised_location.nii",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:fsdknfsqkld123980932",
"derivedFrom": "niiri:102983fsdkjnfskjdfnks129"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/spm_default/realign.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"prov:Entity": [
{
"@id": "niiri:fdsjnflqj12381U39fdskjnf",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:fdskjfnskjndflqkjndl",
"derivedFrom": "niiri:sjhgdqd",
"label": "Realigned func",
Expand Down
2 changes: 1 addition & 1 deletion examples/spm_default/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"generatedAt": "2019-10-10T10:00:00",
"derivedFrom": "niiri:dsjknl1029d",
"wasGeneratedBy": "niiri:qkjsnd1283NDQSNKDQ",
"wasAttributedTo": "RRID:SCR_007037"

}
]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/spm_default/smooth.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@id": "niiri:fjsdnf290",
"label": "Smoothed functional images",
"prov:atLocation": "TODO",
"wasAttributedTo": "RRID:SCR_007037",

"wasGeneratedBy": "niiri:smm343",
"derivedFrom": "niiri:2378783298182821NDN"
}
Expand Down

0 comments on commit 8ece8a5

Please sign in to comment.