[FieldTrip] [External] Re: ft_preamble error for HCP Pipeline

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu Sep 24 09:04:12 CEST 2020


The error you get suggests that the FieldTrip on your matlab path is not able to deal with old-syntax ft_selectdata. This is a function in fieldtrip/utilities, which at some time in the past supported two different sets of input arguments.
This has changed in later versions of the code, to ensure overall code consistency.
Now, the megconnectome scripts use the old syntax call to ft_selectdata, so it is crucial that the correct version of the code is used. As far as I can see, the fieldtrip-r10442 should support both the old and new syntax. If you look in fieldtrip/utilities, there should be a triplet of functions : ft_selectdata/ft_selectdata_old/ft_selectdata_new, where the code in ft_selectdata has some intelligency built in to choose the right old/new file, conditional on the input.

My current guess is that you have an overloaded version of fieldtrip higher on your matlab path, so that you end up in the wrong version of fieldtrip. This guess is further supported by the fact that the line 42 in ft_preamble_init (as per the error report that you pasted in your message) of fieldtrip-r10442 does not look as if you ended up there.

You can find out which file is used by matlab, if you type: which ft_selectdata. If it does not point to a file in the fieldtrip-r10442 then you need to update your matlab path settings. There’s documentation on fieldtriptoolbox.org<http://fieldtriptoolbox.org> which explains how to do this.

Best wishes,
Jan-Mathijs



On 23 Sep 2020, at 17:48, Winter, Matthew <mattwint at iu.edu<mailto:mattwint at iu.edu>> wrote:

Thanks Jan-Mathijs,

Sorry about that, I am using the  megconnectome x3.0 and fieldtrip-r10442, But perhaps I should try cycling through the different fieldtrip versions to see if that makes a difference.

Best,
Matt

From: Schoffelen, J.M. (Jan Mathijs)<mailto:jan.schoffelen at donders.ru.nl>
Sent: Wednesday, September 23, 2020 2:57 AM
To: FieldTrip discussion list<mailto:fieldtrip at science.ru.nl>
Subject: [External] Re: [FieldTrip] ft_preamble error for HCP Pipeline

This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.

Hi Matt,

Hard to tell without any additional information. The megconnectome code was written ~7 years ago, using a certain version of the fieldtrip code base. It is not unlikely that there are compatibility issues.
You did not provide information with respect to the FieldTrip version you are using, but my first guess would be a mismatch.

Best wishes,
Jan-Mathijs


On 23 Sep 2020, at 03:46, Winter, Matthew <mattwint at iu.edu<mailto:mattwint at iu.edu>> wrote:

Hi Everyone,

I am trying to run the megconnectome pipeline hcp_tmegconnebacic.m. However I get a list of errors:

Error using ft_preamble_init (line 42)
It seems as if the first input argument is a FieldTrip data structure, while a cfg is expected

Error in ft_preamble (line 83)
evalin('caller', full_cmd);

Error in ft_selectdata (line 80)
ft_preamble init

Error in hcp_tmegconnebasic_contrasts (line 283)
    datacntr1A=ft_selectdata(alldata1A,'rpt',sel);

Error in hcp_tmegconnebasic (line 534)
    [outStatus] = hcp_tmegconnebasic_contrasts(cfg);

It traces back to the ft_preamble_init functions when it calls another function, FjmoT6aA_stack = dbstack(‘-completenames'), and I find myself at a deadend there, I am not sure how or where the cfg is supposed to be input. Does anyone have any insights that could help me figure this out?

Best,
Matt
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200924/7e67458f/attachment.htm>


More information about the fieldtrip mailing list