Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MNE group analysis presentation @ Biomag 2016 conf.

2,192 views

Published on

Web site is at:

http://mne-tools.github.io/mne-biomag-group-demo/

Published in: Science
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

MNE group analysis presentation @ Biomag 2016 conf.

  1. 1. How to perform MEG group analysis with MNE MNE software for processing MEG and EEG data, A. Gramfort, M. Luessi, E. Larson, D. Engemann, D. Strohmeier, C. Brodbeck, L. Parkkonen, M. Hämäläinen, Neuroimage, 2014 MEG and EEG data analysis with MNE-Python,A. Gramfort, M. Luessi, E. Larson, D. Engemann, D. Strohmeier, C. Brodbeck, R. Goj, M. Jas,T. Brooks, L. Parkkonen, M. Hämäläinen, Frontiers in Neuroscience, 2013 Biomag 2016 http://www.biomag2016.org/satellite_meetings2.php http://martinos.org/mne
  2. 2. • MNE based on C code developed for ~15 years by MSH • MNE-Python started ~6 years ago at MGH, Boston About the project Source: https://www.ohloh.net/p/MNE
  3. 3. http://martinos.org/mne/
  4. 4. http://mne-tools.github.io/mne-biomag-group-demo/
  5. 5. People behind this work @agramfort @dengemann @jasmainak http://martinos.org/mne/stable/whats_new.html @jaeilepp @Eric89GXL
  6. 6. (Some) MNE People @agramfort @mluessi @dengemann @lauriparkkonen @Eric89GXL @mshamalainen @t3on @joewalter @jasmainak @rgoj @chris=anmbrodbeck @jaeilepp @adykstra @leggi@a @kazemakase @TalLinzen @OlafHauk @ jdammers http://martinos.org/mne/stable/whats_new.html @kingjr
  7. 7. MNE People https://github.com/mne-tools/mne-python/graphs/contributors Alan Leggitt, Alexander Rudiuk, Alexandre Barachant, Alexandre Gramfort, Andrew Dykstra, Asish Panda, Basile Pinsard, Brad Buran, Camilo Lamus, Cathy Nangini, Chris Holdgraf, Christian Brodbeck, Christoph Dinh, Christopher J. Bailey, Christopher Mullins, Clemens Brunner, Clément Moutard, Dan G. Wakeman, Daniel McCloy, Daniel Strohmeier, Denis A. Engemann, Emanuele Olivetti, Emily Ruzich, Emily Stephen, Eric Larson, Fede Raimondo, Federico Raimondo, Félix Raimundo, Guillaume Dumas, Hafeza Anevar, Hari Bharadwaj, Ingoo Lee, Jaakko Leppakangas, Jair Montoya, Jean-Remi King, Johannes Niediek, Jona Sassenhagen, Jussi Nurminen, Kambiz Tavabi, Keith Doelling, Lorenzo De Santis, Louis Thibault, Luke Bloy, Mads Jensen, Mainak Jas, Manfred Kitzbichler, Manoj Kumar, Marian Dovgialo, Marijn van Vliet, Mark Wronkiewicz, Marmaduke Woodman, Martin Billinger, Martin Luessi, Matt Tucker, Matti Hamalainen, Michael Krause, Mikolaj Magnuski, Natalie Klein, Nick Foti, Nick Ward, Niklas Wilming, Olaf Hauk, Phillip Alday, Praveen Sripad, Richard Höchenberger, Roan LaPlante, Romain Trachel, Roman Goj, Ross Maddox, Sagun Pai, Saket Choudhary, Simon Kornblith, Simon- Shlomo Poil, Sourav Singh, Tal Linzen, Tanay, Teon Brooks, Tom Dupré la Tour, Yaroslav Halchenko,Yousra Bekhti, Ellen Lau, Mads Jensen !
  8. 8. https://github.com/mne-tools/mne-biomag-group-demo/ Get the codeto replicate
  9. 9. http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/index.html Analysis Scripts
  10. 10. One script
  11. 11. .../mne-biomag-group-demo/tree/master/scripts/processing Fetch data from OpenfMRI Sensor space analysis Source space analysis Anatomical pipeline
  12. 12. http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/index.html Results atgroup level
  13. 13. http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/index.html Demos and results for each subject
  14. 14. Installing MNE-Python $ pip install --upgrade --user mne Install Scientific Python environment, e.g.,Anaconda at http://martinos.org/mne/stable/install_mne_python.html https://www.continuum.io/downloads Install MNE-Python:
  15. 15. .../mne-biomag-group-demo/tree/master/scripts/processing Fetch data from OpenfMRI Sensor space analysis Source space analysis Anatomical pipeline
  16. 16. Built on top of FreeSurfer $ recon-all -s ${SUBJECT} -i xy000000.nii -all http://surfer.nmr.mgh.harvard.edu/
  17. 17. Anatomy workflow MRI data MRI data reconstructed recon-all (Freesurfer 5.1) BEM mesh mne watershed_bem or mne flash_bem BEM model MEG/EEG data Forward solution or gain matrix not automatic needs freesurfer Coregistration mne_analyze/mrilab/Python
  18. 18. BEM meshes http://martinos.org/mne/stable/auto_tutorials/plot_forward.html
  19. 19. BEM meshes >>> for subject_id in range(1, 20): >>> subject = "sub%03d" % subject_id >>> mne.bem.make_watershed_bem(subject, >>> subjects_dir=subjects_dir, >>> overwrite=True) http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/11-make_watershed.html
  20. 20. Preprocessing: From raw to ERP/ERF drifts blinks line noise cardiac 10 seconds filtered data clean data using SSPs Preprocessing to get clean evoked data (ERF/ERP) or ICA
  21. 21. Maxwell filtering http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_maxfilter.html MNE implements maxfilter (TM)
  22. 22. Maxwell filtering http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_maxfilter.html MNE implements maxfilter (TM)
  23. 23. Maxwell filtering http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_maxfilter.html MNE implements maxfilter (TM)
  24. 24. .../mne-biomag-group-demo/tree/master/scripts/processing Fetch data from OpenfMRI Sensor space analysis Source space analysis
  25. 25. Filtering http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_analysis_1.html
  26. 26. Filtering http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_analysis_1.html
  27. 27. Code for filtering >>> for subject_id in range(1, 20): >>> subject = "sub%03d" % subject_id >>> for run in range(1, 7): >>> raw_in = ... >>> raw = mne.io.read_raw_fif(raw_in, preload=True, add_eeg_ref=False) >>> raw.filter(1, 40, l_trans_bandwidth=0.5, h_trans_bandwidth='auto', >>> filter_length='auto', phase='zero', fir_window='hann') http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/02-python_filtering.html
  28. 28. Filter design http://martinos.org/mne/stable/auto_tutorials/plot_background_filtering.html
  29. 29. Filter design High pass filtering removes slow drifts and can make baselining unnecessary… yet the story is not that simple http://martinos.org/mne/stable/auto_tutorials/plot_background_filtering.html
  30. 30. Paradigm Presentation Screen Famous Unfamiliar Scrambled
  31. 31. Paradigm on trigger channel >>> mask = 4096 + 256 # mask for excluding high order bits >>> events = mne.find_events(raw, stim_channel='STI101', >>> consecutive='increasing', mask=mask, >>> mask_type='not_and', min_duration=0.003) >>> fig = mne.viz.plot_events(events) http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/03-run_extract_events.html
  32. 32. Paradigm in code >>> events_id = { >>> 'face/famous/first': 5, >>> 'face/famous/immediate': 6, >>> 'face/famous/long': 7, >>> 'face/unfamiliar/first': 13, >>> 'face/unfamiliar/immediate': 14, >>> 'face/unfamiliar/long': 15, >>> 'scrambled/first': 17, >>> 'scrambled/immediate': 18, >>> 'scrambled/long': 19, >>> } Use “tags” to describe events
  33. 33. From Epochs to Evoked >>> tmin, tmax = -0.2, 0.8 >>> reject = dict(grad=4000e-13, mag=4e-12, eog=180e-6) >>> baseline = None >>> >>> epochs = mne.Epochs(raw, events, events_id, tmin, tmax, proj=True, picks=picks, baseline=baseline, preload=True, decim=2, reject=reject, add_eeg_ref=False) http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/05-make_epochs.html …reject the ones with blinks
  34. 34. http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_analysis_1.html why did we drop epochs? Example of “drop log” for subject 1:
  35. 35. Use ICA on Epochs to remove ECG >>> ica_name = op.join(meg_dir, subject, 'run_%02d-ica.fif' % run) >>> ica = read_ica(ica_name) >>> n_max_ecg = 3 # use max 3 components >>> ecg_epochs = create_ecg_epochs(raw, tmin=-.5, tmax=.5) >>> ecg_inds, scores_ecg = ica.find_bads_ecg(ecg_epochs, method='ctps', threshold=0.8) >>> ica.exclude += ecg_inds[:n_max_ecg] >>> ica.apply(epochs) http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_ica.html
  36. 36. Use ICA on Epochs to remove ECG http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_ica.html
  37. 37. Fit and apply ICA on Epochs http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_ica.html
  38. 38. From Epochs to Evoked >>> evoked_faces = epochs['face'].average() >>> evoked_famous = epochs['face/famous'].average() >>> evoked_scrambled = epochs['scrambled'].average() >>> evoked_unfamiliar = epochs[‘face/unfamiliar'].average() >>> contrast = mne.combine_evoked([evoked_famous, >>> evoked_unfamiliar, >>> evoked_scrambled], >>> weights=[0.5, 0.5, -1.]) >>> mne.evoked.write_evokeds('%s-ave.fif' % subject, [evoked_famous, evoked_scrambled, evoked_unfamiliar, contrast, faces]) http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/06-make_evoked.html Index Epochs withtags
  39. 39. EEG Evoked for 3 first subjects http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_compare.html
  40. 40. EEG Evoked topographies (6 subjects) http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_compare.html
  41. 41. MEG Evoked for 3 first subjects http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_compare.html
  42. 42. MEG Evoked for 3 first subjects http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_compare.html
  43. 43. Back to filtering… http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_fanning.html >>> raw.filter(None, 40, fir_window='hann', phase='zero', h_trans_bandwidth=‘auto’, filter_length='auto')
  44. 44. Back to filtering… http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_fanning.html >>> raw.filter(None, 40, fir_window='hann', phase='zero', h_trans_bandwidth=‘auto’, filter_length='auto') Fanning problem
  45. 45. Much less fanning Back to filtering… http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_fanning.html >>> raw.filter(1, None, l_trans_bandwidth=0.5, fir_window='hann', phase='zero', h_trans_bandwidth=‘auto’, filter_length='auto')
  46. 46. Covariance est. and whitening Engemann, D.A., Gramfort,A., Automated model selection in covariance estimation and spatial whitening of MEG and EEG signals., Neuroimage 2015 >>> cov = mne.compute_covariance(epochs, tmax=0, method='shrunk')
  47. 47. Covariance est. and whitening >>> cov = mne.compute_covariance(epochs, tmax=0, method='shrunk') whitened Global Field Power whitened ERF whitened ERP http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_analysis_1.html
  48. 48. Grand averaging >>> for idx, evokeds in enumerate(all_evokeds): >>> # Combine subjects: >>> grand_avg[idx] = mne.combine_evoked(evokeds, 'equal') >>> mapping = {'Famous': evokeds[0], 'Scrambled': evokeds[1], 'Unfamiliar': evokeds[2]} >>> mne.viz.plot_compare_evokeds(mapping, [idx]) http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_group.html
  49. 49. Grand averaging >>> for idx, evokeds in enumerate(all_evokeds): >>> # Combine subjects: >>> grand_avg[idx] = mne.combine_evoked(evokeds, 'equal') >>> mapping = {'Famous': evokeds[0], 'Scrambled': evokeds[1], 'Unfamiliar': evokeds[2]} >>> mne.viz.plot_compare_evokeds(mapping, [idx]) http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_group.html From baseline to baseline !
  50. 50. MNE vs.Wakeman et al. http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_group.html
  51. 51. MNE vs.Wakeman et al. http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_group.html Real?
  52. 52. Sensors stats (cluster level) http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_sensor_cluster_stats_eeg_channel.html
  53. 53. Sensors stats (cluster level) http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_sensor_spatio_temporal_cluster_stats.html p = 0.01 (corrected)
  54. 54. Decoding http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_time_decoding.html >>> td = TimeDecoding(predict_mode='cross-validation', times=times, scorer='roc_auc') >>> td.fit(epochs, y) http://mne-tools.github.io/mne-biomag-group-demo/auto_scripts/08-run_time_decoding.html
  55. 55. Source space analysis •3 Layers BEM forward modeling •dSPM source localization on cortical surface •loose orientation (0.2) & depth (0.8) & SNR = 3 •RMS across orientations •morphing to fsaverage: subject fsaveragemorphing … the MNE (default) way
  56. 56. Source space analysis http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_analysis_2.html Subject 2 Contrast localization (faces vs. scrambled
  57. 57. Source space group analysis http://mne-tools.github.io/mne-biomag-group-demo/auto_examples/plot_group.html 16 subjects average of Contrast (faces vs. scrambled
  58. 58. MNE web report http://perso.telecom-paristech.fr/~mjas/biomag_demo/report_sub002.html
  59. 59. MNE web report http://perso.telecom-paristech.fr/~mjas/biomag_demo/report_sub002.html Command line: $ mne report --path MEG/sub002 -- info MEG/sub002/run_01_filt_sss- epo.fif --subject sub002 --subjects- dir subjects/ --verbose --jobs 6
  60. 60. Getting help http://martinos.org/mne/ http://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis Mailing list:
  61. 61. Getting inspired... http://martinos.org/mne/auto_examples/index.html
  62. 62. Sending feedback https://github.com/mne-tools/mne-python
  63. 63. Some links • Documentation: • http://martinos.org/mne/ (general doc) • http://martinos.org/mne/stable/manual/index.html (manual) • http://martinos.org/mne/stable/tutorials.html (tutorials with code) • http://martinos.org/mne/auto_examples/index.html (python examples) • Code: • https://github.com/mne-tools/mne-python (mne-python code) • https://github.com/mne-tools/mne-matlab (mne matlab toolbox) • https://github.com/mne-tools/mne-scripts (mne shell scripts)
  64. 64. Access HCP-MEG data as MNE-Python data structures https:/mne-tools.github.io/mne-hcp
  65. 65. Seamlessly plug HCP MEG data into the Python ecosystem …/mne-hcp/auto_tutorials/index.html Poster [Mo-P008] Engemann et al.
  66. 66. Alexandre Gramfort http://alexandre.gramfort.netContact: GitHub : @agramfort Twitter : @agramfort If you want a sticker come to the MNE poster ! Open Science!

×