A zipped version of the file is in the VoxelMasks directory.
I only started getting this error when I added second timepoints to a couple of my subjects. Sub-02 is one of the subjects that has a second timepoint, I wonder if this is related. I would appreciate your help!
Update – I ran it again using only the subjects who had a second timepoint and it worked! For clarification, do all subjects need to have their second timepoint for this to function correctly?
Hi @HannahFB,
I’ve had a similar problem with OspreySeg and vol_image data when I’ve done these steps already and then added some new subjects/sessions. In this case some data are already zipped and other not and than the error occurs.
You can try to replace
gzip(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
delete(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
with something like:
if ~strcmp(MaskExt,‘.gz’) && isfile(fullfile(MaskDir,[MaskNameSPM152, MaskExt]))
gzip(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
delete(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
end
In that case, only existing datasets not ending in ‘gz’ should be zipped.
I do have ses labels on the T1s and on the MRS folders. I was copying the organization of the example .SDAT data which doesn’t have the individual MRS data sets labeled by session. Could that be the problem?