Skip to content

Conversation

@Remi-Gau
Copy link
Contributor

@Remi-Gau Remi-Gau commented Aug 7, 2021

fixes #389

@CerenB and @marcobarilari I have added some options for functional QA that should speed it up and prevent generating some (big) files.

opt.QA.func.carpetPlot = true to plot carpet plot when running functionaQA

opt.QA.func contains a lot of options used by spmup_first_level_qa in functionaQA
opt.QA.func.MotionParameters = 'on'
opt.QA.func.FramewiseDisplacement = 'on'
opt.QA.func.Voltera = 'on'
opt.QA.func.Globals = 'on'
opt.QA.func.Movie = 'on' ; set it to off to skip generating movies of the time series
opt.QA.func.Basics = 'on'

@marcobarilari I have changed the name of the option to skip the GLM QA that sometimes took ages for you:
opt.QA.glm.do = true.

@Remi-Gau Remi-Gau changed the base branch from master to dev August 7, 2021 10:43
@CerenB
Copy link
Collaborator

CerenB commented Aug 10, 2021

working on my local! A slight hiccup is when I ran the following, I got an orientation dimension mismatch error. Maybe I'm not updated with the latest changes on how to run functionalQA ?

What works:

% % Quality control
anatomicalQA(opt);
bidsResliceTpmToFunc(opt);

When crashes:
functionalQA(opt);

Error is below:

FOR TASK: auditoryLocalizer
WILL WORK ON SUBJECTS
    '009'

 FUNCTIONAL: QUALITY CONTROL

 PROCESSING SUBJECT No.: 1 SUBJECT ID : 009 

    ** The images do not all have the same dimensions. **
The function assumes that a voxel in one image corresponds with
the same  voxel in another.   This  is not a safe assumption if
the  image dimensions differ.   Please  ensure  that  you  have
processed all the image data in the same way (eg. check spatial
normalisation bounding-boxes, voxel-sizes etc).
Here are the dimensions of the image volumes.  This list can be
used to determine which file(s) are causing the problem.

[84 84 58]  /Users/battal/Cerens_files/fMRI/Processed/MT_TMS/derivatives/cpp_spm/sub-009/ses-001/func/uasub-009_ses-001_task-auditoryLocalizer_run-001_bold.nii
[84 84 58]  /Users/battal/Cerens_files/fMRI/Processed/MT_TMS/derivatives/cpp_spm/sub-009/ses-001/func/uasub-009_ses-001_task-auditoryLocalizer_run-001_bold.nii
...
[84 84 58]  /Users/battal/Cerens_files/fMRI/Processed/MT_TMS/derivatives/cpp_spm/sub-009/ses-001/func/uasub-009_ses-
[61 73 61]  /Users/battal/Cerens_files/fMRI/Processed/MT_TMS/derivatives/cpp_spm/sub-009/ses-001/anat/rc1sub-009_ses-001_T1w.nii
[61 73 61]  /Users/battal/Cerens_files/fMRI/Processed/MT_TMS/derivatives/cpp_spm/sub-009/ses-001/anat/rc2sub-009_ses-001_T1w.nii
[61 73 61]  /Users/battal/Cerens_files/fMRI/Processed/MT_TMS/derivatives/cpp_spm/sub-009/ses-001/anat/rc3sub-009_ses-001_T1w.nii

Error using spm_check_orientations (line
42)
The dimensions must be identical for
this procedure.

Error in functionalQA (line 80)
        spm_check_orientations(spm_vol(char(volumesToCheck))); 

@CerenB
Copy link
Collaborator

CerenB commented Aug 10, 2021

oh maybe one more name changing is needed. Please see below:

Reference to non-existent field 'QA'.

Error in
setBatchEstimateModel>returnEstimateModelBatch
(line 62)
  if ~opt.glm.QA.do

Error in setBatchEstimateModel (line 32)
      matlabbatch =
      returnEstimateModelBatch(matlabbatch,
      spmMatFile, opt);

Error in bidsFFX (line 73)
        matlabbatch =
        setBatchEstimateModel(matlabbatch,
        opt);

@Remi-Gau
Copy link
Contributor Author

working on my local! A slight hiccup is when I ran the following, I got an orientation dimension mismatch error. Maybe I'm not updated with the latest changes on how to run functionalQA ?

it seems that you did reslice the TPMs before doing the functional QA but that the resolution is not right.

that could be the issue.

Do you run those 2 in sequence?

bidsResliceTpmToFunc(opt);
functionalQA(opt)

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Sep 2, 2021

@CerenB will merge this for now but let me know if you get this bug again.

@Remi-Gau Remi-Gau merged commit f0aa0c0 into cpp-lln-lab:dev Sep 2, 2021
@Remi-Gau Remi-Gau deleted the parallel branch September 13, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants