Unable to build from singularity img file

Hello

Seek help with installing tractoflow.

I need to use TractoFlow for tractography for surgical planning.

Please find the installation error log below.

(base) amitjc@AMiT:~/singularity/singularity$ singularity build singularity_tractoflow_2.0.0_8b39aee_2019-04-26.img singularity_tractoflow.def
FATAL: Unable to build from singularity_tractoflow.def: unable to open file singularity_tractoflow.def: open singularity_tractoflow.def: no such file or directory

Please Advice.

Thank you.

Best Regards,
Amit.

Hi @amitjc

Did you clone the singularity-tractoflow repository? To do so:

to get the most recent version:

git clone https://github.com/scilus/singularity-tractoflow.git.

Else, if you prefer the stable 2.0.0 release, you can download it at https://github.com/scilus/singularity-tractoflow/archive/2.0.0.zip

Then, unzip it and retry building with your command, once you are directly in the directory.

Thank you @jchoude hat resolved the image build issue.

Now theres issue with running tractoflow. PFA the log below and advice.

Thanks again.

Best Regards,
Amit.

(base) amitjc@AMiT:~$ nextflow -c singularity.conf run tractoflow/main.nf --root input_folder --dti_shells “DTI_SHELLS” --fodf_shells “FODF_SHELLS” -with-singularity singularity_name.img -resume
N E X T F L O W ~ version 20.01.0
Launching tractoflow/main.nf [prickly_kowalevski] - revision: d62996eeb1
Unable to parse config file: ‘/home/amitjc/singularity.conf’

Compile failed for sources FixedSetSources[name=’/groovy/script/Script1531D538B66C9CC3257BEE3E735B81E3/_nf_config_429b4520’]. Cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/groovy/script/Script1531D538B66C9CC3257BEE3E735B81E3/_nf_config_429b4520: 1: expecting anything but ‘’\n’’; got it anyway @ line 1, column 91.
_CASES/DTi/xyz/DTi"
^

1 error
(base) amitjc@AMiT:~$

Hi,

how did you get main.nf? Did you clone the repository, or did you download the archive?

You can see https://tractoflow-documentation.readthedocs.io/en/latest/installation/install.html

for more details.

From the error message, it seems that the nextflow.config file, which should be beside main.nf, was not found.

Hope that helps

Hello,

The two files - nextflow.config & main.nf are in the same folder.

Please advice further.

Thank you.

Best Regards,
Amit.

I see now that the singularity.conf file that you give to the -c argument is not the default one. The error then probably means that you tried to change some configuration values using this file. However, it seems that there is a syntax error in your modified config file.

Did you need to change some values? If so, please try to check the syntax to make sure it is valid.

I also get a similar error but I did not touch or modify the singularity.conf file.

Unable to parse config file: ‘/opt/software/singularity-3.8/etc/singularity/singularity.conf’

Compile failed for sources FixedSetSources[name=’/groovy/script/ScriptD402A77663F187E15C167DC2F578EC9D/_nf_config_a89e1424’]. Cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/groovy/script/ScriptD402A77663F187E15C167DC2F578EC9D/_nf_config_a89e1424: 1: Unexpected input: ‘#’ @ line 1, column 1.
# SINGULARITY.CONF
^

1 error

Hi @Elise_B,

Can you tell us what is your command line ?
It would be a good start to know what you’re trying to run.

You can also try with the singularity here if it’s not already the case.

Arnaud

Hello!
yes that’s the version I’m using,

nextflow -c /opt/software/singularity-3.8/etc/singularity/singularity.conf run tractoflow/main.nf --bids data/ --dti_shells “0 1000” --fodf_shells “0 1000” -with-singularity /home/eliseb/scratch/tractoflow_2.2.1_b9a527_2021-04-13.img -resume

The error:
ERROR nextflow.cli.Launcher - Unable to parse config file: ‘/opt/software/singularity-3.8/etc/singularity/singularity.conf’

Compile failed for sources FixedSetSources[name=’/groovy/script/ScriptD402A77663F187E15C167DC2F578EC9D/_nf_config_a89e1424’]. Cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

/groovy/script/ScriptD402A77663F187E15C167DC2F578EC9D/_nf_config_a89e1424: 1: expecting ‘!’, found ’ ’ @ line 1, column 2.

 # SINGULARITY.CONF

  ^

1 error

ch.grengine.except.CompileException: Compile failed for sources FixedSetSources[name=’/groovy/script/ScriptD402A77663F187E15C167DC2F578EC9D/_nf_config_a89e1424’]. Cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

/groovy/script/ScriptD402A77663F187E15C167DC2F578EC9D/_nf_config_a89e1424: 1: expecting ‘!’, found ’ ’ @ line 1, column 2.

SINGULARITY.CONF

^

1 error

Ok please remove the config file and the -c and use the singularity I just sent you.

Thank you

Ok I removed the -c option, it seems to be running. à suivre

Hi, so it worked without the -c option, put when I try to open the output trk file (sub-015_pft_tracking_prob_wm_seed_0.trk in PFT_Tracking folder) with trackvis it says cannot open file.

Hi !

You should give it a try with MI-Brain.
If it still does not work please attach the nextflow log and a link to the trk file.

Thank you

ah yes, it works with MI-Brain, but I need Trackvis to replicate previous analyses

Hi,

I would need the file to check.

Thank you
Arnaud

https://mcgill-my.sharepoint.com/:u:/g/personal/elise_brochubarbeau_mcgill_ca/EUQL06vA0O1Dk69kuY_ln0QBCt34wlU-yn67UXHwUh1z6A?e=HkeUOa

I was able to open the file you sent me using Trackvis.
I used Trackvis Version 0.6.1 (Build 2017.01.20).

Maybe it’s a memory issue but anyway the trk file is fine.

Have a good day
Arnaud