Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

adding seed module to design #213

Closed
neurosurd opened this issue Jul 30, 2019 · 4 comments
Closed

adding seed module to design #213

neurosurd opened this issue Jul 30, 2019 · 4 comments

Comments

@neurosurd
Copy link

Describe the bug
Earlier i ran xcpengine successfully on docker using the 'as-is' fc-aroma design file. However, in order to add seed module, i downloaded and modified the design file . Now, it gives me several errors. Some errors seem to be related to the script not finding the design file
sed: cannot rename /design/sedrV0J8W: Device or resource busy
Its continuing to run with errors but i've pasted some of the terminal output in the attached text file
Cohort file

id0,img
sub-C002,sub-C002/func/sub-C002_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-C005,sub-C005/func/sub-C005_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-C006,sub-C006/func/sub-C006_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-C007,sub-C007/func/sub-C007_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-C008,sub-C008/func/sub-C008_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-C009,sub-C009/func/sub-C009_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-C010,sub-C010/func/sub-C010_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T001,sub-T001/func/sub-T001_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T004,sub-T004/func/sub-T004_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T005,sub-T005/func/sub-T005_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T006,sub-T006/func/sub-T006_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T007,sub-T007/func/sub-T007_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T009,sub-T009/func/sub-T009_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T010,sub-T010/func/sub-T010_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T011,sub-T011/func/sub-T011_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-T013,sub-T013/func/sub-T013_task-rest_acq-MB_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
...,...,...

Design File

#!/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/keiron/Desktop/vert_data/fc-aroma.dsn
sequence=anatomical
standard=MNI%2x2x2

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

pipeline=prestats,confound2,regress,fcon,reho,alff,roiquant,seed,norm,qcfc

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

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

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

confound2_rps[2]=0
confound2_rms[2]=0
confound2_wm[2]=1
confound2_csf[2]=1
confound2_gsr[2]=0
confound2_acompcor[2]=0
confound2_tcompcor[2]=0
confound2_aroma[2]=1
confound2_past[2]=0
confound2_dx[2]=0
confound2_sq[2]=1
confound2_censor[2]=0
confound2_censor_contig[2]=0
confound2_rerun[2]=0
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_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 SEED
###################################################################

seed_names[8]=l_FEF#r_FEF#r_PIVC#l_pHipp#r_pHipp#l_IPL#r_IPL#l_MFG#r_MFG#l_IFG#r_IFG#l_MT#r_MT
seed_points[8]=-38,-13,52#35,-12,54#42,-24,18#-25,-37,0#25,-37,0#-46,-32,22#60,-26,20#-42,24,32#40,30,42#-44,24,-2#52,29,33#-48,-76,4#45,-80,2
seed_sptf[8]=susan
seed_smo[8]=4
seed_rerun[8]=0
seed_cleanup[8]=0

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

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

Error message
see attached

Runtime Information
Docker

xcp_error_out.txt

@a3sha2
Copy link
Contributor

a3sha2 commented Jul 31, 2019

hi @neurosurd
Unfortunately, we removed seed module but can be done independently
https://xcpengine.readthedocs.io/utils/seedconnectivity.html?highlight=seed

let me know if it is clear

@neurosurd
Copy link
Author

oh ok, the docs arent probably updated yet. I tried to run the seedconnectivity utility via docker ( i didnt all the dependencies for local install) but it gives me the error below. Not sure why FSLOUTPUTTYPE needs to be set if im running it via docker. On my local machine environment this is set.

[keiron@myelin ~]$ docker run --rm -it --entrypoint /xcpEngine/utils/seedconnectivity pennbbl/xcpengine:latest -i /home/keiron/Desktop/vert_data/xcpOutput/sub-C002/regress/sub-C002_residualised.nii.gz -s /home/keiron/Desktop/vert_data/sca_analysis/r_pivc_sph.nii.gz -o /home/keiron/Desktop/vert_data/sca_analysis/sca_output -n r_pivc
· check if the input and output exist
ERROR:: Environment variable FSLOUTPUTTYPE is not set!
Please make sure that the appropriate configuration file is sourced by your shell (e.g. by putting it in .profile).
e.g. bash or sh users add the line ". ${FSLDIR}/etc/fslconf/fsl.sh"
e.g. tcsh or csh users add the line "source ${FSLDIR}/etc/fslconf/fsl.csh"
ERROR:: Environment variable FSLOUTPUTTYPE is not set!
Please make sure that the appropriate configuration file is sourced by your shell (e.g. by putting it in .profile).
e.g. bash or sh users add the line ". ${FSLDIR}/etc/fslconf/fsl.sh"
e.g. tcsh or csh users add the line "source ${FSLDIR}/etc/fslconf/fsl.csh"
/home/keiron/Desktop/vert_data/sca_analysis/r_pivc_sph.nii.gz
· Transforming coordinates to image
___________________________________________________________________
Usage: coor2niffti -i <input> -o <output> <options>
coor2nifti receives an octothorpe-delimited seed index
  as input and creates a network map image as an output.
Compulsory arguments:
 -i : Input cordinates 

 -o : Output network
      The path to the file where the output network will
      be written.
Optional arguments:
 -r : Override radius. If this argument is passed to the
      conversion script, then this radius will take the place
      of any voxel radii defined in the seed library.
 -t : Template image [default MNI 2mm]
      The path to an image file that defines the coordinate
      space used in the seed library.
 -x : Trace
      If this flag is set, then any commands called by the
      coor2map routine will be explicitly printed to the
      console or log.
 -m : mm coordinates
      If this flag is toggled, then input coordinates will be
      treated as mm coordinates rather than voxel coordinates, and
      the image qform and sform will be used to convert them to
      voxel coordinates for seed generation.
      
· ants registration
· smoothing
· Extracting mean timeseries
Error in dumpNifti(impath) : 
  Failed to read image from path /home/keiron/Desktop/vert_data/xcpOutput/sub-C002/regress/sub-C002_residualised.nii.gz
Calls: dumpNifti -> .Call
In addition: Warning message:
In dumpNifti(impath) :
  nifti_image_read: failed to find header file for '/home/keiron/Desktop/vert_data/xcpOutput/sub-C002/regress/sub-C002_residualised.nii.gz'
Execution halted
· compute correlation
· fisher tranformation
[keiron@myelin ~]$ docker run --rm -it --entrypoint /xcpEngine/utils/seedconnectivity pennbbl/xcpengine:latest -i /home/keiron/Desktop/vert_data/xcpOutput/sub-C002/regress/sub-C002_residualised.nii.gz -s /home/keiron/Desktop/vert_data/sca_analysis/r_pivc_sph.nii.gz -o /home/keiron/Desktop/vert_data/sca_analysis/sca_output -n r_pivc
· check if the input and output exist
ERROR:: Environment variable FSLOUTPUTTYPE is not set!
Please make sure that the appropriate configuration file is sourced by your shell (e.g. by putting it in .profile).
e.g. bash or sh users add the line ". ${FSLDIR}/etc/fslconf/fsl.sh"
e.g. tcsh or csh users add the line "source ${FSLDIR}/etc/fslconf/fsl.csh"
ERROR:: Environment variable FSLOUTPUTTYPE is not set!
Please make sure that the appropriate configuration file is sourced by your shell (e.g. by putting it in .profile).
e.g. bash or sh users add the line ". ${FSLDIR}/etc/fslconf/fsl.sh"
e.g. tcsh or csh users add the line "source ${FSLDIR}/etc/fslconf/fsl.csh"
/home/keiron/Desktop/vert_data/sca_analysis/r_pivc_sph.nii.gz
· Transforming coordinates to image
___________________________________________________________________
Usage: coor2niffti -i <input> -o <output> <options>
coor2nifti receives an octothorpe-delimited seed index
  as input and creates a network map image as an output.
Compulsory arguments:
 -i : Input cordinates 

 -o : Output network
      The path to the file where the output network will
      be written.
Optional arguments:
 -r : Override radius. If this argument is passed to the
      conversion script, then this radius will take the place
      of any voxel radii defined in the seed library.
 -t : Template image [default MNI 2mm]
      The path to an image file that defines the coordinate
      space used in the seed library.
 -x : Trace
      If this flag is set, then any commands called by the
      coor2map routine will be explicitly printed to the
      console or log.
 -m : mm coordinates
      If this flag is toggled, then input coordinates will be
      treated as mm coordinates rather than voxel coordinates, and
      the image qform and sform will be used to convert them to
      voxel coordinates for seed generation.
      
· ants registration
· smoothing
· Extracting mean timeseries
Error in dumpNifti(impath) : 
  Failed to read image from path /home/keiron/Desktop/vert_data/xcpOutput/sub-C002/regress/sub-C002_residualised.nii.gz
Calls: dumpNifti -> .Call
In addition: Warning message:
In dumpNifti(impath) :
  nifti_image_read: failed to find header file for '/home/keiron/Desktop/vert_data/xcpOutput/sub-C002/regress/sub-C002_residualised.nii.gz'
Execution halted
· compute correlation
· fisher tranformation

[keiron@myelin ~]$ echo $FSLOUTPUTTYPE 
NIFTI_GZ

@a3sha2
Copy link
Contributor

a3sha2 commented Aug 2, 2019

You have to do bind docker image to allow the xcpengine see the input image in your local directory
https://xcpengine.readthedocs.io/development.html#patching-a-local-copy-of-xcpengine-into-a-container

@a3sha2
Copy link
Contributor

a3sha2 commented Aug 24, 2019

@neurosurd you can still use seed module but the seed name should be exactly 3 letters not more than three or less than 3

@a3sha2 a3sha2 closed this as completed Dec 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants