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] start implementing BIDS stats model transformers #493

Merged
merged 13 commits into from
Jan 27, 2022

Conversation

Remi-Gau
Copy link
Contributor

@Remi-Gau Remi-Gau commented Jan 26, 2022

  • add support for Add, Subtract, Divide, Multiply operations (many more to go)

List of transforms to implement

@Remi-Gau Remi-Gau changed the base branch from main to dev January 26, 2022 22:41
@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #493 (b300fd5) into dev (70761b0) will increase coverage by 0.19%.
The diff coverage is 89.28%.

❗ Current head b300fd5 differs from pull request most recent head 10e97ff. Consider uploading reports for the commit 10e97ff to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #493      +/-   ##
==========================================
+ Coverage   73.33%   73.52%   +0.19%     
==========================================
  Files         190      192       +2     
  Lines        3945     4004      +59     
==========================================
+ Hits         2893     2944      +51     
- Misses       1052     1060       +8     
Flag Coverage Δ
unittests 73.52% <89.28%> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/bids_model/getHRFderivatives.m 70.58% <0.00%> (ø)
src/utils/rmTrialTypeStr.m 66.66% <50.00%> (-33.34%) ⬇️
src/workflows/stats/bidsConcatBetaTmaps.m 75.38% <60.00%> (-1.67%) ⬇️
src/bids_model/applyTransformersToEventsTsv.m 86.66% <86.66%> (ø)
src/bids_model/getBidsTransformers.m 88.88% <88.88%> (ø)
src/subject_level/convertOnsetTsvToMat.m 100.00% <100.00%> (ø)
src/subject_level/createAndReturnOnsetFile.m 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70761b0...10e97ff. Read the comment docs.

@marcobarilari
Copy link
Collaborator

lol

@Remi-Gau Remi-Gau merged commit bb2eb42 into dev Jan 27, 2022
@Remi-Gau Remi-Gau deleted the remi-use_model_to_offset branch January 27, 2022 11:35
@CerenB
Copy link
Collaborator

CerenB commented Jan 27, 2022

Now i'm afraid!

@Remi-Gau
Copy link
Contributor Author

In brief: the BIDS stats model specification should in theory allow you to define a bunch of operation you want to perform on your "inputs" before you include them in the models.

The simplest example I have started implementing is: say you have an difference between the stimuli onsets written in your events.tsv and the "real" time when stimuli actually occurred (say the stimulus computer messed up the time stamps and you know they all came one second earlier than what was recorded).

You can either:

  • rewrite ALL your events.tsv to change this (Oh joy!)
  • add a few lines in your model JSON to remove that offset for all the conditions you are using.

Which one do you take?

@Remi-Gau
Copy link
Contributor Author

Added a bit of doc about this in here (scroll down):

https://cpp-spm.readthedocs.io/en/dev/set_up.html#bids-model-json-files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpecifyContrasts does not accept a model without contrasts (commit: d84cb6be)
3 participants