Meg information based connectivity coding session: Difference between revisions

From MEG Core
Jump to navigation Jump to search
Content added Content deleted
No edit summary
 
Line 27: Line 27:
#In python, frites_output_root=$(pwd)/frites_dset
#In python, frites_output_root=$(pwd)/frites_dset
ipython
ipython
from frites_connectivity_tutorial.load_dataset import load_dataset
from frites_connectivity_tutorial.load_data import load_dataset
dt = load_dataset(<<FRITES_OUTPUT_ROOT>>)
dt = load_dataset(<<FRITES_OUTPUT_ROOT>>)



Latest revision as of 12:58, 12 August 2022

We will be meeting virtually over Zoom from 1pm-3pm with breakout rooms for questions and collaboration
There will be a quick discussion and some example data on biowulf.

FRITES toolbox

Club MEG Presentation Recording

 Background
 Getting Started Scripts
 Example Scripts

Install in new environment (RECOMMENDED!):

 conda create -n frites conda-forge::mne conda-forge::jupyterlab pip -y 
 conda activate frites
 pip install frites
 git clone https://github.com/brainets/CookingFrites.git
 cd CookingFrites
 jupyter lab
 #Once jupyter is open, the notebooks are in the notebooks folder
 #For MEG data to use with this --- Just test data, there are many optimizations that have not been performed
 pip install git+https://github.com/jstout211/connectivity_tutorial.git
 
 cp /vf/users/MEGmodules/modules/frites_dset.zip ./  
 unzip frites_dset.zip
 #In python, frites_output_root=$(pwd)/frites_dset
 ipython 
 from frites_connectivity_tutorial.load_data import load_dataset
 dt = load_dataset(<<FRITES_OUTPUT_ROOT>>)

Install in current environment (Better to use New environment as listed above!)-

 #Download getting started tutorials
 git clone https://github.com/brainets/CookingFrites.git
 pip install frites

Use on biowulf

 sinteractive --mem=12G --cpus-per-task=8 
 module use --append /data/MEGmodules/modulefiles
 module load mne_spyder  #loads mne/mne-bids/frites/frites_tutorial

SAM Symoblic Transfer Entropy Connectivity

Background

Club MEG SAM Connectivity Presentation Recording

Recommendations

 This process is a trigger-free process that estimates the symbolic transfer entropy (connectivity assessed by delayed propagation of signals) between two ROIs 
 70-185Hz has been tested and is recommended as a filter band
 Use an atlas based input for the bivariate connectivity assessment (AAL atlas, Desikan K., Destreux...)
 SAMwts or Patch_wts to create the beamformer
 Output is a text file
 Must determine an embedding dimension (4 as default) - the higher the embedding the more data needed
 Minimal requirements (>=1Khz sampling rate and >=300s of data)
 The inputs do not need to be brain regions (for example can compare STE between audio track to brain region)

Use on Biowulf

 #Log into biowulf
 sinteractive --mem=6G --cpus-per-task=4  #You may need more mem/cpus
 #Make sure modules are loadable -- this can also be added to ~/.bashrc file
 module use --append /data/MEGmodules/modulefiles
 module load SAMsrcDev
 #Make the SAM beamformers and apply the symbolic transfer entropy
 sam_cov ...
 sam_wts ...
 STEdelay ....  


 Usage: STEdelay [options]	Version 5.0 (64-bit) rev-1, Aug 10 2022
 
 Options:
 If a parameter begins with '--', it is allowed on the command line,
 otherwise it is only allowed in a parameter file (see -m).
 All times are in seconds.
 
   -h, --help               show this help
   -r DSNAME, --DataSet DSNAME
                            MEG dataset name [env_var = ds]
   -m PFILE, --param PFILE  parameter file name (optionally ending
                            in ".param") [env_var = param]
   -v, --verbose            verbose output
   --CovType GLOBAL|SUM|ALL which covariance matrix to use for the analysis
   --CovBand LO HI          covariance bandwidth limits in Hz
   --ImageBand LO HI        imaging covariance bandwidth limits in Hz
   --OrientBand LO HI       band to use for orientation instead of Global (Hz)
   --SmoothBand LO HI       used to smooth Hilbert envelope, kurtosis, or RVE (Hz)
   --Notch                  apply a powerline notch
                            (including harmonics)
   --Hz HZ                  frequency for powerline (Hz, default 60)
   ImageMetric METRICSPEC   imaging metric
   --Extent DIST            radial extent from ROI voxels or centroid (mm)
   -t TARGETFILE, --TargetName TARGETFILE
                            file containing target coordinates
   -i MRIDIR, --MRIDirectory MRIDIR
                            MRI directory root [env_var = mridir]
   -o IMAGEDIR, --ImageDirectory IMAGEDIR
                            image output directory [env_var = imagedir]
   --PrefixLength N         DataSet prefix may be specified as a number
                            or as a prefix delimiter (default "_")