Hello,
I am trying to create RETROICOR regressors to use in fMRI analysis. I am working with Siemens .resp/.puls files as described here. I have successfully removed the log headers and created the corresponding cardiac/respiratory time series as one-column text-files. I thus set my physio.log_files.vendor as 'Custom' as opposed to 'Siemens'. I interpolated both physiological time series to 200 Hz and matched the beginning and end time to those of the fMRI scan they are associated with.
The parameters I used are below (slightly altered such as to be hardcoded with the files I provide below).
`physio = tapas_physio_new('RETROICOR');
physio.log_files.vendor = 'custom';
physio.log_files.respiration = 'R2c001_resp.txt';
physio.log_files.cardiac = 'R2c001_puls.txt';
physio.preproc.cardiac.modality = 'OXY';
physio.save_dir = '';
physio.log_files.sampling_interval = [.005, .005];
physio.log_files.relative_start_acquisition = 0;
physio.log_files.scan_timing = '';
physio.log_files.align_scan = 'last';
physio.scan_timing.sqpar.Nslices = 20;
physio.scan_timing.sqpar.NslicesPerBeat = 20;
physio.scan_timing.sqpar.TR = 1.25;
physio.scan_timing.sqpar.Ndummies = 1;
physio.scan_timing.sqpar.Nscans = 482;
physio.scan_timing.sqpar.onset_slice = 11;
physio.scan_timing.sync.method = 'nominal';
physio.preproc.cardiac.initial_cpulse_select.method = 'auto';
physio.preproc.cardiac.initial_cpulse_select.file = 'initial_cpulse_kRpeakfile.mat';
physio.preproc.cardiac.initial_cpulse_select.min = 0.4;
physio.preproc.cardiac.posthoc_cpulse_select.method = 'auto';
physio.preproc.cardiac.posthoc_cpulse_select.percentile = 80;
physio.preproc.cardiac.posthoc_cpulse_select.upper_thresh = 60;
physio.preproc.cardiac.posthoc_cpulse_select.lower_thresh = 60;
physio.model.orthogonalise = 'RETROICOR';
physio.model.censor_unreliable_recording_intervals = false;
physio.model.output_multiple_regressors = 'multiple_regressors.txt';
physio.model.output_physio = 'physio.mat';
physio.model.retroicor.include = true;
physio.model.retroicor.order.c = 2;
physio.model.retroicor.order.r = 2;
physio.model.retroicor.order.cr = 0;
physio.model.rvt.include = false;
physio.model.rvt.delays = 0;
physio.model.hrv.include = false;
physio.model.hrv.delays = 0;
physio.model.noise_rois.include = false;
physio.model.noise_rois.thresholds = 0.9;
physio.model.noise_rois.n_voxel_crop = 0;
physio.model.noise_rois.n_components = 1;
physio.model.movement.include = false;
physio.model.movement.order = 6;
physio.model.movement.censoring_threshold = 0.5;
physio.model.movement.censoring_method = 'FD';
physio.model.other.include = false;
physio.verbose.level = 2;
physio.verbose.process_log = cell(0, 1);
physio.verbose.fig_handles = zeros(0, 1);
physio.verbose.fig_output_file = 'physio.fig';
physio.verbose.use_tabs = false;
physio.ons_secs.c_scaling = 1;
physio.ons_secs.r_scaling = 1;
physio = tapas_physio_main_create_regressors(physio);`
When I run main_create_regressors file with the resulting physio struct, it creates all figures until the last one I need, which would be 'RETROICOR GLM regressors'. I would imagine that this is the output I would need to do RETROICOR regression. The error message is:
"""""
Warning: Guessed additional cardiac pulse at time series start for phase estimation
Warning: Guessed additional cardiac pulse at time series end for phase estimation
Undefined function or variable 'R'.
Error in tapas_physio_orthogonalise_physiological_regressors (line 84)
subplot(1,3,1); imagesc(R); title({'Physiological regressor matrix for GLM'...
Error in tapas_physio_main_create_regressors (line 370)
[R, verbose] = tapas_physio_orthogonalise_physiological_regressors(...
Error in physio_toolbox (line 221)
physio = tapas_physio_main_create_regressors(physio);
"""""
It does complete the 'RETROICOR timecouse physiological regressors' figure however.
Below I have attached the physio time series that I use in this analysis. I have confirmed with the diagnostic figures that they look as expected. Please let me know if you have any advice for generating the GLM regressors, or alternatively if the timecourse regressors I do have are sufficient for fMRI noise regression.
Thank you,
Steven
R2c001_puls.txt
R2c001_resp.txt