AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
October 17, 2021 06:27AM
Dear all,

I ran upon a strange problem. Let me provide you with an overview first:
- A resting-state analysis (preprocessing) was done for a resting-state run (1 run per subject; 25 subjects overall). This session also included running SSwarper.

- Now I would like to apply the same script for a task-based session (6 runs per subject instead of 1 run as above). Note: why do I apply a "resting-state" script on a task-based run? The reason simply is that I am interested in the brain’s dynamics, such as Power Law Exponent (PLE), and I would like to compare the real resting-state run with the task-runs (processed as if they were resting-state runs). This then allows me to properly compare variables like the PLE between both sessions.

To save time and as you know, it is no longer required to run SSwarper again for the second sessions’ preprocessing, as SSwarper was already done before. This is my script for the task-based runs (processed as "resting-state", i.e., without the GLM).

## TaskDynamics Preprocessing
for subject in Subject1 Subject2 Subject3 Subject4 Subject5 Subject6 Subject7 Subject8 Subject9 Subject10 Subject11 Subject12 Subject13 Subject14 Subject15 Subject16 Subject17 Subject18 Subject19 Subject20 Subject21 Subject22 Subject23 Subject24 Subject25
do

# Set directories
directory_subjects=/volumes/sandisk/fmri/dataset/subjects/$subject
directory_subjects_general=/volumes/sandisk/fmri/dataset/subjects
directory_fMRIruns=$directory_subjects/raw
directory_anatomical=$directory_subjects/raw
directory_SSwarper=$directory_subjects/SSwarper

cd $directory_subjects

# AFNI_proc.py
afni_proc.py \
-subj_id ${subject}_TaskDynamics \
-out_dir $directory_subjects/Preprocessing_TaskDynamics \
-dsets \
$directory_fMRIruns/run*to3d+orig.HEAD \
-blocks despike tshift align tlrc volreg mask blur regress \
-copy_anat $directory_SSwarper/anatSS.$subject.nii \
-anat_has_skull no \
-tcat_remove_first_trs 4 \
-align_opts_aea -cost nmi \
-volreg_align_e2a \
-volreg_align_to MIN_OUTLIER \
-volreg_tlrc_warp -tlrc_base MNI152_2009_template_SSW.nii.gz \
-tlrc_NL_warp \
-tlrc_NL_warped_dsets \
$directory_subjects/SSwarper/anatQQ.$subject.nii \
$directory_subjects/SSwarper/anatQQ.$subject.aff12.1D \
$directory_subjects/SSwarper/anatQQ.${subject}_WARP.nii \
-volreg_post_vr_allin yes \
-volreg_pvra_base_index MIN_OUTLIER \
-mask_segment_anat yes \
-mask_segment_erode yes \
-regress_anaticor \
-regress_ROI WMe \
-regress_apply_mot_types demean deriv \
-regress_motion_per_run \
-regress_censor_motion 0.2 \
-regress_censor_outliers 0.05 \
-regress_bandpass 0.02 0.2 \
-blur_size 6.0 \
-regress_est_blur_epits \
-regress_est_blur_errts \
-html_review_style pythonic \
-execute

done


What is the problem? The problem is that even after 8-12 hours of running AFNI_proc it still computes the first subject (I already tried it twice). All applications beside the terminal are closed (2013 MacBook, 2.4 GHz dual core i5, 4 GB Ram). I know that this laptop is very slow compared to today’s standards. But +-10 hours per subject and it is still preprocessing? Running AFNI_proc for 1 subject took around an hour for the resting-state run.

Is there a mistake in my preprocessing script? I would be very happy if you could share your ideas.

Philipp
Subject Author Posted

AFNI_proc Preprocessing does not finish

Philipp October 17, 2021 06:27AM

Re: AFNI_proc Preprocessing does not finish

rick reynolds October 18, 2021 10:28AM

Re: AFNI_proc Preprocessing does not finish

Philipp October 18, 2021 11:30AM

Re: AFNI_proc Preprocessing does not finish

rick reynolds October 18, 2021 01:13PM

Re: AFNI_proc Preprocessing does not finish Attachments

Philipp October 20, 2021 02:44AM

Re: AFNI_proc Preprocessing does not finish

Philipp October 20, 2021 03:59AM