Connectome Mapper 3

I’ve been trying to use Connectome Mapper 3 but am having troubles with executing the command.
I generated the configuration files as described here.
My BIDS data set is validated.
I’m trying to execute the command via docker:

docker run -t --rm \
-v /media/groot/Data/BeforeAfterCovid19_BIDS_dataset:/bids_dir \
-v /media/groot/Data/BeforeAfterCovid19_derivatives/cmp_derivatives:/output_dir \
sebastientourbier/connectomemapper-bidsapp:v3.0.0-RC1 /bids_dir /output_dir participant --participant_label 0010 --fs_license /bids_dir/code/license.txt --anat_pipeline_config /bids_dir/code/ref_anatomical_config.ini --dwi_pipeline_config /bids_dir/code/ref_diffusion_config.ini

(I’m only trying to analyze subject 0010 data to see the way these pipelines work)

I receive the following error:

User: root
Group: root
> BIDS dataset: /bids_dir
> Subjects to analyze : ['0010']
> Set $FS_LICENSE which points to FreeSurfer license location (BIDS App)
  ... $FS_LICENSE : /bids_dir/code/license.txt
  * Number of subjects to be processed in parallel set to one (sequential run)
  * Number of parallel threads set to one (total of cores: 23)
  * OMP_NUM_THREADS set to 1 (total of cores: 23)
> Sessions to analyze : ['ses-1', 'ses-2']
> Process subject sub-0010 session ses-1
WARNING: rewriting config file /output_dir/cmp/sub-0010/ses-1/sub-0010_ses-1_anatomical_config.ini
... Anatomical config created : /output_dir/cmp/sub-0010/ses-1/sub-0010_ses-1_anatomical_config.ini
WARNING: rewriting config file /output_dir/cmp/sub-0010/ses-1/sub-0010_ses-1_diffusion_config.ini
... Diffusion config created : /output_dir/cmp/sub-0010/ses-1/sub-0010_ses-1_diffusion_config.ini
... Running pipelines : 
        - Anatomical MRI (segmentation and parcellation)
        - Diffusion MRI (structural connectivity matrices)
INFO: functional pipeline not performed
Traceback (most recent call last):
  File "/app/connectomemapper3/run.py", line 497, in <module>
    number_of_threads=number_of_threads)
  File "/app/connectomemapper3/run.py", line 73, in create_cmp_command
    return ' '.join(cmd)
TypeError: sequence item 14: expected str instance, int found

Anyone knows how to fix this issue?

Thank you,
Gal.

Hi Gal,

I just took some time to look at it and it seems you found a bug! Thanks!
This has been introduced in a new feature of RC1 that allow to set the number of threads used by ANTs and freesurfer recon-all.
This variable is an Int type by default but at some point it needs to be converted as a string. I just opened a new issue in GitHub (https://github.com/connectomicslab/connectomemapper3/issues/44) that I will fix soon.

In the meantime, could you try setting this variable explicitly, i.e.:

docker run -t --rm \
-v /media/groot/Data/BeforeAfterCovid19_BIDS_dataset:/bids_dir \
-v /media/groot/Data/BeforeAfterCovid19_derivatives/cmp_derivatives:/output_dir \
sebastientourbier/connectomemapper-bidsapp:v3.0.0-RC1 \
/bids_dir /output_dir participant --participant_label 0010 \
--fs_license /bids_dir/code/license.txt \
--anat_pipeline_config /bids_dir/code/ref_anatomical_config.ini \
--dwi_pipeline_config /bids_dir/code/ref_diffusion_config.ini
--number_of_threads 1

This might work!

Sebastien

Thank you for opening the issue! :slight_smile:

Setting the variable explicitly doesn’t work, but I’m okay with waiting for tor the fix.

Gal

Hi Gal,
Just to let you know I updated the docker image v3.0.0-RC1 on dockerhub with the fix.
This should work now. Here is what you would need to do:

  1. Identify the image id of your current docker image v3.0.0-RC1 with the following command:
$ docker images
  1. Remove your current docker image v3.0.0-RC1 (ImageID the image ID you identified) with the following command:
$ docker rmi ImageID
  1. Pull the new version:
$ docker pull sebastientourbier/connectomemapper-bidsapp:v3.0.0-RC1

You should be all set.
Let me know if this works and I will close the issue on GitHub.
Best,
Sebastien

It does.
Thank you very much for the quick response and fix!

Gal.