-
Notifications
You must be signed in to change notification settings - Fork 15
[ENH] save info concatenation #338
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] save info concatenation #338
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #338 +/- ##
==========================================
- Coverage 64.39% 63.91% -0.48%
==========================================
Files 110 110
Lines 1733 1746 +13
==========================================
Hits 1116 1116
- Misses 617 630 +13
Continue to review full report at Codecov.
|
|
FYI in |
|
No rush to review. I was just in the food to get this one out of m way. |
very nice, I finally ran with the demo. |
| % Creates a tsv that lists the content of the 4D image. | ||
| % This TSV is in the subject level GLM folder where the beta map came from. | ||
| % This TSV file is named ``sub-subLabel_task-taskName_space-space_labelfold.tsv``. | ||
| % |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% in tsv file, folds represent the runs/repetitions of condition, and labels represent trial type (condition).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was not sure what terms to use because people in different fields use different words to refer to the same thing...
Should we stick with BIDS nomenclature: run and trial_type ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like BIDS labelling. and it is true that folds are used in some other toolboxes... only thing about the run is, it might be confusing when one has 4D-maps with repetitions (run 1 repetition1, run1 repetition2, ...). No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha yes... you are right...
but actually, it could be useful to have both run and repetition, no?
the most "verbose" way of doing this is taking the whole name of the regressor for each image from SPM.mat
this should contain all the info you need: and it is then up to the user to parse this string.
so having the run info AND the regressor_name? there will be a bit of information redundancy because the run number is in the regressor name but...meh...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the current form, if i am not mistaken, we needed to change the trial type (in _events.tsv file) for GLM to have separate repetitions modelled as separate regressors (betas). so technically it would work like this:
| repetition | runs | trial_type |
|---|---|---|
| 1 | 1 | Correct_Task*bf(1)_rep1 |
| 2 | 1 | Correct_Task*bf(1)_rep2 |
| 1 | 2 | Correct_Task*bf(1)_rep1 |
| 2 | 2 | Correct_Task*bf(1)_rep2 |
| 1 | 1 | Incorrect_Task*bf(1)_rep1 |
| 2 | 1 | Incorrect_Task*bf(1)_rep2 |
| 1 | 2 | Incorrect_Task*bf(1)_rep1 |
| 2 | 2 | Incorrect_Task*bf(1)_rep2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sort of (I think that SPM always appends the BF at the end)
| repetition | runs | trial_type |
|---|---|---|
| 1 | 1 | Correct_Task_rep1*bf(1) |
| 2 | 1 | Correct_Task_rep2*bf(1) |
| 1 | 2 | Correct_Task_rep1*bf(1) |
| 2 | 2 | Correct_Task_rep2*bf(1) |
| ... |
But the issue that not everyone will have repetitions, but everyone will have runs and "trial_type".
Also the names of the regressors are longer:
'Sn(1) listening*bf(1)'
Where Sn(X) is the number of the 'session' in SPM lingo (more or less a 'run' in the BIDS world... why use the same terms, huh?)
fixes #323
When concatenating betamaps.
Ensures that there is only 1 image per "contrast".
Creates a tsv that lists the content of the 4D image.
TSV is in the subject level GLM folder where the beta map came from.
TSV file is named
sub-subLabel_task-taskName_space-space_labelfold.tsv.An example of the content.
foldsandlabelsare used as they are more commonly used in MVPA analysis than runs or trial type (condition) : hope this is not too confusing.it can be loaded with
spm_load.