Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in t1-volume-create-dartel pipeline #74

Closed
dr-xenia opened this issue Mar 25, 2020 · 3 comments · Fixed by #76
Closed

Error in t1-volume-create-dartel pipeline #74

dr-xenia opened this issue Mar 25, 2020 · 3 comments · Fixed by #76
Assignees
Labels
bug Something isn't working

Comments

@dr-xenia
Copy link

dr-xenia commented Mar 25, 2020

Dear Clinica team,

I have been trying out your great toolbox. Unfortunately I received an error message when running the volume processing pipeline. When running the command
"clinica run t1-volume /OASIS_data/out/test/ /OASIS_data/out/caps oasis"
I received the following output:

The t1-volume pipeline is divided into 4 parts:
t1-volume-tissue-segmentation pipeline: Tissue segmentation, bias correction and spatial normalization to MNI space
t1-volume-create-dartel pipeline: Inter-subject registration with the creation of a new DARTEL template
t1-volume-dartel2mni pipeline: DARTEL template to MNI
t1-volume-parcellation pipeline: Atlas statistics

Part 1/4: Running t1-volume-segmentation pipeline
The pipeline will be run on the following 1 image(s):
sub-OAS30044 | ses-d0054,
The pipeline will last approximately 10 minutes per image.

[Warning] You did not specify the number of threads to run in parallel (--n_procs argument).
Computation time can be shorten as you have 6 CPUs on this computer. We recommend using 5 threads.

How many threads do you want to use? If you do not answer within 15 sec, default value of 5 will be taken.
[13:01:26] Running pipeline for sub-OAS30044 | ses-d0054
[13:07:52] sub-OAS30044 | ses-d0054 has completed
[13:08:02] The t1-volume-tissue-segmentation pipeline has completed. Working directory was automatically deleted.

Part 2/4: Running t1-volume-create-dartel pipeline


*** Clinica crashed ***


Exception type: TypeError
Exception value: must be str, not NoneType
Below are displayed information that were gathered when Clinica crashed. This will help to understand what happened if you transfer those information to the Clinica development team.

0 /opt/miniconda-latest/envs/neuro/bin/clinica 8 sys.exit(execute())
1 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/cmdline.py 520 execute args.func(args)
2 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/pipelines/t1_volume/t1_volume_cli.py 111 run_command create_dartel_cli.run_command(args)
3 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/pipelines/t1_volume_create_dartel/t1_volume_create_dartel_cli.py 60 run_command exec_pipeline = pipeline.run()
4 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/pipelines/engine.py 253 run self.build()
5 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/pipelines/engine.py 24 func_wrapper res = func(self, *args, **kwargs)
6 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/pipelines/engine.py 224 build self.build_input_node()
7 /opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/clinica/pipelines/t1_volume_create_dartel/t1_volume_create_dartel_pipeline.py 73 build_input_node + str(len(self.subjects)) + ' only in ' + self.tsv_file + '.')

I would be really grateful if you could help me with that issue.

Best wishes
Xenia

@alexandreroutier
Copy link
Contributor

Dear Xenia,

Thank you for you interest in Clinica.

I have found why this error occurs. We have the following check in Clinica:

        if len(self.subjects) <= 1:
            raise ValueError('This pipeline needs at least 2 subjects to perform DARTEL, and found '
                             + str(len(self.subjects)) + ' only in ' + self.tsv_file + '.')

In theory, you should have an understandable error message explaining that you can not create a DARTEL template with only one subject. Since you did not specify a TSV file, it raised instead a Python error ("Exception value: must be str, not NoneType").

We are about to release in the next days a micro-release of Clinica and we will take the opportunity to improve the error message for this particular use case.

In the meantime, I would advice you to use more subjects (at least 3) if you are testing t1-volume pipeline. Otherwise, DARTEL creation will not be run.

Best,
Alexandre

@alexandreroutier alexandreroutier self-assigned this Mar 25, 2020
@alexandreroutier alexandreroutier added the bug Something isn't working label Mar 25, 2020
@dr-xenia
Copy link
Author

Dear Alexandre,

Thank you so much for your fast reply - I am glad that I can fix this issue very fast. I will now re-try the pipeline with two test subjects. Maybe you could also update the official documentation to state that at least two subjects need to be introduced, since other people might also test the pipeline on single subjects.

Best wishes
Xenia

@alexandreroutier
Copy link
Contributor

Thank you for your feedback. We will also update the Wiki to clarify this.

In the meantime, the error message is fixed and should be more readable:
Dartel

This will be integrated to the next release of Clinica :)

Best,
Alexandre

@alexandreroutier alexandreroutier mentioned this issue Mar 25, 2020
3 tasks
@alexandreroutier alexandreroutier linked a pull request Mar 25, 2020 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants