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

.bval and .bvec export depends on dwi filename #113

Open
davidrs06 opened this issue Nov 3, 2022 · 2 comments
Open

.bval and .bvec export depends on dwi filename #113

davidrs06 opened this issue Nov 3, 2022 · 2 comments

Comments

@davidrs06
Copy link

davidrs06 commented Nov 3, 2022

Hi !

I think .bval and .bvec files don't get exported unless the file name for the diffusion sequence finishes with 'dwi'.

If I set the following in the Protocol_Translator.json file, the .bval and .bvec are not exported to the bids/<sub-ID>/<ses-ID>/dwi folder::

{
    "ep2d_diff_mddw_30dir_mono_SMS2_DFC":[
        "dwi",
        "DWIorig",
        "UNASSIGNED"
    ]
}

However, if I change to the following, the .bval and .bvec files do get exported::

{
    "ep2d_diff_mddw_30dir_mono_SMS2_DFC":[
        "dwi",
        "dwi",
        "UNASSIGNED"
    ]
}

I think the issue might come from here:

# Fill DWI bval and bvec working and source filenames
# Non-empty filenames trigger the copy below
work_bval_fname = str(work_json_fname.replace('.json', '.bval'))
bids_bval_fname = str(bids_json_fname.replace('dwi.json', 'dwi.bval'))
work_bvec_fname = str(work_json_fname.replace('.json', '.bvec'))
bids_bvec_fname = str(bids_json_fname.replace('dwi.json', 'dwi.bvec'))

@davidrs06
Copy link
Author

Hum, unless it's due to BIDS naming conventions ? In that case, mentioning it in the Editing the Translator Dictionary section would be helpful. I also found that assigning names with underscores leads to run labels being inserted in the middle of the filename. Would be helpful to have a warning not to name files with underscores in the Quick Start Guide.

@vnckppl
Copy link
Contributor

vnckppl commented Mar 16, 2023

I encountered the same issue. Setting the "EXCLUDE_BIDS_Name" portion in the json to a string ending in 'dwi' as suggested by @davidrs06 indeed fixed it.

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

2 participants