bids-apps / PyMVPA

runs MVPA and RSA analysis BIDS bold derivative data
7 stars 3 forks source link

Aggregating multiple runs #6

Closed Amandaobrien8 closed 4 years ago

Amandaobrien8 commented 4 years ago

Hi everyone,

I am using the BIDS PyMVPA app on an fMRI dataset containing three runs. There are multiple conditions within each run. I would like to aggregate the three runs and classify conditions across the runs. What is the best way to aggregate these runs and deal with the new time points?

Additionally, is there a minimum number of acceptable trials for classification?

Thank you, Amanda

sajjadtorabian commented 4 years ago

Hi Amanda,

Running MVPA with 3 runs is not really a good idea. You usually need at least 8. Here you can find more info: https://cbmm.mit.edu/fmri-bootcamp

Let's say you want to use the app anyways and try it with 3 runs. Concatenation of runs happens automatically inside the app, so you don't need to worry about that. Everything regarding timing is also being taken care of. To perform this aggregation, you just need to run the app at the "participant_prep" analysis level. Then, you'll do classification by running the main "participant_test" level.

Amandaobrien8 commented 4 years ago

Thank you very much for your helpful response. I would like to try to use MVPA on the dataset, with the understanding that we may not have enough runs.

Regarding timing, I currently have a run-x_events.tsv file for each run that specifies onset and condition. Do these need to be combined into a single file or will the "participant_prep" analysis deal with these files individually based on the specified run?

Finally, is there a standard way to specify trials to be excluded based on movement (e.g.., perhaps as a column within the _events.tsv file)?

Thank you again, Amanda

sajjadtorabian commented 4 years ago

If you're continuing this way with 3 runs, remember that you should generate betas per individual trials, which can happen using the "--condition_attr_onset" argument.

You don't need to modify anything if your dataset is BIDSified. The app will automatically concatenate events info as well, which are taken from the tsv files.

If you can specify those trials with a particular label (e.g. "move"), then, if let's say you're classifying "cat" versus "dog", everything - including the "move"s - other than your two conditions will be excluded. You'll assign those labels inside the same "trial_type" column in your tsv, not through a separate column.

Amandaobrien8 commented 4 years ago

This is very helpful, thank you. Is there a minimum number of trials per participant that you would recommend for mvpa? I am using pediatric data and am trying to determine the optimal exclusion criteria based on number of good trials. Thank you!

sajjadtorabian commented 4 years ago

Well, if you've already scanned subjects, you cannot increase the number of trials, and the answer you're looking for depends on the quality of your data. What are you trying to classify? How many trials do you have for each condition per run? Since this is going outside the scope of the app usage, I'm closing this issue, but I'm happy to help more if you reach out via email.