Not enough input argument error for source statistics

Hi,

I am trying to perform source statistics with fieldtrip cluster statistics. When I try to run the process with 5 subjects, it works fine but performing the analysis with my 89 subjects, I got the following error "Line 43: Not enough input arguments."
It is paired statistics and I do have the same number of source files in each condition (but if I tried with independent test, the error is the same). Do you know where this error could come from?
Thanks for your help,

Adeline

EDIT: I think the problem comes from a particular subgroup of subject because I have the error when they are included. but I don't understand what the problem is ...

I don't know if I'll be able to help you without having the full database in hand.
Please copy-paste here the full error message, including the stack trace, so that we can see from which function the error is coming from.

Thanks for your answer.
Here is the complete error message.

This error message indicates that at least one subject has issues.
When loading the source files to convert them to FieldTrip structures, there is missing information in the database. Some source files have been computed using a surface that was later deleted or moved, and/or there is no default cortex surface left in the subject anatomy.

Start by reloading your database and try again.
If this doesn't fix the problem: identify the subject with the problem and fix it. If the anatomy files of this subject were moved or deleted, this might imply re-importing and recomputing everything for the subject.

Thanks, it is really helpful.
When I reloaded the database, the problem was not fixed.

I identified the subject ( AM09); and I recomputed sources, but I still have the problem.
When I try to visualize sources for this subject, I have this error message.

However, I have the head model for the subject (similarly to other subjects). So, I still don't understand...

Additionally, I saw that indeed, the "default anatomy" for this subject has disappeared... Don't know what I did for that... But I don't really know what to do to restore it. DO I have to delete the subject and re-do everything (preprocessing, and then re-importing events etc?)

EDIT: I re-imported the default anatomy for the subject and I think it fixed the problem. I hope it is okay doing things like this

It looks like there are missing anatomy files in your database. There is no cortex surface that can be found to display these results.
I'd recommend either to re-import and re-process the subject from beginning, or to try to restore the files from one of your recent backups.
(if you don't have a back set up yet, time to set up one for keeping your future analyses safe)

EDIT: I re-imported the default anatomy for the subject and I think it fixed the problem. I hope it is okay doing things like this

If you did something like right-click on the Default anatomy folder > Use template > ICBM152, it should simply restore what was there before, and it should work.
Are these subjects using the default anatomy?

Thank you very much again.

If you did something like right-click on the Default anatomy folder > Use template > ICBM152, it should simply restore what was there before, and it should work.
Are these subjects using the default anatomy?

I right-click on the subject and clicked on edit subject. Then I ticked the "use default anatomy" (all my subjects have the default anatomy) and after that the default anatomy seemed to be restored in my subject.
Then I did the sources again for the subject. I had a warning message regarding the head model but I think it is because before I did that, i tried to copy again the head model to the subject (and the head model is actually the same than before but just with a different name).
I hope it is fine doing like that (sources seems ok when I look at them and I was able to perform the analysis without problems)

The description of what happened to your subject before that is not clear enough for me to guess whether this is correct or not. If you think you simply restored what you had before, maybe this is OK. If you are not sure and don't want to take the chance of having errors in this subject, reprocess it from the beginning.

1 Like