Closed ClaireSmid closed 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!
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!
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?