-
Notifications
You must be signed in to change notification settings - Fork 64
Add information on BIDS curation to Usage page #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
196e8f2
Add information on BIDS curation to usage.rst.
tsalo 1659512
Be clearer about inheritance.
tsalo 4a16203
Update usage.rst
tsalo 8428f57
Update usage.rst
tsalo 0c149ec
Update usage.rst
tsalo 06e7973
Address #342.
tsalo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,117 @@ Participants file: <bids-root>/participants.tsv | |
| Either file should include age (or if you wish to be more explicit: age_months) columns, and it is recommended to have an accompanying JSON file to further describe these fields, and explicitly state the values are in months. | ||
|
|
||
|
|
||
| ************************** | ||
| Preparing data for QSIPrep | ||
| ************************** | ||
|
|
||
| QSIPrep is a BIDS App, meaning that it expects the data to be in BIDS format. | ||
| However, QSIPrep does contain some idiosyncrasies that mean that the data may need to be prepared in a specific way. | ||
|
|
||
|
|
||
| Siemens Reverse Phase-Encoded "Field Maps" | ||
| ========================================== | ||
|
|
||
| Reverse phase-encoded images are a common acquisition for distortion correction. | ||
| For a dMRI scan, this would mean acquiring one or more volumes of b=0 images with the | ||
| opposite phase encoding direction of the main dMRI scan. | ||
|
|
||
| It can be hard to acquire a scan that only contains b=0 volumes with Siemens scanners, | ||
| so researchers often acquire a short dMRI run with a mix of b=0 and b>0 volumes. | ||
| QSIPrep expects these short scans to be in the fmap directory, instead of the dwi directory. | ||
| If you acquire data like this, you should organize your data as below:: | ||
|
|
||
| sub-<label>/ | ||
| ses-<label>/ | ||
| dwi/ | ||
| sub-<label>_ses-<label>_dir-AP_dwi.nii.gz | ||
| sub-<label>_ses-<label>_dir-AP_dwi.bval | ||
| sub-<label>_ses-<label>_dir-AP_dwi.bvec | ||
| sub-<label>_ses-<label>_dir-AP_dwi.json | ||
| fmap/ | ||
| sub-<label>_ses-<label>_dir-PA_epi.nii.gz | ||
| sub-<label>_ses-<label>_dir-PA_epi.bval | ||
| sub-<label>_ses-<label>_dir-PA_epi.bvec | ||
| sub-<label>_ses-<label>_dir-PA_epi.json # Add IntendedFor field here | ||
|
|
||
| In this scenario, the short scan is organized as a field map, with the epi suffix. | ||
| As of BIDS v1.10.0, EPI field maps can have bval and bvec files, so this organization is completely BIDS-compliant. | ||
|
|
||
| If you organize your short scan as a dMRI run, QSIPrep will denoise the short scan and concatenate it with the longer run, | ||
| which is not optimal. | ||
|
|
||
| Moreover, if you have a short scan with a mix of b=0 and b>0 volumes, and you do not include the bval and bvec files, | ||
| QSIPrep will assume that all of the volumes are b=0, which will almost certainly produce suboptimal results. | ||
|
|
||
|
|
||
| Complex-Valued Data | ||
| =================== | ||
|
|
||
| If you acquire complex-valued data, you should (1) split the data into magnitude and phase files (NOT real and imaginary!) | ||
| and (2) retain a copy of the bval and bvec files with the part-mag entity included (i.e., do not use the inheritance principle on these files). | ||
|
|
||
| QSIPrep is not compatible with real and imaginary data. | ||
|
|
||
| Also, QSIPrep does not currently support using the inheritance principle for bval and bvec files. | ||
| While this is not normally a problem, since these files should not be inherited, | ||
| it would make sense from a BIDS readability perspective to inherit the bvals and bvecs across both the magnitude and phase files. | ||
| For example, the following organization would be perfectly BIDS-compliant:: | ||
|
|
||
| sub-<label>/ | ||
| ses-<label>/ | ||
| dwi/ | ||
| sub-<label>_ses-<label>_dwi.bval | ||
| sub-<label>_ses-<label>_dwi.bvec | ||
| sub-<label>_ses-<label>_part-mag_dwi.nii.gz | ||
| sub-<label>_ses-<label>_part-mag_dwi.json | ||
| sub-<label>_ses-<label>_part-phase_dwi.nii.gz | ||
| sub-<label>_ses-<label>_part-phase_dwi.json | ||
|
|
||
| The inheritance principle ensures that the bvals and bvecs without the ``part`` entity | ||
| apply to both the magnitude and phase files. | ||
|
|
||
| Unfortunately, if you do this, QSIPrep will not be able to find the bvec and bval files. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely worth documenting until we have a patch for this |
||
| Therefore, you should organize your data as below, to make sure QSIPrep will work:: | ||
|
|
||
| sub-<label>/ | ||
| ses-<label>/ | ||
| dwi/ | ||
| sub-<label>_ses-<label>_part-mag_dwi.nii.gz | ||
| sub-<label>_ses-<label>_part-mag_dwi.bval | ||
| sub-<label>_ses-<label>_part-mag_dwi.bvec | ||
| sub-<label>_ses-<label>_part-mag_dwi.json | ||
| sub-<label>_ses-<label>_part-phase_dwi.nii.gz | ||
| sub-<label>_ses-<label>_part-phase_dwi.bval | ||
| sub-<label>_ses-<label>_part-phase_dwi.bvec | ||
| sub-<label>_ses-<label>_part-phase_dwi.json | ||
|
|
||
|
|
||
| BIDS-URIs | ||
| ========= | ||
|
|
||
| BIDS-URIs are the recommended way to defined certain metadata fields, such as IntendedFor, in BIDS. | ||
| However, QSIPrep does not currently support BIDS-URIs for the IntendedFor field. | ||
| Therefore, you should use relative paths to the files, which is the older way to do things. | ||
|
|
||
|
|
||
| B0FieldIdentifier and B0FieldSource | ||
| =================================== | ||
|
|
||
| B0FieldIdentifier and B0FieldSource are two metadata fields that are used to related images to field maps for distortion correction. | ||
| They are the preferred alternative to the IntendedFor field in BIDS, but QSIPrep does not currently support them. | ||
| Therefore, you should use the IntendedFor field with relative paths to the files, which is the older way to do things. | ||
|
|
||
|
|
||
| MultipartID | ||
| =========== | ||
|
|
||
| MultipartID is a metadata field that is used to identify a set of DWIs that should be considered as part of the same acquisition. | ||
| If you want to group certain runs of dMRI data together, but not all runs (the default behavior), you should use the MultipartID field. | ||
|
|
||
| However, please note that MultipartID may interact in unexpected ways with the IntendedFor field and the QSIPrep parameters that impact grouping (e.g., ``--distortion-group-merge``). | ||
|
mattcieslak marked this conversation as resolved.
|
||
| Therefore, we recommend that, if you use MultipartID, you check your outputs to make sure the runs are being grouped in the manner you expect. | ||
|
|
||
|
|
||
| ****************** | ||
| Note on using CUDA | ||
| ****************** | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this conflict with below where you need to have files with both the
part-magand thepart-phaseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need them for each file for BIDS (e.g., with both
part-magandpart-phaseor withoutpartat all), but you need it withpart-magfor QSIPrep.So this is BIDS-valid:
But on the other hand you need this for QSIPrep:
Note that the part-phase bval and bvec are not needed for QSIPrep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make changes to make this clearer