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

cannot access /regress/*svg error #428

Open rob-mccutcheon opened 3 years ago

rob-mccutcheon commented 3 years ago

Describe the bug I am trying to get denoised cifti images. I am using the fc-36p_spkreg.dsn as the fc-36p_despike.dsn desnt seem to work due to the issue mentioned in https://github.com/PennBBL/xcpEngine/issues/411

This is my command to run

#!/bin/tcsh

#$ -m n
#$ -N xcp
#$ -o /data/project/petProject/PHNO_AMPH_Rob/code/logs/xcp_o$TASK_ID
#$ -e /data/project/petProject/PHNO_AMPH_Rob/code/logs/xcp_e$TASK_ID
#$ -l h_vmem=25G 

module unload anaconda
module load singularity 
which R
# Adjust these so they work on your system
# set SIMG='/home/k1201869/singularity_images/xcpEngine_latest.simg'
set TEMP_COHORT='resting_state/preprocessing/temp/tempcohort_$SGE_TASK_ID.csv'

singularity run --cleanenv -B /data/project/petProject/PHNO_AMPH_Rob:${HOME}/data_bind\
  ${HOME}/singularity_images/xcpEngine_latest.simg\
  -c ${HOME}/data_bind/code/${TEMP_COHORT} \
  -d ${HOME}/data_bind/code/resting_state/preprocessing/fc-36p_spkreg.dsn \
  -r ${HOME}/data_bind/results/func/processed20/ \
  -o ${HOME}/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/ \
  -t 2

During the spatial filtering step I get the following error:

Current processing step:
@6 Spatially filtering image
····································································
· @6.1 
· @6.2 [Configuring SUSAN]
· @6.4 
· @6.6 
· @6.10a [Filter: susan]
· @6.10b [Smoothing kernel: 6 mm]
· @6.11 
                             -   -   -
>> ${XCPEDIR}/utils/sfilter -i /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_residualised.nii.gz -o /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_img_sm6.nii.gz -s susan -k 6 -m /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/prestats/sub-531_ses-A_mask.nii.gz -u /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/prestats/sub-531_ses-A_referenceVolumeBrain.nii.gz
· @u.3 
                             -   -   -
>> 6/2.35482004503
                             -   -   -
>> fslstats /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/prestats/sub-531_ses-A_referenceVolumeBrain.nii.gz -k /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/prestats/sub-531_ses-A_mask.nii.gz -p 50
                             -   -   -
>> 5645.962402 *3/4
                             -   -   -
>> susan /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_residualised.nii.gz 4234.47180150000000000000 2.54796540086508437971 3 1 1 /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/prestats/sub-531_ses-A_referenceVolumeBrain.nii.gz 4234.47180150000000000000 /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_img_sm6.nii.gz
                             -   -   -
>> fslmaths /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_img_sm6.nii.gz -mul /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/prestats/sub-531_ses-A_mask.nii.gz /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_img_sm6.nii.gz
                             -   -   -
>> rm -f /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_img_sm6.nii.gz_usan_size.nii.gz
                             -   -   -
>> echo /data/project/petProject/PHNO_AMPH_Rob/results/func/processed20/fmriprep/sub-531/ses-A/func/sub-531_ses-A_task-rest_run-1_space-fsLR_den-91k_bold.dtseries.nii
                             -   -   -
>> mkdir -p /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/figures/
                             -   -   -
>> rln /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/sub-531_ses-A_residualised.nii.gz /home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/sub-531_ses-A.nii.gz
                             -   -   -
>> 11-10-1
                             -   -   -
>> 11-1
ls: cannot access '/home/k1201869/data_bind/results/func/resting_state/denoised/t1w_36pdespike2/sub-531/ses-A/regress/*svg': No such file or directory
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

Cohort file Paste cohort file between the triple backticks

id0,id1,img
sub-503,ses-A,/data/project/petProject/PHNO_AMPH_Rob/results/func/processed20/fmriprep/sub-503/ses-A/func/sub-503_ses-A_task-rest_run-1_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz

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

#!/usr/bin/env bash

###################################################################
#  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  ⊗  #
###################################################################

###################################################################
# 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
#                  localised design files.
###################################################################

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

analysis=fc_$(whoami)
design=/home/k1201869/data_bind/code/resting_state/preprocessing/fc-36p_spkreg.dsn
sequence=anatomical
standard=MNI%2x2x2

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

pipeline=prestats,confound2,regress
#,fcon,reho,alff,roiquant,qcfc

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

prestats_rerun[1]=1
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]=0
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]=0
confound2_framewise[2]=fds:0.08,dv:2
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

###################################################################
# 4 FCON
###################################################################

fcon_atlas[4]=power264
fcon_metric[4]=corrcoef
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
a3sha2 commented 3 years ago

you broke the processing step with # in ``pipeline=prestats,confound2,regress

,fcon,reho,alff,roiquant,qcfc`` that make the pipeline to stop after regression.

rob-mccutcheon commented 3 years ago

Thanks @a3sha2 , I only want the regressed cifti files which is why I commented out the rest of the modules, is that the wrong way to do it?