PennLINC / xcpEngine

Official public repository for the XCP Engine. This tool is deprecated in favor of XCP-D and ASLPrep.
MIT License
66 stars 42 forks source link

3dTproject error #290

Open leland91 opened 4 years ago

leland91 commented 4 years ago

Describe the bug In the confound regression module, a fatal error is generated at the 3dTproject step.

Cohort file Paste cohort file between the triple backticks

id0,id1,id2,id3,img
,,,,
sub-MDP035,Rest,run-01,AP,/data/scratch/lelandf/xcp_MD/fmriprep/sub-MDP035/func/sub-MDP035_task-Rest_dir-AP_run-01_space-T1w_desc-preproc_bold.nii.gz

Design File Paste your entire design (.dsn) file between the triple backticks

#!/usr/bin/env bash

###################################################################
#  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  \u2297  #
###################################################################

###################################################################
# This design file stores the values of all variables required to
# execute a complete neuroimage processing pipeline. You may
# execute the analysis specified in this design file by calling
# (in any v4 or higher bash terminal):
#
# xcpEngine -d <design> -c <cohort> -o <output> <options>
#
# Variables fall into five general categories:
# * ANALYSIS VARIABLES are used at all stages of this analysis.
# * PIPELINE specifies the modules that comprise the analysis.
# * MODULE VARIABLES are used during one stage of the analysis.
#                  These are typically array variables with array
#                  indices equal to the index of the module that
#                  calls them.
# * OUTPUT VARIABLES may be used at all stages of the analysis.
#                  These are typically array variables with array
#                  indices equal to the value of the primary
#                  subject identifier. They will appear only in
#                  loc alised design files.
###################################################################

###################################################################
# ANALYSIS VARIABLES
###################################################################

analysis=fc_$(whoami)
design=/data/project/vislab/a/MDP/xcp/fc-36p_scrub_MDP_rerun_5mm_cleanup.dsn
sequence=anatomical
standard=MNI%2x2x2

###################################################################
# PIPELINE
###################################################################

pipeline=prestats,confound2,regress 

###################################################################
# 1 PRESTATS
###################################################################

prestats_rerun[1]=1 # testing
prestats_cleanup[1]=1  
prestats_process[1]=FMP

###################################################################
# 2 CONFOUND2
###################################################################

confound2_rps[2]=1
confound2_rms[2]=0
confound2_wm[2]=1
confound2_csf[2]=1
confound2_gsr[2]=1
confound2_acompcor[2]=1
confound2_tcompcor[2]=0
confound2_aroma[2]=0
confound2_past[2]=0
confound2_dx[2]=1
confound2_sq[2]=2
confound2_custom[2]=
confound2_censor[2]=1
confound2_censor_contig[2]=35 
confound2_framewise[2]=fds:0.625,dv:1.5 
confound2_rerun[2]=1
confound2_cleanup[2]=1 

###################################################################
# 3  REGRESS
###################################################################

regress_tmpf[3]=butterworth
regress_hipass[3]=0.01
regress_lopass[3]=0.08
regress_tmpf_order[3]=1
regress_tmpf_pass[3]=2
regress_tmpf_ripple[3]=0.5
regress_tmpf_ripple2[3]=20
regress_dmdt[3]=2
regress_1ddt[3]=1
regress_smo[3]=6
regress_sptf[3]=susan
regress_usan[3]=default
regress_usan_space[3]=
regress_rerun[3]=0
regress_cleanup[3]=1 
regress_process[3]=DMT-TMP-REG #changed from REG-TMP
###################################################################
# 4 FCON
###################################################################

fcon_atlas[4]=power264
fcon_metric[4]=corrcoef
fcon_thr[4]=N
fcon_window[4]=10
fcon_pad[4]=FALSE
fcon_rerun[4]=0
fcon_cleanup[4]=1

###################################################################
# 5 REHO
###################################################################

reho_nhood[5]=vertices
reho_roikw[5]=0 # does nothing at the moment
reho_sptf[5]=susan
reho_smo[5]=6
reho_rerun[5]=0
reho_cleanup[5]=1

###################################################################
# 6 ALFF
###################################################################

alff_hipass[6]=0.01
alff_lopass[6]=0.08
alff_sptf[6]=susan
alff_smo[6]=6
alff_rerun[6]=0
alff_cleanup[6]=1

###################################################################
# 7 ROIQUANT
###################################################################

roiquant_atlas[7]=power264
roiquant_globals[7]=1
roiquant_vol[7]=0
roiquant_rerun[7]=0
roiquant_cleanup[7]=1

###################################################################
# 8 NORM
###################################################################
norm_primary[8]=1
norm_rerun[8]=0
norm_cleanup[8]=1

##################################################################
# 9 QCFC
###################################################################
qcfc_atlas[9]=power264
qcfc_sig[9]=fdr
qcfc_rerun[9]=0
qcfc_cleanup[9]=1

Error message Paste your error message between the backticks

>> 3dTproject -input /data/scratch/lelandf/xcp_MD/intermediate/sub-MDP035_Rest_run-01_AP-regress-811626240~TEMP~_DMT_TMP.nii.gz -ort /data/project/vislab/a/MDP/xcp/xcpout/sub-MDP035_xcpout/sub-MDP035/R$
++ 3dTproject: AFNI version=AFNI_19.1.18 (Jun  6 2019) [64-bit]
++ Authored by: Cox the Algebraic (Linear)
** AFNI converts NIFTI_datatype=64 (FLOAT64) in file /data/scratch/lelandf/xcp_MD/intermediate/sub-MDP035_Rest_run-01_AP-regress-811626240~TEMP~_DMT_TMP.nii.gz to FLOAT32
     Warnings of this type will be muted for this session.
     Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
++ Setting up regressors
++ 1 Blocks * 3 polynomials -- 3 polort regressors
 + -- 461 other fixed ort regressors
^[[7m** ERROR:^[[0m total number of fixed regressors (464) is too many for 420 retained time points!
^[[7m** FATAL ERROR:^[[0m Cannot continue after above errors :-( :-( :-( !!
** Program compile date = Jun  6 2019

Runtime Information The software was being run using Singularity.

Additional context Add any other context about the problem here.

a3sha2 commented 4 years ago

the main issue is that the number of regressors is more than number of data points.

total number of fixed regressors (464) is too many for 420 retained time points!

This arise from the threshold you used that flag so many volumes, the threshold may be too high. Remember that the threshold (confound2_framewise[2]=fds:0.625,dv:1.5) is a function of TR as explained here https://xcpengine.readthedocs.io/modules/regress.html#temporal-censoring

leland91 commented 4 years ago

I see. I will try using a less stringent threshold then. Thank you!

leland91 commented 4 years ago

Is there a way to see where the 464 regressors came from (i.e. compcor, csf, wm, etc.)? I can't find a file that has any dimensions equal to 464, or greater than my total number of timepoints (420). Where is 3dTproject getting 464 from in this case?

a3sha2 commented 4 years ago

check regress/sub-MDP035/sub-MDP035_confmat.1D