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

Several bugs when processing #1689

Open
9 tasks done
HenkMutsaerts opened this issue Apr 21, 2024 · 0 comments · May be fixed by #1704
Open
9 tasks done

Several bugs when processing #1689

HenkMutsaerts opened this issue Apr 21, 2024 · 0 comments · May be fixed by #1704
Assignees
Labels
bug Something isn't working

Comments

@HenkMutsaerts
Copy link
Member

HenkMutsaerts commented Apr 21, 2024

Description

In some functions we check for a comma ',' as a comma in the extension should be removed: this occurs with spm paths in the format:

dir/filename.nii(.gz),1
dir/filename.nii(.gz),2
dir/filename.nii(.gz),n

for different volumes in a 4D NIfTI file.

When there is a comma in a path (e.g. when mounting), it is useful if we don't have to move data to avoid having to resync it.

Example for me now:

'/Users/hjmutsaerts/surfdrive - Mutsaerts, H.J.M.M. (Henk-Jan)@surfdrive.surf.nl/HolidayPics/studyName'

Matlab otherwise works fine with this path, so spaces, commas, @ don't seem to be a problem in the foldername.

When converting csv to tsv, the comma is converted to a tab, creating another column. The number of columns will be inconsistent and csvtotsv will crash.
We can do two things (or both):

  1. Not put the directory name in a stats/tsv file
  2. Recognize when something is a path and ignore any delimiters in a path (this is perhaps more tricky)

Note that this is only valid for directory names, not for filenames. BIDS subject & visit names should not include illegal chars.

Tasks

  • Extend xASL_fileparts that it detects ,1 as well as .nii(.gz)
  • Check for other potential path problems
  • Minor bug fix in xASL_adm_DeleteManyTempFiles, for xASL_TrackProgress, and speeding up by removing recursive file searching where not needed
  • xASL_qc_SortBySpatialCoV: Print warnings only once. We still repeat the fprintf for the scans that may need checking, but avoid repeating warnings for huge verbosity.
  • xASL_stat_PrintStats: bugfixes empty end of list. When scans are missing, they are not included but the rest should still be reported, filling empties with 'n/a'. Did didn't happen with empties at the end of the list, because the list was shorter than expected, this function crashed. Now fixed.
  • ps_LST_tlv: avoid listing the path, which avoids seeing a comma in a path as delimiter
  • xASL_qc_CollectQC_Structural & xASL_stat_GetVolumeStatistics: correct indices for not having a path in the tsv-files
  • xASL_wrp_GetVolumetrics: revamp (accordingly)
  • xASL_adm_GzipAllFiles: UNIX bugfix

How to test

Optional: insert description about how to test the code changes here

Release notes

Required: summarize the changes for the release notes here

@HenkMutsaerts HenkMutsaerts added the bug Something isn't working label Apr 21, 2024
@HenkMutsaerts HenkMutsaerts self-assigned this Apr 21, 2024
@HenkMutsaerts HenkMutsaerts added this to the Release 1.12.0 milestone Apr 21, 2024
@HenkMutsaerts HenkMutsaerts changed the title Allowing commas in folder names Several bugs when processing Excersion-VCI Apr 26, 2024
@HenkMutsaerts HenkMutsaerts changed the title Several bugs when processing Excersion-VCI Several bugs when processing Apr 26, 2024
@HenkMutsaerts HenkMutsaerts linked a pull request Apr 29, 2024 that will close this issue
@HenkMutsaerts HenkMutsaerts linked a pull request Apr 29, 2024 that will close this issue
HenkMutsaerts added a commit that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant