Skip to content

Commit

Permalink
ENH: Add flip, inv, mt, and part entities (#688)
Browse files Browse the repository at this point in the history
* Add new entity patterns.

* Incorporate part into path patterns.

This involves splitting the phase suffix from the bold, cbv, and sbref suffixes.

* Update nodot file too.
  • Loading branch information
tsalo authored Dec 19, 2020
1 parent 0d14325 commit 11f665b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
16 changes: 16 additions & 0 deletions bids/layout/config/bids-nodot.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@
"name": "echo",
"pattern": "[_/\\\\]+echo-([0-9]+)"
},
{
"name": "flip",
"pattern": "[_/\\\\]+flip-([0-9]+)"
},
{
"name": "inv",
"pattern": "[_/\\\\]+inv-([0-9]+)"
},
{
"name": "mt",
"pattern": "[_/\\\\]+mt-(on|off)"
},
{
"name": "part",
"pattern": "[_/\\\\]+part-(imag|mag|phase|real)"
},
{
"name": "recording",
"pattern": "[_/\\\\]+recording-([a-zA-Z0-9]+)"
Expand Down
23 changes: 20 additions & 3 deletions bids/layout/config/bids.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@
"name": "echo",
"pattern": "[_/\\\\]+echo-([0-9]+)"
},
{
"name": "flip",
"pattern": "[_/\\\\]+flip-([0-9]+)"
},
{
"name": "inv",
"pattern": "[_/\\\\]+inv-([0-9]+)"
},
{
"name": "mt",
"pattern": "[_/\\\\]+mt-(on|off)"
},
{
"name": "part",
"pattern": "[_/\\\\]+part-(imag|mag|phase|real)"
},
{
"name": "recording",
"pattern": "[_/\\\\]+recording-([a-zA-Z0-9]+)"
Expand Down Expand Up @@ -80,10 +96,11 @@
],

"default_path_patterns": [
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_part-{part}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_mod-{modality}]_{suffix<defacemask>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}]_{suffix<bold|cbv|phase|sbref>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<dwi>|dwi}/sub-{subject}[_ses-{session}][_acq-{acquisition}]_{suffix<dwi>}{extension<.bval|.bvec|.json|.nii.gz|.nii>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_part-{part}]_{suffix<bold|cbv|sbref>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}]_{suffix<phase>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<dwi>|dwi}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_part-{part}]_{suffix<dwi>}{extension<.bval|.bvec|.json|.nii.gz|.nii>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<fmap>|fmap}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_dir-{direction}][_run-{run}]_{fmap<phasediff|magnitude[12]|phase[12]|fieldmap>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<fmap>|fmap}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}]_dir-{direction}[_run-{run}]_{fmap<epi>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/[{datatype<func|meg|beh>|func}/]sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_recording-{recording}]_{suffix<events>}{extension<.tsv|.json>|.tsv}",
Expand Down

0 comments on commit 11f665b

Please sign in to comment.