Skip to content

Commit 26d1311

Browse files
committed
Remove optional "TermURL" from participants.tsv file since the description is not BIDS valid
1 parent dbc2a0e commit 26d1311

File tree

5 files changed

+10
-54
lines changed

5 files changed

+10
-54
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BIDScoin: Coin your imaging data to BIDS
1414

1515
|PyPI version| |BIDS| |PyPI - Python Version| |GPLv3| |RTD|
1616

17-
BIDScoin is a user friendly `open-source <https://github.com/Donders-Institute/bidscoin>`__ python toolkit that converts ("coins") source-level (raw) neuroimaging data-sets to `nifti <https://nifti.nimh.nih.gov/>`__ / `json <https://www.json.org/>`__ / `tsv <https://en.wikipedia.org/wiki/Tab-separated_values>`__ data-sets that are organized following the Brain Imaging Data Structure, a.k.a. the `BIDS <http://bids.neuroimaging.io>`__ standard. Rather then depending on complex or ambiguous programmatic logic for the identification of imaging modalities, BIDScoin uses a mapping approach to identify and convert the raw source data into BIDS data. Different runs of source data are identified by reading information from MRI header files (DICOM or PAR/REC; e.g. 'ProtocolName') and the mapping information about how these runs should be converted to BIDS can be specified a priori as well as interactively by the researcher -- bringing in the missing knowledge that often exists only in his or her head!
17+
BIDScoin is a user friendly `open-source <https://github.com/Donders-Institute/bidscoin>`__ python toolkit that converts ("coins") source-level (raw) neuroimaging data-sets to `nifti <https://nifti.nimh.nih.gov/>`__ / `json <https://www.json.org/>`__ / `tsv <https://en.wikipedia.org/wiki/Tab-separated_values>`__ data-sets that are organized following the Brain Imaging Data Structure, a.k.a. the `BIDS <http://bids.neuroimaging.io>`__ standard. Rather then depending on complex or ambiguous programmatic logic for the identification of imaging modalities, BIDScoin uses a mapping approach to identify and convert the raw source data into BIDS data. Different runs of source data are identified by reading information from MRI header files (DICOM or PAR/REC; e.g. ``ProtocolName``) and the mapping information about how these runs should be converted to BIDS can be specified a priori as well as interactively by the researcher -- bringing in the missing knowledge that often exists only in his or her head!
1818

1919
Because all the mapping information can be easily edited with the `Graphical User Interface (GUI) <screenshots.html>`__, BIDScoin requires no programming knowledge in order to use it.
2020

bidscoin/bidscoiner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def bidscoiner(rawfolder: str, bidsfolder: str, subjects: list=(), force: bool=F
609609
participants_dict[key] = dict(LongName = 'Long (unabbreviated) name of the column',
610610
Description = 'Description of the the column',
611611
Levels = dict(Key='Value (This is for categorical variables: a dictionary of possible values (keys) and their descriptions (values))'),
612-
Units = 'Measurement units. [<prefix symbol>]<unit symbol> format following the SI standard is RECOMMENDED',
612+
Units = 'Measurement units. [<prefix symbol>]<unit symbol> format following the SI standard is RECOMMENDED')
613613
participants_table.loc[personals['participant_id'], key] = personals[key]
614614

615615
# Write the collected data to the participant files

bidscoin/bidseditor.py

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,51 +1377,7 @@ def main():
13771377
examples:
13781378
bidseditor /project/foo/bids
13791379
bidseditor /project/foo/bids -t bidsmap_template.yaml
1380-
bidseditor /project/foo/bids -b my/custom/bidsmap.yaml
1381-
1382-
Here are a few tips & tricks:
1383-
-----------------------------
1384-
1385-
DICOM Attributes
1386-
An (DICOM) attribute label can also be a list, in which case the BIDS labels / mapping
1387-
are applied if a (DICOM) attribute value is in this list. If the attribute value is
1388-
empty it is not used to identify the run. Unix shell-style wildcards can also be given,
1389-
for instance like this:
1390-
SequenceName: '*'
1391-
SequenceName: '*epfid*'
1392-
SequenceName: ['epfid2d1rs', 'fm2d2r']
1393-
SequenceName: ['epfid?d*', 'fm?d2r']
1394-
NB: Editing the DICOM attributes is normally not necessary and adviced against
1395-
1396-
Dynamic BIDS labels
1397-
The BIDS labels can be static, in which case the label is just a normal string, or
1398-
dynamic, when the string is enclosed with pointy brackets like `<attribute>`,
1399-
`<attribute1><attribute2>` or `<<attribute1><attribute2>>`. In case of single enclosed
1400-
pointy brackets the label will be replaced during bidsmapper, bidseditor and bidscoiner
1401-
runtime by the value of the (DICOM) attribute with that name. In case of double enclosed
1402-
pointy brackets, the label will be updated for each subject/session during bidscoiner
1403-
runtime. For instance, the `run` label `<<1>>` in the bids name will be replaced with
1404-
`1` or increased to `2` if a file with runindex `1` already exists in that directory.
1405-
1406-
Fieldmaps: suffix
1407-
Select 'magnitude1' if you have 'magnitude1' and 'magnitude2' data in one series-folder
1408-
(this is what Siemens does) -- the bidscoiner will automatically pick up the 'magnitude2'
1409-
data during runtime. The same holds for 'phase1' and 'phase2' data. See the BIDS
1410-
specification for more details on fieldmap suffixes
1411-
1412-
Fieldmaps: IntendedFor
1413-
You can use the `IntendedFor` field to indicate for which runs (DICOM series) a fieldmap
1414-
was intended. The dynamic label of the `IntendedFor` field can be a list of string patterns
1415-
that is used to include all runs in a session that have that string pattern in their BIDS
1416-
file name. Example: use `<<task>>` to include all functional runs or `<<Stop*Go><Reward>>`
1417-
to include "Stop1Go"-, "Stop2Go"- and "Reward"-runs.
1418-
NB: The fieldmap might not be used at all if this field is left empty!
1419-
1420-
Manual editing / inspection of the bidsmap
1421-
You `can of course also directly edit or inspect the `bidsmap.yaml` file yourself with any
1422-
text editor. For instance to merge a set of runs that by adding a '*' wildcard to a DICOM
1423-
attribute in one run item and then remove the other runs in the set. See ./docs/bidsmap.md
1424-
and ./heuristics/bidsmap_dccn.yaml for more information."""))
1380+
bidseditor /project/foo/bids -b my/custom/bidsmap.yaml"""))
14251381

14261382
parser.add_argument('bidsfolder', help='The destination folder with the (future) bids data')
14271383
parser.add_argument('-b','--bidsmap', help='The bidsmap YAML-file with the study heuristics. If the bidsmap filename is relative (i.e. no "/" in the name) then it is assumed to be located in bidsfolder/code/bidscoin. Default: bidsmap.yaml', default='bidsmap.yaml')

bidscoin/bidsmapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ def bidsmapper(rawfolder: str, bidsfolder: str, bidsmapfile: str, templatefile:
292292
if not dataformat:
293293
dataformat = 'DICOM'
294294
QMessageBox.information(mainwin, 'BIDS mapping workflow',
295-
'Could not determine the dataformat of the source\n'
296-
f'data, defaulting to: {dataformat}\n'
295+
'Could not determine the dataformat of the last\n'
296+
f'source data run, defaulting to: {dataformat}\n'
297297
'You can try running the bidseditor tool yourself if\n'
298298
'this is not correct')
299299
QMessageBox.information(mainwin, 'BIDS mapping workflow',

docs/tutorial.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Let's begin with inspecting this new raw data collection:
4646
$ bidsmapper raw bids
4747
4848
- In the GUI that appears, edit the task and acquisition labels of the functional scans into something more readable, e.g. ``task-Reward`` for the ``acq-mb8`` scans and "task-Stop" for the ``acq-mb3me3 scans``. Also make the name of the T1 scan more user friendly, e.g. by naming the aquisition label simply ``acq-mprage``.
49-
- Add a search pattern to the ``IntendedFor`` field such that it will select your fMRI runs correctly (see the `bidseditor <workflow.html#step-1b-running-the-bidseditor>`__ ``fieldmap`` section for more details)
49+
- Add a search pattern to the ``IntendedFor`` field such that the first fieldmap will select your ``Reward`` runs and the second fieldmap your ``Stop`` runs (see the `bidseditor <workflow.html#step-1b-running-the-bidseditor>`__ ``fieldmap`` section for more details)
5050
- Since for this dataset we only have one session per subject, remove the session label (and note how the output names simplify, omitting the session subfolders and labels)
5151
- When all done, go to the ``Options`` tab and change the ``dcm2niix`` settings to get non-zipped nifti output data (i.e. ``*.nii`` instead of ``*.nii.gz``). Test the tool to see if it can run and, as a final step, save your bidsmap. You can always go back later to change any of your edits by running the `bidseditor <workflow.html#step-1b-running-the-bidseditor>`__ command line tool directly. Try that.
5252

@@ -57,13 +57,13 @@ Let's begin with inspecting this new raw data collection:
5757
$ bidscoiner raw bids
5858
5959
- Check your ``bids/code/bidscoin/bidscoiner.log`` (the complete terminal output) and ``bids/code/bidscoin/bidscoiner.errors`` (the summary that is also printed at the end) files for any errors or warnings. You shouldn't have any :-)
60-
- Compare the results in your ``bids/sub-*`` subject folders with the in ``bids_ref`` reference result. Are the file and foldernames the same (don't worry about the multi-echo images and the ``extra_data`` images, they are combined/generated as described below)? Also check the json sidecar files of the fieldmaps. Do they have the right ``"``EchoTime`` and ``IntendedFor`` fields?
61-
- What happens if you re-run the `bidscoiner <workflow.html#step-2-running-the-bidscoiner>`__ command? Are the same subjects processed again? Re-run ``sub-001``.
60+
- Compare the results in your ``bids/sub-*`` subject folders with the in ``bids_ref`` reference result. Are the file and foldernames the same (don't worry about the multi-echo images and the ``extra_data`` images, they are combined/generated as described below)? Also check the json sidecar files of the fieldmaps. Do they have the right ``EchoTime`` and ``IntendedFor`` fields?
61+
- What happens if you re-run the ``bidscoiner`` command? Are the same subjects processed again? Re-run ``sub-001``.
6262

6363
4. **Finishing up.** Now that you have converted the data to BIDS, you still need to do some manual work to make it fully ready for data analysis and sharing
6464

65-
- Combine the echos using the `echocombine <finalizing.html#multi-echo-combination>`__ tool, such that the individual echo images are replaced by the ech-combined image
66-
- Deface the anatomical scans using the `echocombine <finalizing.html#multi-echo-combination>`__ tool. This will take a while, but will obviously not work well for our phantom dataset. Therefore store the 'defaced' output in the ``extra_data`` folder (instead of e.g. overwriting the existing images)
65+
- Combine the echos using the `echocombine <finalizing.html#multi-echo-combination>`__ tool, such that the individual echo images are replaced by the echo-combined image
66+
- Deface the anatomical scans using the `echocombine <finalizing.html#multi-echo-combination>`__ tool. This will take a while, but will obviously not work well for our phantom dataset. Therefore store the 'defaced' output in the ``derivatives`` folder (instead of e.g. overwriting the existing images)
6767
- Inspect the ``bids/participants.tsv`` file and decide if it is ok.
6868
- Update the ``dataset_description.json`` and ``README`` files in your ``bids`` folder
6969
- As a final step, run the `bids-validator <https://bids-standard.github.io/bids-validator/>`__ on your ``~/bids_tutorial`` folder. Are you completely ready now to share this dataset?

0 commit comments

Comments
 (0)