nipy / mindboggle

Automated anatomical brain label/shape analysis software (+ website)
http://mindboggle.info
Other
143 stars 54 forks source link

MIndboggle (latest) crashing on processing freesurfer 6 data #196

Open cecs1 opened 4 years ago

cecs1 commented 4 years ago

Hello, I'm trying to process some data through mindboggle on data that was ran successfully through Freesurfer 6. It doesn't matter which scan I use, the same error occurs.

I'm getting errors below (there are many after this of similar nature) - they appear to relate to the Surface_to_vtk routine.

Any advice appreciated. Thanks, Chris

191202-20:16:59,146 nipype.workflow INFO: Workflow Mindboggle settings: ['check', 'execution', 'logging', 'monitoring'] 191202-20:16:59,197 nipype.workflow INFO: Running serially. 191202-20:16:59,198 nipype.workflow INFO: [Node] Setting-up "Mindboggle.Freesurfer_annot" in "/home/jovyan/work/mindboggled/working/0315/Mindboggle/_hemi_rh/Free surfer_annot". 191202-20:16:59,201 nipype.workflow INFO: [Node] Running "Freesurfer_annot" ("nipype.interfaces.io.DataGrabber") 191202-20:16:59,205 nipype.workflow INFO: [Node] Finished "Mindboggle.Freesurfer_annot". 191202-20:16:59,206 nipype.workflow INFO: [Node] Setting-up "Mindboggle.Surfaces" in "/home/jovyan/work/mindboggled/working/0315/Mindboggle/_hemi_rh/Surfaces". 191202-20:16:59,209 nipype.workflow INFO: [Node] Running "Surfaces" ("nipype.interfaces.io.DataGrabber") 191202-20:16:59,211 nipype.workflow INFO: [Node] Finished "Mindboggle.Surfaces". 191202-20:16:59,212 nipype.workflow INFO: [Node] Setting-up "Mindboggle.Surface_to_vtk" in "/home/jovyan/work/mindboggled/working/0315/Mindboggle/_hemi_rh/Surfac e_to_vtk". 191202-20:16:59,274 nipype.workflow INFO: [Node] Running "Surface_to_vtk" ("nipype.interfaces.utility.wrappers.Function") 191202-20:16:59,656 nipype.workflow WARNING: Storing result file without outputs 191202-20:16:59,656 nipype.workflow WARNING: [Node] Error on "Mindboggle.Surface_to_vtk" (/home/jovyan/work/mindboggled/working/0315/Mindboggle/_hemi_rh/Surfaceto vtk) 191202-20:16:59,659 nipype.workflow ERROR: Node Surface_to_vtk.a1 failed to run on host a460efb46421. 191202-20:16:59,660 nipype.workflow ERROR: Saving crash info to /root/crash-20191202-201659-root-Surface_to_vtk.a1-12bb0046-09dc-4661-bf46-c45e734ce5aa.txt Traceback (most recent call last): File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 48, in run node.run(updatehash=updatehash) File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 479, in run result = self._run_interface(execute=True) File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 569, in _run_interface return self._run_command(execute) File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 662, in _run_command result = self._interface.run(cwd=outdir) File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 382, in run runtime = self._run_interface(runtime) File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nipype/interfaces/utility/wrappers.py", line 144, in _run_inte rface out = function_handle(*args) File "", line 54, in freesurfer_surface_to_vtk File "/opt/miniconda-latest/envs/mb/lib/python3.6/site-packages/nibabel/freesurfer/io.py", line 179, in read_geometry coords = np.fromfile(fobj, ">f4", vnum 3).reshape(vnum, 3) ValueError: cannot reshape array of size 1287294 into shape (389005987,3)

PeerHerholz commented 4 years ago

Hi @cecs1,

thank you very much for posting this problem.

Before we go any further: are you using Mindboggle within a container (docker/singularity) or through the bare-metal installation? That function wasn't changed in a while I think, hence I'm wondering where this is coming from...

Could you maybe also post an example of how you run freesurfer and mindboggle?

Best, Peer

cecs1 commented 4 years ago

Thanks Peer.

I run the docker container version

docker run --rm -ti -v $HOST:$DOCK -p 5000:5000 nipy/mindboggle

Then, I set variables:

export HOST=/home/csteward export DOCK=/home/jovyan/work export ID=0315 export FREESURFER_OUT=$DOCK/freesurfer_subjects export FREESURFER_SUBJECT=$FREESURFER_OUT/$ID export OUT=$DOCK/mindboggled

Then I run Mindboggle on the freesurfer 6 output (which was run separately outside the docker container)

mindboggle $FREESURFER_SUBJECT --out $OUT

I can tell you if I run everything in the docker container ie freesurfer and mindboggle, there are no problems.

I can also tell you that the output from running freesurfer 6 separately compared to the freesurfer 6 output that mindboggle generates are different ie at least in terms of number of files generated eg the surf directory has 80 folders using mindboggle freesurfer, but 96 using external freesurfer. I run freesurfer with recon-all and no special options - I assume mindboggle is doing the same?

regards, Chris


Dr Chris Steward Dept of Medicine and Radiology, Imaging Manager, MBC@RMH University of Melbourne/Royal Melbourne Hospital Grattan St, Parkville, 3050 Tel: (03) 903 56508 E-mail: csteward@unimelb.edu.au



From: Peer Herholz notifications@github.com Sent: 04 December 2019 01:25 To: nipy/mindboggle mindboggle@noreply.github.com Cc: Chris Steward csteward@unimelb.edu.au; Mention mention@noreply.github.com Subject: Re: [nipy/mindboggle] MIndboggle (latest) crashing on processing freesurfer 6 data (#196)

Hi @cecs1https://github.com/cecs1,

thank you very much for posting this problem.

Before we go any further: are you using Mindboggle within a container (docker/singularity) or through the bare-metal installation? That function wasn't changed in a while I think, hence I'm wondering where this is coming from...

Could you maybe also post an example of how you run freesurfer and mindboggle?

Best, Peer

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/nipy/mindboggle/issues/196?email_source=notifications&email_token=AL246FOHUGDMHOVT2HPBMZDQWZT6PA5CNFSM4JUI6C32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFZRNAI#issuecomment-561190529, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AL246FITLDM3XBOKS6J2ISDQWZT6PANCNFSM4JUI6C3Q.

PeerHerholz commented 4 years ago

Hi @cecs1,

thank you very much for the additional information.

Hm, interesting. I never saw that/heard of it before. How about you @binarybottle, @satra?

@cecs1 did you already try an older version of the mindboggle container ? Regarding freesurfer: mindboggle installs it through neurodocker which grabs a min version as you can see e.g., here. Unfortunately, I can't remember the difference to the classic version right now. AFAIK, it excludes some example data, etc. which should not affect the number of output folders. @kaczmarj could you maybe provide any pointers here (sorry for always tagging you!)?

binarybottle commented 4 years ago

I am afraid I haven't run into this problem before.
Based on the error, I would have guessed that there is an issue with how nibabel is dealing with the FS surface data, but it doesn't make sense to me that the FS data would be different when FS is run inside vs. outside the container.

PeerHerholz commented 4 years ago

The inside vs. outside container FS data thingy indeed seems weird...

@cecs1 could you maybe try the following for both, the recon-all output from freesurfer within and outside a container:

import nibabel as nb surf = nb.freesurfer.read_geometry(surface_file)

where surface_file is a freesurfer surface file.

kaczmarj commented 4 years ago

@PeerHerholz you can inspect the contents of https://dl.dropbox.com/s/nnzcfttc41qvt31/recon-all-freesurfer6-3.min.tgz. it was made using the instructions in https://github.com/freesurfer/freesurfer/issues/70#issuecomment-316361886. the binaries are exactly the same as in freesurfer version 6.0.0, there are just fewer of them (the package was trimmed to only include things necessary for recon-all).

PeerHerholz commented 4 years ago

Thx @kaczmarj for the information and pointers! @cecs1 do you perhaps have any updates?