Skip to content
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

bids.BIDSLayout.build_path() discards dir- label for dwi images #895

Open
ajschadler12 opened this issue Sep 8, 2022 · 0 comments
Open

Comments

@ajschadler12
Copy link

Preamble

pybids version: bids.__version__ --> '0.15.2'

Issue is referenced with example code in this neurostars thread.

Issue is confirmed to not affect bold or epi files.

Issue

Current Behavior

  • Use bids.BIDSLayout.build_path() to generate valid filenames from modified entities from a DWI image.
    • original filename: sub-01_ses-1_dir-AP_dwi.nii.gz
  • Modified name is stripped of dir-AP label.
    • modified filename: sub-1_ses-1_acq-modified_dwi.nii.gz

Desired Behavior

  • Return generated filename with relevant dir- labels:
    • sub-1_ses-1_acq-modified_dir-AP_dwi.nii.gz

Possible Causes:

  • layout/config/bids.json is missing [_dir-{direction}] for the dwi line in default_path_patterns.
    • Update dwi entry to 'sub-{subject}[/ses-{session}]/dwi/sub-{subject}[_ses-{session}][_acq-{acquisition}][_dir-{direction}]_{suffix<dwi>}.{extension<bval|bvec|json|nii.gz|nii>|nii.gz}' in `bids.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant