Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add in the doc how to not name a condition or a contrast to make bidsResults work #973

Closed
1 task done
marcobarilari opened this issue Apr 1, 2023 · 4 comments · Fixed by #983
Closed
1 task done

Comments

@marcobarilari
Copy link
Collaborator

marcobarilari commented Apr 1, 2023

Is there an existing issue for this?

  • I have searched the existing issues

New feature

No response

Unclear documentation

I have in my event file for example condition_1 and condition_2 and contrast conditions and cond_1_gt_cond_2.

When running the results workflow, it fails since the code is set to:

line 387 of bidsResults.m

% skip contrast with name ending in _[0-9]* as they are run level
% contrasts

So, I might suggest adding somewhere (FAQ? A warning within bidspm?) that naming a contrast *_a-number is not a good idea.

The behavior now is either

  1. in case it is asked to print only 1 contrast, the process does not start cause matlabbatch is empty, or

  2. in case of multiple contrasts where one is named "correctly" and the other is not it just thrown an error that field dir does not exist (if you want to know more about this error LMK cause it is a bit long to write here and not sure it is relevant)

ps: I lied, I did not check if an issue exists already OR if it is already written somewhere 😇

@github-actions
Copy link

github-actions bot commented Apr 1, 2023

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Apr 1, 2023

a potential fix would be to name run wise contrast:

  • condition_1_run-1
  • condition_1_run-2
  • condition_2_run-1
  • condition_2_run-2

this way the "filtering" can be done by skipping things that end in _run-[0-9]* rather than just _[0-9]*

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Apr 1, 2023

On seconds thought I think your suggestion may be better: especially that you can easily rename the conditions in your TSV using variable transformation in the BIDS stats model

https://github.com/bids-standard/variable-transform/blob/main/spec/munge.md#replace

@marcobarilari
Copy link
Collaborator Author

marcobarilari commented Apr 3, 2023

Not sure which solution is less "destructive" for the workflow and back compatibility so I let you choose :) thanks a lot!

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 a pull request may close this issue.

2 participants