ThomasYeoLab / CBIG

MIT License
579 stars 382 forks source link

in Kong2019, step2 : incorrectly expect .nii.gz file format for fsLR_32k profiles #3

Closed jcrdubois closed 4 years ago

jcrdubois commented 5 years ago

The profiles are saved as .mat files in the case of fsLR_32k mesh (cf. step1_generate_profiles_and_ini_params/CBIG_MSHBM_generate_profiles.m line 109).

However step2_estimate_priors/CBIG_MSHBM_estimate_group_priors.m line 548 tries to read a MRI file. I believe a simple fix is to replace l. 548, from [~, series, ~] = CBIG_MSHBM_read_fmri(avg_file); to the following: tmp = load(avg_file); series = tmp.profile_mat;

A similar edit is needed in step3_generate_ind_parcellations/CBIG_MSHBM_generate_individual_parcellation at line 531

rubykong commented 5 years ago

@jcrdubois Sorry, our function name might be misleading. CBIG_MSHBM_read_fmri can actually read three format, <filename>_profile.mat, <filename>.dtseries.nii, and <filename>.nii.gz file.

if (~isempty(strfind(fmri_name, 'profile.mat')))
    load(fmri_name);
    vol = single(profile_mat);
    vol_size = size(vol);
    profile_mat = [];
    fmri = [];
jcrdubois commented 5 years ago

oh I see. So then the issue was with the fact that I was using split runs, and the name of the profile file was profile_1.mat or profile_2.mat, which the function does not handle.

rubykong commented 5 years ago

@jcrdubois Thanks a lot for catching that! I will modify the scripts and release them.

rubykong commented 4 years ago

We forgot to close this issue. This issue has been resolved in release v0.9.2. The user can update their repo to our latest version if they are using a version before v0.9.2.

This issue is closed.