MICA-MNI / micapipe

micapipe from the Multimodal imaging and connectome analysis lab (http://mica-mni.github.io) at the Montreal Neurological Institute. Read The Docs documentation below
http://micapipe.readthedocs.io
GNU General Public License v3.0
80 stars 27 forks source link

Post_structural runs with errors - cannot find FreeSurfer license? #26

Closed ClaireSmid closed 2 years ago

ClaireSmid commented 2 years ago

UPDATE: I have tried making the Freesurfer license accessible to the container by adding '''-B /path/to/your/local/freesurfer-license:/opt/freesurfer-6.0.0/license.txt''' when running -post_structural, but this didn't help. I also tried mounting a file using docker run -v, but this also did not work.

BTW, I pulled the container into a singularity wrapper, and I run commands like this: $SINGULARITY_PULLFOLDER/micapipe_latest.sif (and then enter commands)

Original post: I am trying to run the post_structural part of the pipeline. I have previously quality-controlled FreeSurfer files that I would like to include in this step.

I have run -proc_structural without errors prior to this, and I think my FreeSurfer files are in the right location.

My dataset looks like this:

dataset/ ---/rawdata ------/sub-001 ---------/ses-0 ---------/ses-1 ------/sub-002 ---------/ses-0 .... ---/derivatives ------/freesurfer ---------/license.txt ---------/sub-001_ses-0 ------------/mri ------------/surf .... ------/micapipe ---------/sub-001 ------------/ses-0 ....

When I run -post_structural, I get the output below. Would anyone know what is causing this?

[ucjucrs@login12 dataset]$ $SINGULARITY_PULLFOLDER/micapipe_latest.sif -sub 001 -ses 0 -out derivatives -bids rawdata -post_structural -atlas aparc
WARNING: Bind mount '/home/ucjucrs => /home/ucjucrs' overlaps container CWD /home/ucjucrs/Scratch/dataset, may not be available
Some packages in this Docker container are non-free
If you are considering commercial use of this container, please consult the relevant license:
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence
-------- freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /opt/freesurfer-6.0.0
FSFAST_HOME       /opt/freesurfer-6.0.0/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /opt/freesurfer-6.0.0/subjects
MNI_DIR           /opt/freesurfer-6.0.0/mni
FSL_DIR           /opt/fsl-6.0.0

-------------------------------------------------------------
        MICA pipeline - (Version v0.1.1 'Roadrunner')
                Subject: 001 Session: ses-0
-------------------------------------------------------------

[ WARNING ]..... fix was not found, ICA-FIX will be skipped

[ INFO ]..... micapipe will use 6 threads for multicore processing

[ INFO ]..... Subject 001 directory exist

[ INFO ]..... Selected parcellations: aparc, N=1

-------------------------------------------------------------
        POST-structural processing
                micapipe v0.1.1 'Roadrunner', LOCAL
-------------------------------------------------------------

[ INFO ]..... MICA pipe - Software versions
                MRtrix3.....    3.0.1
                                /opt/miniconda-latest/envs/micapipe/bin/mrinfo
                FSL.........    6.0
                                /opt/fsl-6.0.0
                ANFI........     Sep 27 2021 (Version AFNI_21.2.09 'Nerva')
                                /opt/afni-latest/3dresample
                ANTS........     2.3.3.dev168-g29bdf
                                /opt/ants-2.3.4
                WorkBench...    1.3.2
                                /usr/bin/wb_command
                FreeSurfer..    freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c
                                /opt/freesurfer-6.0.0
                fix.........
                                /opt/fix
                python......    Python 3.7.10
                                /opt/miniconda-latest/envs/micapipe/bin/python
                R...........    3.6.3
                                /usr/bin/R

[ INFO ]..... Structural processing output variables:
                T1 nativepro    =       /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/sub-001_ses-0_space-nativepro_t1w.nii.gz
                T1 5tt          =       /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/sub-001_ses-0_space-nativepro_t1w_5TT.nii.gz
                T1 fast_all     =       /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/first/sub-001_ses-0_space-nativepro_t1w_all_fast_firstseg.nii.gz
                T1 resolution   =       1.0

[ INFO ]..... Saving temporal dir: FALSE

[ INFO ]..... ANTs will use 6 threads

[ INFO ]..... wb_command will use 6 threads

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   mkdir -p /tmp/16979_micapipe_post-struct_sub-001_ses-0

[ INFO ]..... Subject 001 has a T1 on FreeSurfer space

[ INFO ]..... Cerebellum parcellation to T1-nativepro Volume

[ INFO ]..... Subject 001 has a Cerebellum parcellation on T1-nativepro

[ INFO ]..... Subcortical parcellation to T1-nativepro Volume

[ INFO ]..... Subject 001 has a Subcortical parcellation on T1-nativepro

[ INFO ]..... fsaverage5 annnot parcellations to T1-nativepro Volume

[ INFO ]..... Running surface lh aparc_mics.annot to sub-001

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   mri_surf2surf --hemi lh --srcsubject fsaverage5 --trgsubject sub-001_ses-0 --sval-annot lh.aparc_mics.annot --tval /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/label/lh.aparc_mics.annot
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------
Setting mapmethod to nnf

$Id: mri_surf2surf.c,v 1.103 2015/11/05 22:07:33 greve Exp $

setenv SUBJECTS_DIR /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer
cd /opt/micapipe/parcellations
mri_surf2surf --hemi lh --srcsubject fsaverage5 --trgsubject sub-001_ses-0 --sval-annot lh.aparc_mics.annot --tval /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/label/lh.aparc_mics.annot

sysname  Linux
hostname login12.myriad.ucl.ac.uk
machine  x86_64
user     ucjucrs
srcsubject = fsaverage5
srcval     = (null)
srctype    =
trgsubject = sub-001_ses-0
trgval     = /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/label/lh.aparc_mics.annot
trgtype    =
srcsurfreg = sphere.reg
trgsurfreg = sphere.reg
srchemi    = lh
trghemi    = lh
frame      = 0
fwhm-in    = 0
fwhm-out   = 0
label-src  = (null)
label-trg  = (null)
OKToRevFaceOrder  = 1
UseDualHemi = 0
Reading source surface reg /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/fsaverage5/surf/lh.sphere.reg

[ INFO ]..... Running surface rh aparc_mics.annot to sub-001

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   mri_surf2surf --hemi rh --srcsubject fsaverage5 --trgsubject sub-001_ses-0 --sval-annot rh.aparc_mics.annot --tval /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/label/rh.aparc_mics.annot
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------
Setting mapmethod to nnf

$Id: mri_surf2surf.c,v 1.103 2015/11/05 22:07:33 greve Exp $

setenv SUBJECTS_DIR /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer
cd /opt/micapipe/parcellations
mri_surf2surf --hemi rh --srcsubject fsaverage5 --trgsubject sub-001_ses-0 --sval-annot rh.aparc_mics.annot --tval /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/label/rh.aparc_mics.annot

sysname  Linux
hostname login12.myriad.ucl.ac.uk
machine  x86_64
user     ucjucrs
srcsubject = fsaverage5
srcval     = (null)
srctype    =
trgsubject = sub-001_ses-0
trgval     = /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/label/rh.aparc_mics.annot
trgtype    =
srcsurfreg = sphere.reg
trgsurfreg = sphere.reg
srchemi    = rh
trghemi    = rh
frame      = 0
fwhm-in    = 0
fwhm-out   = 0
label-src  = (null)
label-trg  = (null)
OKToRevFaceOrder  = 1
UseDualHemi = 0
Reading source surface reg /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/fsaverage5/surf/rh.sphere.reg

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   mri_aparc2aseg --s sub-001_ses-0 --o /tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc.mgz --annot aparc_mics --new-ribbon
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------
SUBJECTS_DIR /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer
subject sub-001_ses-0
outvol /tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc.mgz
useribbon 0
baseoffset 0
RipUnknown 0

Reading lh white surface
 /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.white

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   mri_label2vol --seg /tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc.mgz --temp /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/mri/T1.mgz --o /tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc_in_T1.mgz --regheader /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/mri/aseg.mgz
Number of labels: 0
Annot File:      (null)
Template Volume: /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/mri/T1.mgz
Outut Volume: /tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc_in_T1.mgz
Registration File: (null)
Fill Threshold: 0
Label Vox Vol:  1
ProjType:       (null)
ProjTypeId:     0
ProjStart:      0
ProjStop:       0
ProjDelta:      0.1
Subject:  (null)
Hemi:     (null)
UseNewASeg2Vol:  0
DoLabelStatVol  0
LabelCodeOffset  0
setenv SUBJECTS_DIR /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer
$Id: mri_label2vol.c,v 1.46 2014/12/08 21:11:54 greve Exp $
Template RAS-to-Vox: --------
-1.00000  -0.00000  -0.00000   128.00000;
-0.00000  -0.00000  -1.00000   128.00000;
-0.00000   1.00000  -0.00000   128.00000;
-0.00000  -0.00000  -0.00000   1.00000;
Template Voxel Volume: 1
nHits Thresh: 0
Computing registration based on header
RegMat: --------
 1.00000   0.00000   0.00000   0.00000;
 0.00000   1.00000   0.00000   0.00000;
 0.00000   0.00000   1.00000   0.00000;
 0.00000   0.00000   0.00000   1.00000;
Label RAS-to-Vox: --------
-1.00000   0.00000   0.00000   128.00000;
 0.00000   0.00000  -1.00000   128.00000;
 0.00000   1.00000   0.00000   128.00000;
 0.00000   0.00000   0.00000   1.00000;
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   mrconvert /tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc_in_T1.mgz /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz -force
mrconvert: [WARNING] existing output files will be overwritten
mrconvert: [ERROR] cannot access file "/tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc_in_T1.mgz": No such file or directory
mrconvert: [ERROR] error opening image "/tmp/16979_micapipe_post-struct_sub-001_ses-0/aparc_in_T1.mgz"

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   fslreorient2std /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz
ERROR: Could not find image /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   fslmaths /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz -thr 1000 /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz
Image Exception : #63 :: No image files match: /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc
terminate called after throwing an instance of 'armawrap::AWException'
  what():  No image files match: /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc
/opt/micapipe/functions/utilities.sh: line 584: 79209 Aborted                 $l_command

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:00 GMT 2021:
COMMAND -->   antsApplyTransforms -d 3 -i /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz -r /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/sub-001_ses-0_space-nativepro_t1w.nii.gz -n GenericLabel -t /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/xfm/sub-001_ses-0_from-fsnative_to_nativepro_t1w_0GenericAffine.mat -o /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/volumetric/sub-001_ses-0_space-nativepro_t1w_atlas-aparc.nii.gz -v -u int
Using double precision for computations.
Input scalar image: /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz
 file /tmp/16979_micapipe_post-struct_sub-001_ses-0/sub-001_ses-0_space-fsnative_t1w_aparc.nii.gz does not exist .
Reference image: /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/sub-001_ses-0_space-nativepro_t1w.nii.gz
=============================================================================
The composite transform comprises the following transforms (in order):
  1. /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/xfm/sub-001_ses-0_from-fsnative_to_nativepro_t1w_0GenericAffine.mat (type = AffineTransform)
=============================================================================
Default pixel value: 0
Interpolation type: LabelImageGenericInterpolateImageFunction
terminate called after throwing an instance of 'itk::ExceptionObject'
  what():  /src/ants/build/ITKv5/Modules/Core/Common/src/itkProcessObject.cxx:1340:
itk::ERROR: ResampleImageFilter(0x3242580): Input Primary is required but not set.
/opt/micapipe/functions/utilities.sh: line 584: 79218 Aborted                 $l_command

[ INFO ]..... Native surfaces to conte69-64k vertices (lh hemisphere)

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   wb_shortcuts -freesurfer-resample-prep /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.white /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.pial /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.sphere.reg /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.L.sphere.32k_fs_LR.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.midthickness.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-lh_midthickness.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_lh_sphereReg.surf.gii
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   mris_convert /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.pial /tmp/16979_micapipe_post-struct_sub-001_ses-0/lh.pial.surf.gii
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/lh.pial.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_lh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.L.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-lh_pial.surf.gii

While running:
wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/lh.pial.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_lh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.L.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-lh_pial.surf.gii

ERROR: NAME OF FILE: lh.pial.surf.gii
PATH TO FILE: /tmp/16979_micapipe_post-struct_sub-001_ses-0

File does not exist.

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   mris_convert /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/lh.white /tmp/16979_micapipe_post-struct_sub-001_ses-0/lh.white.surf.gii
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/lh.white.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_lh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.L.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-lh_white.surf.gii

While running:
wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/lh.white.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_lh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.L.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-lh_white.surf.gii

ERROR: NAME OF FILE: lh.white.surf.gii
PATH TO FILE: /tmp/16979_micapipe_post-struct_sub-001_ses-0

File does not exist.

[ INFO ]..... Native surfaces to conte69-64k vertices (rh hemisphere)

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   wb_shortcuts -freesurfer-resample-prep /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/rh.white /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/rh.pial /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/rh.sphere.reg /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.R.sphere.32k_fs_LR.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/rh.midthickness.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-rh_midthickness.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_rh_sphereReg.surf.gii
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   mris_convert /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/rh.pial /tmp/16979_micapipe_post-struct_sub-001_ses-0/rh.pial.surf.gii
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/rh.pial.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_rh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.R.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-rh_pial.surf.gii

While running:
wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/rh.pial.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_rh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.R.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-rh_pial.surf.gii

ERROR: NAME OF FILE: rh.pial.surf.gii
PATH TO FILE: /tmp/16979_micapipe_post-struct_sub-001_ses-0

File does not exist.

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   mris_convert /scratch/scratch/ucjucrs/dataset/derivatives/freesurfer/sub-001_ses-0/surf/rh.white /tmp/16979_micapipe_post-struct_sub-001_ses-0/rh.white.surf.gii
--------------------------------------------------------------------------
ERROR: FreeSurfer license file /opt/freesurfer-6.0.0/license.txt not found.
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu/registration.html to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.
--------------------------------------------------------------------------

ucjucrs @ login12.myriad.ucl.ac.uk Tue Nov 16 22:07:01 GMT 2021:
COMMAND -->   wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/rh.white.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_rh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.R.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-rh_white.surf.gii

While running:
wb_command -surface-resample /tmp/16979_micapipe_post-struct_sub-001_ses-0/rh.white.surf.gii /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_rh_sphereReg.surf.gii /opt/micapipe/surfaces/fs_LR-deformed_to-fsaverage.R.sphere.32k_fs_LR.surf.gii BARYCENTRIC /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/anat/surfaces/conte69/sub-001_ses-0_space-conte69-32k_desc-rh_white.surf.gii

ERROR: NAME OF FILE: rh.white.surf.gii
PATH TO FILE: /tmp/16979_micapipe_post-struct_sub-001_ses-0

File does not exist.

-------------------------------------------------------------
        Post-structural processing ended in  0.033 minutes :
        Steps completed : 03/08
        Status          : INCOMPLETE
        Check logs      : /scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/logs/post_structural_11-11-2021.txt
/scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/logs/post_structural_12-11-2021.txt
/scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/logs/post_structural_15-11-2021.txt
/scratch/scratch/ucjucrs/dataset/derivatives/micapipe/sub-001/ses-0/logs/post_structural_16-11-2021.txt
-------------------------------------------------------------
Erasing temporal directory: /tmp/16979_micapipe_post-struct_sub-001_ses-0
OLD_PATH is unset or empty
Erasing temporal directory: /tmp/*_micapipe*_001
OLD_PATH is unset or empty

-------------------------------------------------------------
        GLOBAL micapipe running time with LOCAL processing: 0.067 minutes
-------------------------------------------------------------
rcruces commented 2 years ago

Hi, Claire

If you already QCed your freesurfer you have two options: use the flag -freesurfer_dir, which will make a copy of your already processed QC data into the derivatives directory with the following name derivatives/freesurfer/sub-001_ses_0, or you can do that manually.

Regarding the license issue, try to add the following to your code:

/opt/singularity/bin/singularity run --cleanenv -B rawdata/:/bids_directory \
-B rawdata/derivatives/:/output_directory \
-B <path_to_your_license>/license.txt:/opt/freesurfer-6.0.0/license.txt \
-B <path_to_the_tmp_dir>:/tmp/ \
<path_to_singularity_image>/micapipe.simg \
-sub 001 -bids /bids_directory -out /output_directory -post_structural -atlas aparc -ses 0

please let me know how it went!

ClaireSmid commented 2 years ago

I got it to work with this line of code: singularity run --cleanenv -B /scratch/scratch/$USER/dataset/derivatives/freesurfer/license.txt:/opt/freesurfer-6.0.0/license.txt $SINGULARITY_PULLFOLDER/micapipe_latest.sif -sub 001 -bids rawdata -out derivatives -post_structural -ses 0 which made the FreeSurfer license available to the pipeline, and post_structural completed without errors - much appreciated, thanks again!