nipy / mindboggle

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

create a mindboggle option that starts with a T1 #90

Closed satra closed 7 years ago

satra commented 7 years ago

@binarybottle - shall we create a version of mindboggle that starts with a T1, and optional T2 for freesurfer, and runs through everything. it will take a while, but may be easier for users. it would create the outputs as:

participant_id

binarybottle commented 7 years ago

@akeshavan has built the docker image that supports bids/freesurfer, so we could create a new docker image with freesurfer installed and simply update the documentation. What do you think, Anisha?

akeshavan commented 7 years ago

@satra @binarybottle I started working on it, but then I hit that weird error when compiling travel_depth! This branch has the freesurfer dockerfile https://github.com/BIDS-Apps/mindboggle/blob/freesurfer/Dockerfile#L1 -- I'll take another stab at it later this week!

binarybottle commented 7 years ago

Will the solution to issue #92 help resolve this?

binarybottle commented 7 years ago

@satra -- Have I properly included your minimized FreeSurfer from https://github.com/freesurfer/freesurfer/issues/70 in the Dockerfile?: https://github.com/nipy/mindboggle/blob/master/install/Dockerfile.mindboggle.complete#L109

Would you please replace the setup steps above that line with the steps you used?

satra commented 7 years ago

sth like this should work.

USER $NB_USER
WORKDIR /opt
RUN curl -sSL https://dl.dropbox.com/sh/mvgpn6cml04me6u/AADWHds-ZeRqBvmuNX7_RoUla/recon-all-freesurfer6%2BMCR.min.tgz?dl=0 | tar zx -C /opt  && \
 ( echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh )

ENV OS=Linux \
    FS_OVERRIDE=0 \
    FIX_VERTEX_AREA= \
    FSF_OUTPUT_FORMAT=nii.gz \
    FREESURFER_HOME=/opt/freesurfer
ENV SUBJECTS_DIR=/subjects \
    MNI_DIR=$FREESURFER_HOME/mni \
    LOCAL_DIR=$FREESURFER_HOME/local \
    MINC_BIN_DIR=$FREESURFER_HOME/mni/bin \
    MINC_LIB_DIR=$FREESURFER_HOME/mni/lib \
    MNI_DATAPATH=$FREESURFER_HOME/mni/data
ENV PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
    MNI_PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
    PATH=$FREESURFER_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
binarybottle commented 7 years ago

Great -- thanks, @satra! Running now... Are the installation instructions (commented out) above this correct?: https://github.com/nipy/mindboggle/blob/master/install/Dockerfile.mindboggle.complete#L64

And is there anything you would change in the install_mindboggle.sh script, for those who don't wish to use Docker?: https://github.com/nipy/mindboggle/blob/master/install/install_mindboggle.sh

satra commented 7 years ago

@binarybottle - the commented out bits should change. this new approach tar ball reflects the approach with reprozip in the freesurfer issue and is simply a minimized tar-ball for recon-all (nothing else). also in neither circumstance were we compiling freesurfer.

binarybottle commented 7 years ago

Error running recon-all in the Docker container:

... Iteration 1 Wed May 10 02:25:45 UTC 2017 nu_correct -clobber ./tmp.mri_nu_correct.mni.228/nu0.mnc ./tmp.mri_nu_correct.mni.228/nu1.mnc -t\ mpdir ./tmp.mri_nu_correct.mni.228/0/ -iterations 1000 -distance 50 Can't locate MNI/Startup.pm in @INC (you may need to install the MNI::Startup module) (@INC cont\ ains: /opt/freesurfer/mni/lib/perl5/5.8.5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 \ /usr/local/share/perl/5.20.2 /usr/lib/x8664-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86\ 64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /opt/freesurfer/mni/b\ in/nu_correct line 37. BEGIN failed--compilation aborted at /opt/freesurfer/mni/bin/nu_correct line 37. ERROR: nu_correct Linux 4ed98e89deee 4.9.13-moby #1 SMP Sat Mar 25 02:48:44 UTC 2017 x86_64 GNU/Linux

recon-all -s subject1 exited with ERRORS at Wed May 10 02:25:45 UTC 2017

satra commented 7 years ago

use these variables. seems like the same as before, but this works for me.

ENV FS_OVERRIDE=0 \
    OS=Linux \
    FSF_OUTPUT_FORMAT=nii.gz \
    FIX_VERTEX_AREA=\
    FREESURFER_HOME=/opt/freesurfer
ENV MNI_DIR=$FREESURFER_HOME/mni \
    SUBJECTS_DIR=/subjects
ENV PERL5LIB=$MNI_DIR/share/perl5 \
    MNI_PERL5LIB=$MNI_DIR/share/perl5 \
    MINC_BIN_DIR=$MNI_DIR/bin \
    MINC_LIB_DIR=$MNI_DIR/lib \
    MNI_DATAPATH=$MNI_DIR/data
ENV PATH=$FREESURFER_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
satra commented 7 years ago

the perl5 locations are different for freesurfer 6

binarybottle commented 7 years ago

Great! FreeSurfer is running now. If the Dockerfile is downloading a reprozipped version of FreeSurfer and of ANTs, then I shouldn't have to reprozip my docker container, should I? It doesn't sound like there will be any savings.

satra commented 7 years ago

ants is not reprozipped for mindboggle. you shouldn't reprozip the recon process, but you should reprozip both ants and mindboggle processes. again this is for the minimal container, not the dev container.

btw, your commented ants instructions do not conform to the download you are pointing to. the git checkout tag is incorrect.

binarybottle commented 7 years ago
  1. Does the commented section reflect the installation steps you used for FS?

  2. Is the only incorrect portion of the ANTs installation the git tag? If so, what version did you use?

  3. How would I selectively reprozip just ANTs and Mindboggle but not FS? FS would not be included in a reprozip pack, correct?

satra commented 7 years ago
  1. Does the commented section reflect the installation steps you used for FS?

it doesn't. what i used for freesurfer is in this discussion: https://github.com/freesurfer/freesurfer/issues/70

  1. Is the only incorrect portion of the ANTs installation the git tag? If so, what version did you use?

the commented section that's in the nipype workshop: https://github.com/nipy/workshops/blob/master/170327-nipype/docker/Dockerfile.all#L43

  1. How would I selectively reprozip just ANTs and Mindboggle but not FS? FS would not be included in a reprozip pack, correct?

you would process the config.yml to extract only the files from your miniconda directory and ants directory. this would be similar to the process used for recon-all as described in the freesurfer issue (see 1.).

binarybottle commented 7 years ago

Thank you --

  1. & 2. I removed my commented out installation instructions for FS and ANTs and simply point to your links:

Install minimized (reprozip) version of FreeSurfer v6.0: https://github.com/freesurfer/freesurfer/issues/70

Install ANTS (git checkout 767f756bc0e423cd503a24c806b6578aaeb5b82f) Note: ANTs compilation takes longer than Dockerhub allows (2 hours), so a version from March 24, 2017 was compiled according to: https://github.com/nipy/workshops/blob/master/170327-nipype/docker/Dockerfile.all#L43 and is loaded from the link below.

Speaking of ANTs, the first new release after two years came out yesterday!: https://github.com/stnava/ANTs/releases

  1. So would I remove the freesurfer line from the reprozip command (https://github.com/nipy/mindboggle/blob/master/install/reprozip_container.sh#L34), and when I reprozip pack, it will include the minified versions of the miniconda and ants directories specified in config.yml, as well as the complete (reprozipped) freesurfer?
satra commented 7 years ago

@binarybottle - ants should be updated to reflect the latest release then.

regarding reprozip - you can keep it if you want, especially given that you are not doing brainstem segmentation or hippocampal subfields but still installing the version of recon-all that includes support for them.

binarybottle commented 7 years ago

Would you like to compile the latest version of ANTs? Why don't we store the FS and ANTs tar-balls on osf.io instead of dropbox? How about here?: https://osf.io/xtzv3/

Re: reprozip and config.yml, I am confused. If I want to allow users of the container to do brainstem and hippo segmentation, what do I do? Would I remove the recon-all line from my reprozip command and have FS sit next to the reprozipped ANTs and mindboggle?

satra commented 7 years ago

actually the reprozip trace command in the shell script will not work properly, it will only trace recon-all (see the freesurfer issue on how to setup multiple traces).

for ants at this point, and more generally, i would use the following project to build it: https://github.com/kaczmarj/neurodocker

i've just asked jakub to look into minimizing container builds as well.

regarding downloads, yes they can, and perhaps should, be hosted on osf. it's just easier at this point on dropbox. we can of course link osf to dropbox. for now, since this is an evolving area, i'd like to just make sure we get the components working right and then move as necessary to specific places.

binarybottle commented 7 years ago

@satra -- I made a pull request because neurodocker's ants.py doesn't include version 2.2.0.

binarybottle commented 7 years ago

I have created a new Docker container that will run FreeSurfer, ANTs, and the revised Mindboggle. Please see the new docker pull and run instructions (http://mindboggle.readthedocs.io/en/latest/#installing-mindboggle).