lcnbeapp / beapp

The Batch Electroencephalography Automated Processing Platform (BEAPP)
Other
35 stars 23 forks source link

ICA with MARA 10-20 channel recognition #1

Closed AnnaKirkAU closed 5 years ago

AnnaKirkAU commented 5 years ago

When I try to run ICA with MARA (or without), I get the same error message: Error in beapp_ica_select_channels_for_file (line 41). I had to create a unique net for my files and it includes the standard 10-20 channel labels in the CED file. I also indicated the channels that do not fit into the standard 10-20 labels as prompted by the gui. I am attaching an image of the error.

ica error message
lcnbeapp commented 5 years ago

My first guess would be that the net didn't end up getting added correctly.

Try to find it in your net library (reference data/net library) -- if it's there make sure it has all the data the other nets have. Also check the net_library_options.mat file (in the reference data folder) and make sure your net was added into that table.

Also look at the BEAPP Net Library section of the documentation and see if that helps.

If it doesn't look like this is the issue, let me know.

AnnaKirkAU commented 5 years ago

The new net is in the net library and has the same 12 fields as the preset nets. Could the information be incorrect? I got it from the CED file in EEGLAB and adjusted it to channel set up used. The new net is also in the net_library_options.mat file. I read the BEAPP Net Library section of the User Guide in order to get it set up properly, but something still seems to be tripping up the ICA.

On Tue, Dec 4, 2018 at 4:37 PM lcnbeapp notifications@github.com wrote:

My first guess would be that the net didn't end up getting added correctly.

Try to find it in your net library (reference data/net library) -- if it's there make sure it has all the data the other nets have. Also check the net_library_options.mat file (in the reference data folder) and make sure your net was added into that table.

Also look at the BEAPP Net Library section of the documentation and see if that helps.

If it doesn't look like this is the issue, let me know.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-444268125, or mute the thread https://github.com/notifications/unsubscribe-auth/ArfnsxSX2gonAvNn8HIOSjiilMmLc_KPks5u1usbgaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

In the net_library_options table, can you make sure the "Net_10_20_Electrode_Equivalents" array for the net you entered looks similar to the other nets?

AnnaKirkAU commented 5 years ago

Yes, it is similar. Some of the 10-20 electrodes options weren't in my set up so I left them NaN, but the ones that correspond have the appropriate electrode number by the 10-20 electrode name.

On Wed, Dec 5, 2018 at 3:21 PM lcnbeapp notifications@github.com wrote:

In the net_library_options table, can you make sure the "Net_10_20_Electrode_Equivalents" array for the net you entered looks similar to the other nets?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-444632293, or mute the thread https://github.com/notifications/unsubscribe-auth/ArfnswR4tNAD45dm-WviyiAcEywyaOLWks5u2Cq8gaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

I think that's the problem, you might need to add all the 10-20 electrode equivalents if you're running ICA. Is your net type missing some of the 10-20 electodes?

AnnaKirkAU commented 5 years ago

Yes, it is. It is a cap with movable electrodes, so there are no electrodes on

On Thu, Dec 6, 2018 at 2:28 PM lcnbeapp notifications@github.com wrote:

I think that's the problem, you might need to add all the 10-20 electrode equivalents if you're running ICA. Is your net type missing some of the 10-20 electodes?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-444999154, or mute the thread https://github.com/notifications/unsubscribe-auth/Arfns4oieml5CM4FCPweL_oQHRjm_L23ks5u2W_2gaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

AnnaKirkAU commented 5 years ago

Sorry, accidentally hit send before finishing the email. I do not have electrodes for T5, T3, and T4. In the User Guide it shows T3/T7 and T4/T8, but it does not show that in the gui. Can I put T7 and T8, because I do have those electrodes covered, instead of T3 and T4?

On Thu, Dec 6, 2018 at 2:52 PM Anna Kirkland ak0698a@student.american.edu wrote:

Yes, it is. It is a cap with movable electrodes, so there are no electrodes on

On Thu, Dec 6, 2018 at 2:28 PM lcnbeapp notifications@github.com wrote:

I think that's the problem, you might need to add all the 10-20 electrode equivalents if you're running ICA. Is your net type missing some of the 10-20 electodes?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-444999154, or mute the thread https://github.com/notifications/unsubscribe-auth/Arfns4oieml5CM4FCPweL_oQHRjm_L23ks5u2W_2gaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

Yes, good catch, I would do that. And along the same idea, if you have a P7 electrode, use that for T5.

AnnaKirkAU commented 5 years ago

Okay, I'll try that. As for P7 and P8, for most of my files I have it but there was a setup mistake on a few participants and I cannot use that channel for a subset. Would replacing it with another close by channel mess up the ICA process?

On Thu, Dec 6, 2018 at 3:17 PM lcnbeapp notifications@github.com wrote:

Yes, good catch, I would do that. And along the same idea, if you have a P7 electrode, use that for T5.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-445015140, or mute the thread https://github.com/notifications/unsubscribe-auth/Arfns1Ks0VUbBdRKxCPWZKjrSitlLFIkks5u2XtfgaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

That's a tricky question. Replacing the channel with another close by one would probably make ICA less accurate.

I would think about interpolating the data for those channels. It's not something you could do automatically in the beapp pipeline, unless you want to use happe and its bad channel detection. Otherwise, you could replace the data for those channels with NaNs and see if it can run through ICA.

AnnaKirkAU commented 5 years ago

It won't let me run it through ICA with any NaN, but it will run when electrode numbers are provided with each label. I will try interpolating the data for P7 and P8 for the few files that need it. Thanks for that advice.

Now when I can get it to run it says "Warning: Electrode(s) E8, E17, E19, E20 ,E21 are not found in file chanlocs" -- these are the electrodes I noted in the gui to add that are not listed as the 10-20 electrodes options.

On Thu, Dec 6, 2018 at 3:42 PM lcnbeapp notifications@github.com wrote:

That's a tricky question. Replacing the channel with another close by one would probably make ICA less accurate.

I would think about interpolating the data for those channels. It's not something you could do automatically in the beapp pipeline, unless you want to use happe and its bad channel detection. Otherwise, you could replace the data for those channels with NaNs and see if it can run through ICA.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-445022535, or mute the thread https://github.com/notifications/unsubscribe-auth/ArfnsyRx1IeAiTkWW1C8b5N54n9HUwblks5u2YE1gaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

When entering the additional electrodes, are you entering the index or the channel label? Make sure you're entering the index (i.e, the rows corresponding to the channel data you're adding).

Otherwise, the electrodes may not be in your coordinate file. That's the file you added when beapp prompted you with this:

image

Make sure your additional electrodes are in your coordinate file

AnnaKirkAU commented 5 years ago

Yes, I added the index number (e.g, 8, 20, 21) and not the labels. They are listed in my coordinated file and my net library as well.

On Thu, Dec 6, 2018 at 4:41 PM lcnbeapp notifications@github.com wrote:

When entering the additional electrodes, are you entering the index or the channel label? Make sure you're entering the index (i.e, the rows corresponding to the channel data you're adding).

Otherwise, the electrodes may not be in your coordinate file. That's the file you added when beapp prompted you with this:

[image: image] https://user-images.githubusercontent.com/32404129/49612614-417bfc80-f973-11e8-8b01-3b5e2c095641.png

Make sure your additional electrodes are in your coordinate file

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-445039746, or mute the thread https://github.com/notifications/unsubscribe-auth/Arfns7OxDcY-9I0AKuPQjreWV3BGUtiBks5u2Y71gaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

Are channels 8, 20, and 21 labeled E8, E20, and E21, or are they named something else?

Also, does running it with this warning run all the way through, or does it cause a later error?

AnnaKirkAU commented 5 years ago

They are labeled Cz, AF3, and AF4 with the index of 8, 20, and 21. When the ICA is completed, the remaining modules only include the 18 specified 10-20 electrodes and drops the other three. The whole pipeline runs, but then when I look out the psd outputs those three channels have "NaN" instead of values.

On Fri, Dec 7, 2018 at 11:08 AM lcnbeapp notifications@github.com wrote:

Are channels 8, 20, and 21 labeled E8, E20, and E21, or are they named something else?

Also, does running it with this warning run all the way through, or does it cause a later error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-445280028, or mute the thread https://github.com/notifications/unsubscribe-auth/Arfns8daeBZ74CtQC2yfpR2yE3JSQDCAks5u2pJugaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

It looks like beapp might expect channel labels to be 'E'+[their channel index]. For now, can you try changing those channel names to E+their index, and see if that fixes it?

I'll look more into this -- it in the future, it sounds like beapp shouldn't rely on the inputs being E+index

AnnaKirkAU commented 5 years ago

That did the trick! Everything is running properly now. Thank you so much for your help!

On Fri, Dec 7, 2018 at 1:40 PM lcnbeapp notifications@github.com wrote:

It looks like beapp might expect channel labels to be 'E'+[their channel index]. For now, can you try changing those channel names to E+their index, and see if that fixes it?

I'll look more into this -- it in the future, it sounds like beapp shouldn't rely on the inputs being E+index

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcnbeapp/beapp/issues/1#issuecomment-445325987, or mute the thread https://github.com/notifications/unsubscribe-auth/Arfns_GA4TUQ80k17ZTC78cOJSic2m6Wks5u2rY0gaJpZM4ZBW0y .

-- Anna Kirkland, B.A. Ph.D. Student in Behavior, Cognition, and Neuroscience American University

lcnbeapp commented 5 years ago

Great to hear! No problem, sorry you ran into trouble