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

Miccai for reho and alff #186

Open butellyn opened 5 years ago

butellyn commented 5 years ago

I am trying to get regional values, according to the Miccai atlas, for reho and alff. I ran my data through fMRIPrep and then XCPEngine. XCPEngine ran without any errors, but I didn't get out reho or alff according to the Miccai atlas.

Cohort file

id0,id1,img
sub-1001,ses-1,sub-1001/ses-1/func/sub-1001_ses-1_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz

Design File

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

analysis=struc-ACCELERATOR
design=/home/ebutler/data/jux/BBL/projects/nasa_antartica/xcpdocker/design/rehoalff.dsn
sequence=anatomical
standard=MNI%1x1x1 ##CORRECT?????

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

pipeline=prestats,reho,alff,roiquant

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

prestats_process[1]=FMP

###################################################################
# 2 REHO
###################################################################

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

###################################################################
# 3 ALFF
###################################################################

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

###################################################################
# 4 ROIQUANT
###################################################################

roiquant_atlas[4]=miccai
roiquant_globals[4]=1
roiquant_vol[4]=0
roiquant_rerun[4]=0
roiquant_cleanup[4]=1

Error message None

Runtime Information I used singularity

/share/apps/singularity/2.5.1/bin/singularity run --cleanenv -B /data:/home/ebutler/data /data/joy/BBL/applications/bids_apps/xcpEngine.simg -c /home/ebutler/data/jux/BBL/projects/nasa_antartica/xcpdocker/cohort/sub-1001_ses-1_cohort.csv -d /home/ebutler/data/jux/BBL/projects/nasa_antartica/xcpdocker/design/rehoalff.dsn -o /home/ebutler/data/jux/BBL/studies/nasa_antartica/processedData/rest_containerized/xcpEngine -r /home/ebutler/data/joy/BBL/studies/nasa_antartica/processedData/fMRIPrep/fmriprep/
a3sha2 commented 5 years ago

HI @butellyn Miccai atlas is subject specific, it can only be used directly with structural processing if jlf is ran. Other option is to use standalone tool: https://xcpengine.readthedocs.io/utils/roiquants.html?highlight=quantifyatlas

butellyn commented 5 years ago

Would it be possible to use the labels without jlf? For instance, could I feed an MNI brain with the labels and then use the transform between each of my brains and MNI to get the segmentation?

a3sha2 commented 5 years ago

Yes, you can use labels without jlf. To use quantifyAtlas, the label (atlas) and the reho/alff must be in the same space(MNI or other) and the same resolution.

butellyn commented 5 years ago

I am working on using quantifyAtlas, but I seem to be placing the --entrypoint flag incorrectly. Here is my call:

`SNGL=/share/apps/singularity/2.5.1/bin/singularity SIMG=/data/joy/BBL/applications/bids_apps/xcpEngine.simg OUTPUT=/data/jux/BBL/studies/nasa_antartica/processedData/rest_containerized/xcpEngine

${SNGL} run --cleanenv -B /data:/home/ebutler/data --entrypoint /xcpEngine/utils/quantifyAtlas /data/joy/BBL/applications/bidsapps/xcpEngine.simg -v /home/ebutler${OUTPUT}/${id0}/${id1}/reho/${id0}${id1}_reho.nii.gz -s mean -a /home/ebutler/data/jux/BBL/projects/nasa_antartica/xcpdocker/MNIMiccai/mniJLFLabels.nii.gz -p ${id0},${id1} -r /home/ebutler/data/jux/BBL/projects/nasaantartica/miccaiNodeNames.txt -o /home/ebutler${OUTPUT}/${id0}/${id1}/roiquant/miccai/${id0}${id1}_miccai_reho.csv`

The docs give an example call to docker, not to singularity, so I'm not sure what has to change. Can you see what's wrong?

a3sha2 commented 5 years ago

@butellyn you have to use exec instead of run

$SINGL exec -B /data:/home/home/ebutler/data \ /data/joy/BBL/applications/bids_apps/xcpEngine.simg \ /xcpEngine/utils/quantifyAtlas \ -v /home/ebutler${OUTPUT}/${id0}/${id1}/reho/${id0}_${id1}reho.nii.gz \ -s mean -p ${id0},${id1} \ -a /home/ebutler/data/jux/BBL/projects/nasa_antartica/xcpdocker/MNIMiccai/mniJLFLabels.nii.gz \ -r /home/ebutler/data/jux/BBL/projects/nasa_antartica/miccaiNodeNames.txt \ -o /home/ebutler${OUTPUT}/${id0}/${id1}/roiquant/miccai/${id0}${id1}_miccai_reho.csv