gbarisano / alps

Bash script to compute DTI-ALPS
31 stars 6 forks source link

cannot access file "my_4D_dwi.nii.gz": No such file or directory #3

Closed Nassim3235 closed 3 months ago

Nassim3235 commented 7 months ago

Hello, I followed the instructions on your GitHub, added all the paths correctly to Ubuntu, and placed all the necessary input files alongside the script. However, when I run the command, I encounter an access error, even though read and write permissions are available. The given error is as follows:

bash alps.sh -a my_4D_dwi.nii.gz -b my_bval_file -c my_bvec_file -m my_bids_file.json alps.sh -a my_4D_dwi.nii.gz -b my_bval_file -c my_bvec_file -m my_bids_file.json ROI analysis with default ROIs Default FA template will be used: JHU-ICBM-FA-1mm.nii.gz Running ALPS with the following parameters: -a my_4D_dwi.nii.gz -b my_bval_file -c my_bvec_file -m my_bids_file.json -i
-j
-k
-n
-d 1 -e 1 -r /home/gha/mrtrix3/bin/ROIs_JHU_ALPS/L_SCR.nii.gz,/home/gha/mrtrix3/bin/ROIs_JHU_ALPS/R_SCR.nii.gz,/home/gha/mrtrix3/bin/ROIs_JHU_ALPS/L_SLF.nii.gz,/home/gha/mrtrix3/bin/ROIs_JHU_ALPS/R_SLF.nii.gz

-t /usr/local/fsl/data/atlases/JHU/JHU-ICBM-FA-1mm.nii.gz -v
-h 1 -w 0 -s 0

-o create output directory: /home/gha/alps-main/alps Denoising and unringing my_4D_dwi.nii.gz dwidenoise: [ERROR] cannot access file "my_4D_dwi.nii.gz": No such file or directory dwidenoise: [ERROR] error opening image "my_4D_dwi.nii.gz" mrdegibbs: [ERROR] cannot access file "/home/gha/alps-main/alps/dwi1.denoised.nii.gz": No such file or directory mrdegibbs: [ERROR] error opening image "/home/gha/alps-main/alps/dwi1.denoised.nii.gz" Image Exception : #63 :: No image files match: my_4D_dwi No image files match: my_4D_dwi

gbarisano commented 7 months ago

Hi Nassim,

I recommend including the whole path to your inputs. For example: alps.sh -a /home/gha/alps-main/my_4D_dwi.nii.gz -b /home/gha/alps-main/my_bval_file -c /home/gha/alps-main/my_bvec_file -m /home/gha/alps-main/my_bids_file.json

I updated my pipeline to deal with the situation like yours, i.e. launching the script from inside the directory where the inputs are located. So now there is no need to specify the full path for inputs located in your current working directory.

Best, Giuseppe