Skip to content

BIDS import/export, bet_premask bug fix, new modules - #115

Merged
tiborauer merged 11 commits into
automaticanalysis:masterfrom
jooh:bidsfix
Jun 27, 2017
Merged

BIDS import/export, bet_premask bug fix, new modules#115
tiborauer merged 11 commits into
automaticanalysis:masterfrom
jooh:bidsfix

Conversation

@jooh

@jooh jooh commented Jun 21, 2017

Copy link
Copy Markdown
Collaborator

BUG FIXES / IMPROVEMENTS:

  • BIDS import takes new optional input arguments to specify tasks/sessions of interest (also useful for controlling the order in which data gets added to AA)
  • BIDS import preserves the 'sub-' prefix, which is more consistent with the BIDS spec I think (so if you wanted to share the aa pipeline as a derivative the subject folder names would be sub-x rather than just numbers).
  • BIDS export can now handle subject names with or without sub- prefix
  • fix bug in bet_premask (Matlab is not very good at testing the existence of relative paths, so you have to check for abs path first).

NEW MODULES:

  • aamod_meanstructural - does what it says on the tin.
  • aamod_firstlevel_model_1/2/3 - split up the first level modeling so that custom processing can be added before the model is estimated. The standard aamod_firstlevel_model remains available and is sufficient for most people I imagine.
  • aamod_firstlevel_model_subrunsplit - an example of what you can do when the first level model is split into stages. Here we accommodate 'sub run' splits - cases where independent runs of the experiment were acquired without stopping the scanner. This module makes it possible to split the SPM model up so that these sub runs are modelled as independent sessions. This is a useful initial stage e.g. for MVPA.

TODO:

  • tests for the above! I have run all of the above through my own code and it all works fine. Once my current dataset is posted on openfmri that can perhaps be added as another BIDS test AA script that would include the above modules.

@jooh
jooh requested a review from tiborauer June 21, 2017 11:02
@tiborauer

Copy link
Copy Markdown
Member

Could you, please, make sure that the function header in aamod_meanstructural.m (line 1) is consitent with the function name?

@jooh

jooh commented Jun 21, 2017

Copy link
Copy Markdown
Collaborator Author

Done.

@tiborauer

Copy link
Copy Markdown
Member

I have tested the relevant functions (reading and writing BIDS), and they are working as usual. Though, I have not tested the new features and modules. I suggest to come up with relevant examples. However, if you are confident enough, I am happy to merge the PR.

@jooh

jooh commented Jun 22, 2017 via email

Copy link
Copy Markdown
Collaborator Author

@jones-michael-s

Copy link
Copy Markdown
Collaborator

Small glitch: I believe there's a typo in the report generation in the firstlevel_model modules -- the jpegs that get created during analysis are named diagnostics_... (note the "s") and the report generation looks for files named diagnostic_... The (current) single-file version of aamod_firstlevel_model.m has the same glitch.

There's also currently quite a number of firstlevel module variants in the distribution. As a new user, I found this rather confusing. Might we want to think about organizing these (or culling ones that are more "experimental") in the spirit of trying to make aa more user friendly?

@jooh

jooh commented Jun 23, 2017

Copy link
Copy Markdown
Collaborator Author

Ok, I had no idea reports work in that way. I ran a grep diagnostics_ aa_modules/*.m and changed accordingly. Better now?

Re models, I think fMRI necessarily involves a huge number of custom first level models. That's where almost all the theoretically interesting stuff happens (the second level model is usually just RFX on the summary stats). The alternative is to try to cover all the unusual model cases in one monolithic aamod_firstlevel_model, but I think that's actually more confusing. For one thing you would need to look at the module settings to know what kind of model was run, whereas with custom modules you can see immediately from the task list what was done.

So I think we should have many first level models, but perhaps we need to add more documentation to clarify exactly what each variant is doing. For instance, the models I added now have lots of comments discussing what they are for, and pointing out that you may prefer aamod_firstlevel_model for standard use cases.

@jones-michael-s

Copy link
Copy Markdown
Collaborator

Ok, I had no idea reports work in that way. I ran a grep diagnostics_ aa_modules/*.m and changed accordingly. Better now?

I checked the new diffs and they look good to me. Thanks.

Also, I see your point about providing useful custom modules (for first level analysis and in general).

@jooh

jooh commented Jun 26, 2017

Copy link
Copy Markdown
Collaborator Author

So we are all good to merge then @tiborauer?

@tiborauer
tiborauer merged commit d5ad5ed into automaticanalysis:master Jun 27, 2017
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 this pull request may close these issues.

3 participants