Skip to content

Commit 48610eb

Browse files
committed
Add tests for linked entities
1 parent 6c883ad commit 48610eb

23 files changed

+160
-35
lines changed

bids_prov/merge.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_associated_sidecar(layout: BIDSLayout, data_file: BIDSFile) -> dict:
2424
derivative datasets.
2525
2626
Return the associated sidecar of a BIDSFile in a given BIDSLayout.
27+
This returns None if no such sidecar exists.
2728
"""
2829
filename = Path(data_file.path)
2930
extensions = ''.join(filename.suffixes)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# BEP028 example dataset - SPM based fMRI statistical analysis with no provenance records
2+
3+
This example aims at showing a functional MRI preprocessing performed with [`SPM`](https://www.fil.ion.ucl.ac.uk/spm/) before provenance records are added to it.
4+
5+
## Source dataset
6+
7+
This is a derivative dataset, based upon `sub-01` data from OpenfMRI DS000011 classification learning and tone counting experiment (cf. https://openfmri.org/dataset/ds000011/)
8+
9+
## Code
10+
11+
The Matlab batch file `code/spm_preprocessing.m` allows to perform the preprocessing.
12+
13+
## Directory tree
14+
15+
The directory tree is as follows:
16+
17+
```
18+
.
19+
├── code
20+
│ ├── merge_prov.py
21+
│ └── spm_preprocessing.m
22+
├── dataset_description.json
23+
├── prov
24+
│ ├── prov-spm_act.json
25+
│ ├── prov-spm_ent.json
26+
│ ├── prov-spm.jsonld
27+
│ ├── prov-spm.png
28+
│ └── prov-spm_soft.json
29+
├── README.md
30+
└── SPM
31+
└── PREPROCESSING
32+
├── ANATOMICAL
33+
│ ├── c1sub-01_T1w.nii
34+
│ ├── c2sub-01_T1w.nii
35+
│ ├── c3sub-01_T1w.nii
36+
│ ├── c4sub-01_T1w.nii
37+
│ ├── c5sub-01_T1w.nii
38+
│ ├── msub-01_T1w.nii
39+
│ ├── sub-01_T1w.nii
40+
│ ├── sub-01_T1w.nii.gz
41+
│ ├── sub-01_T1w_seg8.mat
42+
│ ├── wmsub-01_T1w.nii
43+
│ └── y_sub-01_T1w.nii
44+
└── FUNCTIONAL
45+
├── meansub-01_task-tonecounting_bold.nii
46+
├── rp_sub-01_task-tonecounting_bold.txt
47+
├── sub-01_task-tonecounting_bold.mat
48+
├── sub-01_task-tonecounting_bold.nii
49+
├── sub-01_task-tonecounting_bold.nii.gz
50+
├── swsub-01_task-tonecounting_bold.nii
51+
└── wsub-01_task-tonecounting_bold.nii
52+
53+
```
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"Name": "SPM-based fMRI statistical analysis",
3+
"BIDSVersion": "1.10.0",
4+
"DatasetType": "derivative",
5+
"License": "CC0",
6+
"Authors": [
7+
"Boris Clénet",
8+
"Thomas Betton",
9+
"Hermann Courteille",
10+
"Cyril Regan"
11+
],
12+
"GeneratedBy": [
13+
{
14+
"Name": "SPM preprocessing"
15+
}
16+
],
17+
"SourceDatasets": [
18+
{
19+
"URL": "ds000011",
20+
"Version": "1.0.0"
21+
},
22+
{
23+
"URL": "https://github.com/incf-nidash/nidmresults-examples/"
24+
}
25+
],
26+
"DatasetLinks": {
27+
"ds000011": "https://doi.org/10.18112/openneuro.ds000011.v1.0.0"
28+
}
29+
}

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/c1sub-01_T1w.nii

Whitespace-only changes.

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/c2sub-01_T1w.nii

Whitespace-only changes.

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/c3sub-01_T1w.nii

Whitespace-only changes.

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/c4sub-01_T1w.nii

Whitespace-only changes.

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/c5sub-01_T1w.nii

Whitespace-only changes.

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/msub-01_T1w.nii

Whitespace-only changes.

bids_prov/tests/samples_test/provenance_ds00/sub-01/anat/sub-01_T1w.nii

Whitespace-only changes.

0 commit comments

Comments
 (0)