scilus / tractoflow

TractoFlow: A robust, efficient and reproducible diffusion MRI pipeline leveraging Nextflow & Singularity
Other
51 stars 22 forks source link

[BUG] hcp 7t #76

Open arnaudbore opened 1 year ago

arnaudbore commented 1 year ago

No b0 found during Normalize_DWI process. MRtrix dwinormalise fail :

Command:  dwiextract 100610__dwi_cropped.nii.gz -fslgrad 100610_dwi.bvec 100610_dwi.bval -bzero - | mrmath - mean - -axis 3 | mrstats - -mask fa_masked.nii.gz -output median

dwinormalise: [ERROR] dwiextract 100610__dwi_cropped.nii.gz -fslgrad 100610_dwi.bvec 100610_dwi.bval -bzero - | mrmath - mean - -axis 3 | mrstats - -mask fa_masked.nii.gz -output median (individual.py:66)
dwinormalise: [ERROR] Information from failed command:
dwinormalise:
              dwiextract: uncompressing image "100610__dwi_cropped.nii.gz"... [==================================================]
              dwiextract: [ERROR] No b=0 volumes present
              mrmath: [ERROR] no filename supplied to standard input (broken pipe?)
              mrmath: [ERROR] error opening image "-"
              mrstats: [ERROR] no filename supplied to standard input (broken pipe?)
              mrstats: [ERROR] error opening image "-"
Ziqi-Hao commented 2 months ago

Hi Arnaud,

I also encountered this issue. More specifically, I found the b0 of 7T is actually at a b-value of 15 (and all the b-values fluctuate at a level of 40 b-value deviation).

It's because of dwinormalise's default b0 tolerance is 10. https://mrtrix.readthedocs.io/en/latest/reference/config_file_options.html#cmdoption-arg-BZeroThreshold I sloved the probelm by seting the "BZeroThreshold" to a higher b-vlaue. To achieve that, I created the config file at "~/.mrtrix.conf", within which I put a line of "BZeroThreshold: 20" . This solved my problem. But the drawback it that I need to set it manually.

Maybe we can add a feature in tractoflow, where if user provide specific b0 threshold, tractoflow pipeline will automatically create "~/.mrtrix.conf".

Best, Ziqi

arnaudbore commented 2 months ago

Thank you @Ziqi-Hao for your input, we are working on a brand new tractflow but it will take times to reach a release. We'll let you know.