biac:analysis:physiological
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
biac:analysis:physiological [2014/08/04 16:03] – external edit 127.0.0.1 | biac:analysis:physiological [2022/01/20 17:17] – cmp12 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Physiological Correction Methods ====== | ====== Physiological Correction Methods ====== | ||
- | Currently this assumes that you have recorded your physiological responses through Cigal. | + | ===== Generate resampled TSV from raw GE physio files automatically copied from the scanners |
- | ===== physio_run.py ===== | + | Stock GE physio |
- | There is currently a tool for running AFNI-based correction of functional image data using physiological data. | + | |
- | < | ||
- | physio_run.py --help | ||
- | </ | ||
< | < | ||
- | Usage: | + | [cmp12@blade17 20211218_03399]$ |
- | physio_run.py | + | usage: convert_GEphysio.py |
+ | | ||
+ | | ||
- | Program to produce formatted physiological | + | create 100Hz resampled TSV from raw GE physio |
- | Data will be corrected | + | |
- | BXH and PDIGM required | + | optional arguments: |
- | | + | -h, --help |
- | | + | |
+ | | ||
+ | --physdir PHYSDIR | ||
+ | | ||
+ | | ||
+ | --delay DELAYTIME | ||
+ | | ||
- | Options: | ||
- | -h, --help | ||
- | -f string, --format=string | ||
- | output format ( afni ) | ||
</ | </ | ||
- | '' | + | Provide a valid BXH ( and JSON if possible ) and a path to your subject physio folder to convert_GEphysio.py function. |
- | The outputs | + | This function |
- | ===== physio_create.py ===== | + | If matching respiration and pulse files are found theoretical scan triggers on each TR will be created and the respiration and pulse data will be resampled to 100Hz and locked to the onset of the scan. If disdaqs are detected in the BXH the corresponding physio time will be discarded. |
- | The underlying tool used by '' | + | < |
+ | / | ||
+ | </ | ||
- | This tool uses various fields from the bxh and pdigm file to output " | + | By default you will get a 100Hz resampled TSV with headers |
- | The python tool will call cigal functions directly to do the corrections, | ||
- | < | + | The **--bidsout** flag will output a TSV without headers and a BIDS sidecar with appropriate column labels and sampling frequency. |
- | physio_create.py | + | |
- | </ | + | |
- | < | ||
- | physio_create.py --bxh / | ||
- | Program | + | The **--afnislicetime** flag will output two 1D slicetiming files to be used with RetroTS.py |
- | Data will be corrected | + | |
- | BXH and PDIGM required | + | |
- | OUTPATH defaults to PWD | + | |
- | HZ sampling rate | + | |
- | FORMAT: defaults to fsl | + | |
- | - fsl = cardio, | + | |
- | - npm = time, | + | |
- | - afni = cardiac.txt, | + | |
+ | === Using afni === | ||
- | Options: | + | You can create regressors for afni preprocessing from output files above using RetroTS.py |
- | -h, --help | + | |
- | -b FILE, --bxh=FILE | + | < |
- | | + | python3 / |
- | pdigm file for run | + | |
- | -f string, --format=string | + | -n #slices |
- | | + | -v TR in seconds |
- | --hz sampling rate is hz ( 100 ) | + | |
- | -o PATH, --outpath=PATH | + | |
- | location to store output files | + | |
</ | </ | ||
- | ===== AFNI details ===== | + | RetroTS will produce " |
- | This section details the steps that the tool '' | ||
- | Create the AFNI formated physiological text data. | + | === setup afni despike, retroicor and slicetime correction === |
- | <code bash> | + | |
- | This would create my " | ||
- | < | + | < |
- | addpath | + | python3 |
- | Opt.Respfile = '/path/to/respiration.txt' | + | -subj_id sub-00104_run-4_ricor_phys \ |
- | Opt.Cardfile = '/path/to/cardiac.txt' | + | |
- | Opt.VolTR = 1.5 | + | |
- | Opt.Nslices = 34 | + | -tcat_remove_first_trs 2 \ |
- | Opt.PhysFS = 100 | + | -tshift_opts_ts -tpattern @/ |
- | Opt.SliceOrder = ' | + | -ricor_regs_nfirst 2 \ |
- | %please choose the correct order if not running interleaved: | + | |
+ | -verb 1 | ||
- | RetroTS(Opt) | ||
</ | </ | ||
- | The output of runnning the MATLAB script | + | The above will produce an afni script to throw out 2 timepoints, perform |
- | Convert | + | Convert |
- | <code bash> | + | |
- | Create the afni script which you will use to actually run the 3dretroicor functionality: | + | < |
- | < | + | bxh2analyze --niigz -s pb03.sub-00104_run-4_ricor_phys.r01.tshift+orig.HEAD sub-00104_run-4_physiocorrected |
- | 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 116: | Line 90: | ||
+ | ====== CIGAL pdigm specific processing ====== | ||
+ | [[biac: | ||
biac/analysis/physiological.txt · Last modified: 2024/06/21 15:44 by 127.0.0.1