Script Sharing: Difference between revisions

From WhyNHowWiki
Jump to navigation Jump to search
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
Testing uploading
(beta version)


<pre>
This page is designed to be a place where Martinos users can begin sharing scripts for stimulus presentation, data processing, analysis, etc. Right now it is in beta as we figure out the best way to do this!
[[Image:ScriptTest.txt]]
 
</pre>
=Analysis=
 
==fMRI==
 
===Matlab===
 
====peak_nii====
 
This Matlab script created by Donald McLaren takes an .img or .nii file such as an F-map or T-map and a set of parameters for thresholding etc. and outputs a data structure with statistics and location information for the peak voxel(s) in each cluster (for either positive or negative values but not both). Below are some step-by-step directions for getting started. You can also type 'help peak_nii' for more information.
 
[https://gate.nmr.mgh.harvard.edu/wiki/whynhow/images/b/b8/Peaknii_113010.zip Download]
 
'''Running the program:'''
#Unzip the attached file to a directory
#in matlab, addpath directory, where directory is the directory containing peak_nii from step 1
#load parameters_aal
#change the parameters to be consistent with AlphaSim entries, or any other method you want to use to get the various parameters. type "parameters.field=value;" where field is the field name and value is the new value. parameters.label='Nitschke_Lab' for controllability regions
#save parameters_jack.mat parameters
#run the program by typing: [voxels regions]=peak_nii('imagefile','parameters_jack.mat'). imagefile is the actual image file, it must be an img or nii file.
#For a description of all the fields, type help peak_nii

Latest revision as of 20:46, 6 December 2010

(beta version)

This page is designed to be a place where Martinos users can begin sharing scripts for stimulus presentation, data processing, analysis, etc. Right now it is in beta as we figure out the best way to do this!

Analysis

fMRI

Matlab

peak_nii

This Matlab script created by Donald McLaren takes an .img or .nii file such as an F-map or T-map and a set of parameters for thresholding etc. and outputs a data structure with statistics and location information for the peak voxel(s) in each cluster (for either positive or negative values but not both). Below are some step-by-step directions for getting started. You can also type 'help peak_nii' for more information.

Download

Running the program:

  1. Unzip the attached file to a directory
  2. in matlab, addpath directory, where directory is the directory containing peak_nii from step 1
  3. load parameters_aal
  4. change the parameters to be consistent with AlphaSim entries, or any other method you want to use to get the various parameters. type "parameters.field=value;" where field is the field name and value is the new value. parameters.label='Nitschke_Lab' for controllability regions
  5. save parameters_jack.mat parameters
  6. run the program by typing: [voxels regions]=peak_nii('imagefile','parameters_jack.mat'). imagefile is the actual image file, it must be an img or nii file.
  7. For a description of all the fields, type help peak_nii