Online standalone interactive tutorial (“Notebook/Browser-Demo”) using NeuroDesk and or Matlab live scripts
likeajumprope opened this issue · 12 comments
- using NeuroDesk or Online Matlab or CodeOcean…
- Matlab live script
Idea:
- Take a Matlab example. e.g., Philips ECG 3T (but use
_matlab_script
version to start from) and make into a live script- e.g., by improving step-by-step comments, explaining output figures...
Question:
- Is it possible to run live scripts with Matlab online with example data stored somewhere? e.g., Matlab Live Script Gallery
Alternative: Video Tutorial of Standalone PhysIO in NeuroDesk
Question:
Is it possible to run live scripts with Matlab online with example data stored somewhere? e.g., Matlab Live Script Gallery
It's readily possible to use AWS data (e.g., S3 buckets) from MATLAB Online.
I wonder if using an OpenNeuro dataset would work for this tutorial(s)?
The reason I ask: these datasets are available as S3 buckets.
(There are other pathways too, but this is likely the lowest-hanging fruit.)
Dear Vijay @vijayiyer05,
That's an excellent idea, thank you very much! I think we will have to identify if/which of the OpenNeuro-datasets come with peripheral physiological recordings, because that's what PhysIO modeling is based on. If there are suitable ones, that would be a great example dataset indeed.
Outline tutorial in matlab livescript @mrikasper
Data set to be used: https://openneuro.org/datasets/ds001168/versions/1.0.1 and https://openneuro.org/datasets/ds000113/versions/1.3.0
Step 1a: Run PhysIO toolbox on data [x]
Step 1b: create github repo [x] see here
Step 2: Start preparing live script [x]
- the hemodynamic response function [x]
- brief background of types of physiological noise and need for correction in fmri [ ]
- modelling and visualizing regressors of physiological noise [ ]
- recovering physiologcial signal from peripheral recordings [ ]
- explanation of models and challenges [ ]
- diagnostic plots for QA of signal recovery [ ]
- explanation of consultation and use [ ]
- regressor maps [ ] - include regressors in GLM, run GLM [ ] --> integration SPM
- create and visualize F-contrast and tSNR gain maps of noise correction [ ]
- explanation of consultation and use [ ]
Idea for repository name: physio-live
Template to start from for Step one (run on data with SPM creation of F contrasts and visualization):
https://github.com/BRAIN-TO/cubric-physio
TODO @likeajumprope : Adapt inputs for openneuro dataset --> done
Note, for the openneuro dataset you chose, you will have to update PhysIO to support BIDS files with more than 3 columns by extending the following function with a 3rd input parameter nColumns
tapas_physio_read_columnar_textfiles(fileName, fileType, nColumns)
that can be retrieved within tapas_physio_read_physlogfiles_bids
via numel(val.Columns)
(in line 415)
or you find another example dataset with just 3 columns.
@mrikasper, I can now run physio fully on the first subject of the forest gump data set..
Some thoughts that I have had:
- I think it would be best to store the files in the matlab drive/online repository, instead of a git repository
- I also assume, that given that we need spm for the actual execution of the toolbox, the script will actually not be executable online in the real sense? But more something people can download and I just show what the results should look like?
- more tomorrow
Update
The tutorial exists in two versions:
- a github repository
- a matlab online/matlab drive version (see view only link here)
Both use data from the open neuro forest gump repository(sub-01).
There are a few things that need to be considered based on the experience I had with the matlab online space in particular:
-
the processing of the tutorial in matlab online, albeit possible, takes v e r y l o n g, so it might be good to add a statically rendered version of the tutorial. I found a nice example of something similar here.
-
The matlab drive also hits the max. storage space at some point. For example, it is not possible to strore both the output of the glm and glm_smooth files. So I might add a routine to secretively delete files throughout the tutorial.
Update on speed of Live-script demo on Matlab online.
In order to have the demo, tapas and spm in one repository, tapas and spm were integrated as sub-modules.
This solution works fine if the repository is cloned to a local machine. When opening and running the repository on Matlab online, however, pulling the sub-modules takes ~ 15min. Also, running the demo on matlab online takes significantly longer than running it on a local machine.
Link to the repositories:
Git: https://github.com/likeajumprope/PhysIO-Live
File exchange: https://au.mathworks.com/matlabcentral/fileexchange/128779-physio-live
Maybe appropriate dataset for Demo (Brainstem fMRI, native Siemens physio logfiles):
- https://doi.org/10.1016/j.celrep.2023.113405
- physiological and behavioral logfiles on OSF: https://osf.io/td5kp/
- fMRI data on OpenNeuro/DataLad: https://github.com/OpenNeuroDatasets/ds004808/
TODO:
- Assess, whether DataLad interface speeds up access for Matlab Online