This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
biac:analysis:physiological [2022/01/20 14:45] cmp12 |
biac:analysis:physiological [2023/02/23 18:43] (current) |
||
---|---|---|---|
Line 58: | Line 58: | ||
RetroTS will produce " | RetroTS will produce " | ||
- | |||
+ | === setup afni despike, retroicor and slicetime correction === | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ====== CIGAL pdigm specific ====== | ||
- | [[biac: | ||
- | |||
- | Currently this assumes that you have recorded your physiological responses through Cigal. | ||
- | |||
- | ===== physio_run.py ===== | ||
- | There is currently a tool for running AFNI-based correction of functional image data using physiological data. In the future it may support FSL-based correction. | ||
< | < | ||
- | physio_run.py --help | + | python3 / |
- | </code> | + | -subj_id sub-00104_run-4_ricor_phys \ |
+ | -blocks despike ricor tshift \ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -verb 1 | ||
- | < | ||
- | Usage: | ||
- | physio_run.py / | ||
- | |||
- | Program to produce formatted physiological data: | ||
- | Data will be corrected and recreated from the pdigm file based on information from run data | ||
- | BXH and PDIGM required | ||
- | OUTPUTPREFIX is the prefix for the physio-corrected output | ||
- | FORMAT: what pipeline to use, only supports ' | ||
- | |||
- | Options: | ||
- | -h, --help | ||
- | -f string, --format=string | ||
- | output format ( afni ) | ||
</ | </ | ||
- | '' | + | The above will produce an afni script |
- | The outputs will be OUTPUTPREFIX.bxh, | + | Convert the afni corrected output back to nii.gz to be used for other pre-processing if not using AFNI for all steps |
- | + | ||
- | ===== physio_create.py ===== | + | |
- | + | ||
- | The underlying tool used by '' | + | |
- | + | ||
- | This tool uses various fields from the bxh and pdigm file to output " | + | |
- | + | ||
- | The python tool will call cigal functions directly to do the corrections, | + | |
< | < | ||
- | physio_create.py --help | + | bxh2analyze --niigz -s pb03.sub-00104_run-4_ricor_phys.r01.tshift+orig.HEAD sub-00104_run-4_physiocorrected |
</ | </ | ||
+ | |||
- | < | ||
- | physio_create.py --bxh / | ||
- | Program to produce formatted physiological data: | ||
- | Data will be corrected and recreated from the pdigm file based on information from run data | ||
- | BXH and PDIGM required | ||
- | OUTPATH defaults to PWD | ||
- | HZ sampling rate | ||
- | FORMAT: defaults to fsl | ||
- | - fsl = cardio, | ||
- | - npm = time, | ||
- | - afni = cardiac.txt, | ||
- | |||
- | |||
- | Options: | ||
- | -h, --help | ||
- | -b FILE, --bxh=FILE | ||
- | -p FILE, --pdigm=FILE | ||
- | pdigm file for run | ||
- | -f string, --format=string | ||
- | output format ( fsl, | ||
- | --hz sampling rate is hz ( 100 ) | ||
- | -o PATH, --outpath=PATH | ||
- | location to store output files | ||
- | |||
- | </ | ||
- | |||
- | ===== AFNI details ===== | ||
- | |||
- | This section details the steps that the tool '' | ||
- | |||
- | Create the AFNI formated physiological text data. | ||
- | <code bash> | ||
- | |||
- | This would create my " | ||
- | |||
- | <code matlab> | ||
- | addpath / | ||
- | Opt.Respfile = '/ | ||
- | Opt.Cardfile = '/ | ||
- | Opt.VolTR = 1.5 | ||
- | Opt.Nslices = 34 | ||
- | Opt.PhysFS = 100 | ||
- | Opt.SliceOrder = ' | ||
- | %please choose the correct order if not running interleaved: | ||
- | |||
- | RetroTS(Opt) | ||
- | </ | ||
- | |||
- | The output of runnning the MATLAB script will be **" | ||
- | |||
- | Convert your data to 4D nifti if you haven' | ||
- | <code bash> | ||
- | |||
- | Create the afni script which you will use to actually run the 3dretroicor functionality: | ||
- | <code bash> | ||
- | ss_method ' | ||
- | |||
- | The result of the above command would be a tcsh script, which would run the despiking and 3dretroicor correction only. Run it: | ||
- | <code bash> | ||
- | |||
- | There will be a resulting folder with all the afni data inside. | ||
- | <code bash> | ||
- | #convert afni to nii, create bxh | ||
- | bxh2analyze --niigz -s 12345.results/ | ||
- | </ | ||
- | |||
- | Run the resting state pipeline: | ||
- | <code bash> | ||
Line 184: | Line 90: | ||
+ | ====== CIGAL pdigm specific processing ====== | ||
+ | [[biac: | ||