[fNIRS] Group analysis

External Email - Use Caution

Hello ladies and gentlemen,

I already checked for the matter in the mailing list archive and searched through the code, but couldn't find what I was hoping for.
Is there a suite of tools/library to perform group analysis with Epoch/Raw instances?

Let me clarify. I can already perform data analysis/conversion for one dataset concerning one performance of an experiment. I would like to either directly perform such processing for a group of datasets, or use the converted data (i.e. the Epochs) of several datasets to obtain one single figure of haemodynamic response. I encountered several difficulties to analyze Epochs from several since the channels would be "duplicated" as they exist for the first and the second Epochs sets, leading to obvious errors.

Sorry if I missed the thread where it has been discussed, and thanks in advance,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200624/5afc84f7/attachment.html

External Email - Use Caution

hi David,

what you mean by group analysis? can you be more specific?
GLM style analysis?

Alex

External Email - Use Caution

Hmmm. I'm really sorry, I don't quite know the specific terms for data analysis. To get some context, I'm part of the tech team in our lab : I'm not the one analyzing data, but I provide tools to others to do so (they're not devs, and some are not even scientists per se - they study cognition, but more at a functional level).

SO. From what I've understood, they would like to show a corellation between the performance of a precise action and haemodynamic changes. As of today, they use the Homer2/3 libraries along with MATLAB, but we would like to move on to open source projects.

They used a NIRSport to get the relevant raw data, which I can process using the fNIRS library, but only one at a time. What I would like to get, is the ability to :
1. convert the data from each performance of the experiment into an Epoch
2. squash the results into one single usable object
3. process this object, if needed
4. get figures with the average haemodynamic response of the group

Now I could obviously create an Epoch list after processing each set, but then comes the question of *averaging* the results. I tried to use the epoch.add_channels method to have one Epoch object, but then the other methods (such as epoch.plot_image) break because channels are duplicated.

Hope it is clearer,

David

De: "Alexandre Gramfort" <alexandre.gramfort at inria.fr>
?: "mne_mailing_list" <mne_analysis at nmr.mgh.harvard.edu>
Envoy?: Mercredi 24 Juin 2020 11:41:41
Objet: Re: [Mne_analysis] [fNIRS] Group analysis

External Email - Use Caution

hi David,

what you mean by group analysis? can you be more specific?
GLM style analysis?

Alex

External Email - Use Caution

Hello ladies and gentlemen,

I already checked for the matter in the mailing list archive and searched
through the code, but couldn't find what I was hoping for.
Is there a suite of tools/library to perform group analysis with Epoch/Raw
instances?

Let me clarify. I can already perform data analysis/conversion for one dataset
concerning one performance of an experiment. I would like to either directly
perform such processing for a group of datasets, or use the converted data
(i.e. the Epochs) of several datasets to obtain one single figure of
haemodynamic response. I encountered several difficulties to analyze Epochs
from several since the channels would be "duplicated" as they exist for the
first and the second Epochs sets, leading to obvious errors.

Sorry if I missed the thread where it has been discussed, and thanks in advance,

David
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200624/8d2229cb/attachment.html

External Email - Use Caution

They used a NIRSport to get the relevant raw data, which I can process
using the fNIRS library, but only one at a time.

In MNE you should be able to read these directly with read_raw_nirx
<https://mne.tools/dev/generated/mne.io.read_raw_nirx.html&gt;\.

1. convert the data from each performance of the experiment into an Epoch

2. squash the results into one single usable object

3. process this object, if needed
4. get figures with the average haemodynamic response of the group

Can you look at the fNIRS tutorial
<Page Redirection;
to see if it clears up how you would process a single subject's data? From
there, you can look into tutorials on how to combine data across subjects,
which are the same for MEG, EEG, and NIRS data in MNE (so you can look at
the MEG/EEG tutorials for ideas). There is also the experimental
GitHub - mne-tools/mne-nirs: Process Near-Infrared Spectroscopy Data in MNE repository where experimental APIs
are being developed, but it sounds like you won't need these (e.g., GLM).

Now I could obviously create an Epoch list after processing each set, but

then comes the question of *averaging* the results. I tried to use the
epoch.add_channels method to have one Epoch object, but then the other
methods (such as epoch.plot_image) break because channels are duplicated.

Sounds like you probably want epochs.average() to get trial-averaged
(Evoked) results for each subject, then use grand_average
<https://mne.tools/dev/generated/mne.grand_average.html&gt; to average across
all participants.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200624/9f64b4b4/attachment-0001.html

External Email - Use Caution

Alright things start to get clearer. I'll double-check the other tutorials to see what I can do, but I do think that epoch.average() and grand_average() are what I'm looking for. Thanks !

Have a good day,

David

De: "Eric Larson" <larson.eric.d at gmail.com>
?: "mne_mailing_list" <mne_analysis at nmr.mgh.harvard.edu>
Envoy?: Mercredi 24 Juin 2020 17:45:05
Objet: Re: [Mne_analysis] [fNIRS] Group analysis

External Email - Use Caution

They used a NIRSport to get the relevant raw data, which I can process using the
fNIRS library, but only one at a time.

In MNE you should be able to read these directly with [
mne.io.read_raw_nirx — MNE 1.7.0.dev17+g20174f448 documentation | read_raw_nirx ] .

1. convert the data from each performance of the experiment into an Epoch

2. squash the results into one single usable object
3. process this object, if needed
4. get figures with the average haemodynamic response of the group

Can you look at the [
Page Redirection
> fNIRS tutorial ] to see if it clears up how you would process a single
subject's data? From there, you can look into tutorials on how to combine data
across subjects, which are the same for MEG, EEG, and NIRS data in MNE (so you
can look at the MEG/EEG tutorials for ideas). There is also the experimental [
GitHub - mne-tools/mne-nirs: Process Near-Infrared Spectroscopy Data in MNE | GitHub - mne-tools/mne-nirs: Process Near-Infrared Spectroscopy Data in MNE
] repository where experimental APIs are being developed, but it sounds like
you won't need these (e.g., GLM).

Now I could obviously create an Epoch list after processing each set, but then
comes the question of *averaging* the results. I tried to use the
epoch.add_channels method to have one Epoch object, but then the other methods
(such as epoch.plot_image) break because channels are duplicated.

Sounds like you probably want epochs.average() to get trial-averaged (Evoked)
results for each subject, then use [
mne.grand_average — MNE 1.7.0.dev17+g20174f448 documentation | grand_average ] to
average across all participants.

Eric

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200625/358fde2f/attachment-0001.html