Closed avanaudenhaege closed 1 year ago
do you think you can send the TSVs of one participants and the model.json so I can try to debug this on my side?
Here they are. Thank you ! :) debug-issue#966.zip
I can reproduce the error.
Congratulation: you found a bug!!!
opt.taskName = 'MVAVis';
opt = checkOptions(opt);
opt.model.file = fullfile(pwd, 'model-MVPAVis-speakTRANSFORM.json');
opt.model.bm = BidsModel('file', opt.model.file);
tsvFile = fullfile(pwd, 'sub-05_ses-01_task-MVPAVis_run-01_space-individual_desc-stc_motion.tsv');
counfoundMatFile = createAndReturnCounfoundMatFile(opt, tsvFile)
Warning:
missing variable(s): "actor"
> In bids.internal.error_handling (line 57)
In bids.transformers_list.check_field (line 22)
In bids.transformers_list.get_input (line 44)
In bids.transformers_list.Filter (line 69)
In bids.transformers>apply_munge (line 146)
In bids.transformers>apply_transformer (line 106)
In bids.transformers (line 83)
In createAndReturnCounfoundMatFile (line 47)
In untitled (line 8)
Warning:
missing variable(s): "actor"
> In bids.internal.error_handling (line 57)
In bids.transformers_list.check_field (line 22)
In bids.transformers_list.get_input (line 44)
In bids.transformers_list.get_output (line 23)
In bids.transformers_list.Filter (line 70)
In bids.transformers>apply_munge (line 146)
In bids.transformers>apply_transformer (line 106)
In bids.transformers (line 83)
In createAndReturnCounfoundMatFile (line 47)
In untitled (line 8)
Error using bids.internal.error_handling (line 53)
missing variable(s): "target"
Error in bids.transformers_list.check_field (line 22)
bids.internal.error_handling(mfilename(), ['missing' field_type], msg, tolerant, true);
Error in bids.transformers_list.Filter (line 73)
bids.transformers_list.check_field(left, data, 'query', false);
Error in bids.transformers>apply_munge (line 146)
output = bids.transformers_list.Filter(trans, data);
Error in bids.transformers>apply_transformer (line 106)
output = apply_munge(trans, data);
Error in bids.transformers (line 83)
data = apply_transformer(this_transformer, data);
Error in createAndReturnCounfoundMatFile (line 47)
content = bids.transformers(transformers, content);
Error in untitled (line 8)
counfoundMatFile = createAndReturnCounfoundMatFile(opt, tsvFile)
OK so to explain a couple of things:
It is normal that the bidspm is trying to apply the model to the motion.tsv file (that contains the realignment parameter from the preprocessing).
For example you could specify in your bids stats model that you want to exclude time points where the subjects moved too much.
What is not normal is that it would crash when it cannot find the variables it is supposed to work on.
Will fix this.
OK this is going to be a bids matlab issue
@all-contributors add @avanaudenhaege for bug, userTesting
@Remi-Gau
I've put up a pull request to add @avanaudenhaege! :tada:
Is there an existing issue for this?
Operating system
Operating system version
SPM 12 version
Platform
Platform version
bidspm version
v3.0.0
bidspm branch / commit number
branch = 'HEAD' commit = '0beefd61'
Expected Behavior
I used the following transformer to remove targets in my modelization :
It works well for my first run, it removes the targets and only keeps 'actor' for trials that have 'target = 0' Then I get an error. It seems that bidspm want to apply the transformation to the motion.tsv file as well, and therefore complains that there is no 'actor' or 'target' variable in this file.
Current Behavior & Error message
error_2023-03-27T16-48.log
Anything else?
No response