maartenmennes/ICA-AROMA

ValueError: not enough values to unpack (expected 2, got 1)

Blockhead-yj opened this issue · 4 comments

Hi Maarten

I encountered the following error. I tried to solve it by myself,and I found the error was because when using 'mix=np.loadtxt(melmix)', the mix.shape was (450,) ps:450 TRs. I don't know what should I do to solve the problem. Would greatly appreciate your help. Thanks in advance!

------------------------------- RUNNING ICA-AROMA -------------------------------
--------------- 'ICA-based Automatic Removal Of Motion Artifacts' ---------------

Warning! Please check whether the determined TR (of 1.0s) is correct!

Step 1) MELODIC

  • The existing/specified MELODIC directory will be used.
    Step 2) Automatic classification of the components
  • registering the spatial maps to MNI
  • extracting the CSF & Edge fraction features
  • extracting the Maximum RP correlation feature
    Standard error:
    Traceback (most recent call last):
    File "/opt/ICA-AROMA/ICA_AROMA.py", line 206, in
    maxRPcorr = aromafunc.feature_time_series(melmix, mc)
    File "/opt/ICA-AROMA/ICA_AROMA_functions.py", line 265, in feature_time_series
    nmixrows, nmixcols = mix.shape
    ValueError: not enough values to unpack (expected 2, got 1)
    Return code: 1

hello,
it looks like your melodic decomposition wasn't run or saved correctly. This suggests you had a single component returned from your decomposition.

side note: did you specify your TR correctly, given that it is 1.0 (which is perfectly normal these days, but also often overlooked if you merged your 4D file from 3D nifti's and TR wasn't set correctly in the header it will default to 1)

Hi Maarten,
Thank you so much for your reply ! and TR is exactly 1.0.
Best wishes!

Hi Maarten,
I find out what's wrong.I used fmriprep to run ica-aroma, in its usage,it said that
"--aroma-melodic-dimensionality
Exact or maximum number of MELODIC components to estimate (positive = exact, negative = maximum)".
But when I set "--use-aroma --aroma-melodic-dimensionality -1",it estimate only 1 components.

Thanks for coming back with this comment. The issue in this case was found to be on the fmriprep AROMA implementation. No fixes are required on the AROMA end.