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

HCP pipelines improvements and diffusion #24

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5057408
update bids validator
jokedurnez Nov 6, 2017
4670419
update bids validator
jokedurnez Nov 29, 2017
43f1541
implement diffusion preprocessing
jokedurnez Nov 29, 2017
c1da28f
debug outdir
jokedurnez Nov 29, 2017
5ba0564
merge
jokedurnez Nov 29, 2017
fe69ca5
echo spacing units
jokedurnez Nov 29, 2017
41bd5f5
add data_is_shelled for dwi
jokedurnez Dec 7, 2017
cc0eabc
units of echo spacing
jokedurnez Dec 7, 2017
e205d7d
update pybids
jokedurnez Dec 7, 2017
278ecfb
add eddy
jokedurnez Dec 7, 2017
4e596fb
return list of fieldmaps, debug echospacing
jokedurnez Dec 7, 2017
1d87f1d
use jokes pipelines to check
jokedurnez Dec 7, 2017
3a30eaa
adapt to pybids 0.4.2 + add checks for consistency
jokedurnez Dec 8, 2017
49d523d
debug when fieldmaps are magnitude (hcp test)
jokedurnez Dec 8, 2017
25af78f
debug fieldmap with magnitude
jokedurnez Dec 9, 2017
1af0123
debug consistency check
jokedurnez Dec 9, 2017
e3c0294
restore validator
jokedurnez Dec 9, 2017
a316145
update bids validator
jokedurnez Feb 9, 2018
2497e15
update fsl to 5.0.10 to get surface processing working
jokedurnez Feb 21, 2018
105f768
set MSMbindir, aka the ony reason why I'm doing these changes
jokedurnez Feb 21, 2018
16832a8
missing FSLDIR
jokedurnez Feb 21, 2018
ac60bf6
connectome workbench link + typo
jokedurnez Feb 22, 2018
ef96dd7
update circleCI with new data
jokedurnez Feb 22, 2018
0cf56eb
update version number for tests
jokedurnez Feb 22, 2018
bd328c9
change provider img
jokedurnez Feb 22, 2018
19ab83c
actually not using lifespan
jokedurnez Feb 22, 2018
2062945
trigger circle
jokedurnez Feb 22, 2018
023e003
add MSMCONFIGDIR
jokedurnez Feb 22, 2018
b08a02c
increase timeout for docker build after upgrading fsl
jokedurnez Feb 22, 2018
f809f93
get right files on OSF
jokedurnez Feb 22, 2018
9918940
filename with MACOSX
jokedurnez Feb 22, 2018
7859a16
install latest connectome workbench
jokedurnez Feb 22, 2018
615cb85
right OSF dataset
jokedurnez Feb 23, 2018
fc9855e
caret dir
jokedurnez Feb 23, 2018
873db6a
printcomm no longer option
jokedurnez Feb 27, 2018
84c54c0
update pipelines, freesurfer, workbench
jokedurnez Feb 27, 2018
1a23c36
dockermerge
jokedurnez Feb 28, 2018
f813d02
revert to HCP-freesurfer version
jokedurnez Feb 28, 2018
d61f0dc
ubuntu 16.04 seems to work
jokedurnez Mar 2, 2018
a97b477
remote required but unused license argument
jokedurnez Mar 2, 2018
5bd97b7
remove license option in circle
jokedurnez Mar 3, 2018
d8eb7ef
update Pipelines repo
jokedurnez Mar 3, 2018
5626a89
add tess1mm manually
jokedurnez Mar 3, 2018
dd2a1a3
remove typo wb_command
jokedurnez Mar 6, 2018
ccccc27
remove print and remove no gpu
jokedurnez Mar 7, 2018
7a8ac37
roll back
jokedurnez Mar 7, 2018
4f41911
add requirements
jokedurnez Mar 7, 2018
dd7200f
add diffusion pipeline
jokedurnez Mar 12, 2018
6dbc433
remove unused license arg
jokedurnez Mar 12, 2018
8bbc67a
debug fieldmaps
jokedurnez Mar 12, 2018
935e85d
install eddy_openmp for dwi without gpu
jokedurnez Mar 19, 2018
481884a
debug changes from pybids update
jokedurnez Mar 19, 2018
08850f4
debug unwarpdir dwi
jokedurnez Mar 19, 2018
ba8cc2b
f*in indent
jokedurnez Mar 20, 2018
5979204
debug seunwarpdir for fmaps
jokedurnez Mar 20, 2018
a857859
debug fieldmap in case of multiple
jokedurnez Mar 20, 2018
b22a435
uncomment validator
jokedurnez Mar 20, 2018
2c44cc0
make eddy_openmp executable
jokedurnez Mar 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 37 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use Ubuntu 14.04 LTS
FROM ubuntu:trusty-20170119
FROM ubuntu:14.04

## Install the validator
RUN apt-get update && \
Expand All @@ -8,7 +8,7 @@ RUN apt-get update && \
apt-get remove -y curl && \
apt-get install -y nodejs

RUN npm install -g bids-validator@0.19.2
RUN npm install -g bids-validator@0.25.07

# Download FreeSurfer
RUN apt-get -y update \
Expand All @@ -27,7 +27,9 @@ RUN apt-get -y update \
--exclude='freesurfer/average/mult-comp-cor' \
--exclude='freesurfer/lib/cuda' \
--exclude='freesurfer/lib/qt' && \
apt-get install -y tcsh bc tar libgomp1 perl-modules curl
apt-get remove -y wget && \
apt-get install -y tcsh bc tar libgomp1 perl-modules curl && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Set up the environment
ENV OS Linux
Expand All @@ -53,9 +55,9 @@ RUN apt-get update && \
curl -sSL http://neuro.debian.net/lists/trusty.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \
apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 && \
apt-get update && \
apt-get install -y fsl-core=5.0.9-4~nd14.04+1
apt-get install -y fsl-core=5.0.9-4~nd14.04+1 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Configure environment
ENV FSLDIR=/usr/share/fsl/5.0
ENV FSL_DIR="${FSLDIR}"
ENV FSLOUTPUTTYPE=NIFTI_GZ
Expand All @@ -68,20 +70,24 @@ ENV FSLWISH=/usr/bin/wish
ENV FSLOUTPUTTYPE=NIFTI_GZ
RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh

# Install Connectome Workbench
RUN apt-get update && apt-get -y install connectome-workbench=1.2.3-1~nd14.04+1

ENV CARET7DIR=/usr/bin
# Get connectome workbench
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
curl -sSL http://neuro.debian.net/lists/trusty.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \
apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 && \
apt-get update && \
apt-get -y install connectome-workbench=1.2.3-1~nd14.04+1

# Install HCP Pipelines
WORKDIR /
RUN apt-get -y update \
&& apt-get install -y --no-install-recommends python-numpy && \
wget https://github.com/Washington-University/Pipelines/archive/v3.17.0.tar.gz -O pipelines.tar.gz && \
wget https://github.com/jokedurnez/Pipelines/archive/v0.1.0.tar.gz -O pipelines.tar.gz && \
cd /opt/ && \
tar zxvf /pipelines.tar.gz && \
mv /opt/Pipelines-* /opt/HCP-Pipelines && \
rm /pipelines.tar.gz && \
cd /
cd /

ENV HCPPIPEDIR=/opt/HCP-Pipelines
ENV HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates
Expand All @@ -97,12 +103,29 @@ ENV HCPPIPEDIR_dMRI=${HCPPIPEDIR}/DiffusionPreprocessing/scripts
ENV HCPPIPEDIR_dMRITract=${HCPPIPEDIR}/DiffusionTractography/scripts
ENV HCPPIPEDIR_Global=${HCPPIPEDIR}/global/scripts
ENV HCPPIPEDIR_tfMRIAnalysis=${HCPPIPEDIR}/TaskfMRIAnalysis/scripts
ENV MSMBin=${HCPPIPEDIR}/MSMBinaries
ENV MSMCONFIGDIR=${HCPPIPEDIR}/MSMConfig
ENV CARET7DIR=/usr/bin

RUN apt-get update && apt-get install -y --no-install-recommends python-pip python-six python-nibabel python-setuptools
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt && \
rm -rf ~/.cache/pip

RUN apt-get update && apt-get install -y --no-install-recommends python-pip python-six python-nibabel python-setuptools
RUN pip install pybids==0.0.1
ENV PYTHONPATH=""

# missing libraries
RUN echo deb http://security.ubuntu.com/ubuntu precise-security main >> /etc/apt/sources.list && \
apt update && \
apt install -y libxp6 libxmu6

WORKDIR /opt/freesurfer/bin
RUN wget https://raw.githubusercontent.com/freesurfer/freesurfer/d26114a201333f812d2cef67a338e2685c004d00/scripts/recon-all.v6.hires && \
chmod +x /opt/freesurfer/bin/recon-all.v6.hires
RUN wget https://raw.githubusercontent.com/freesurfer/freesurfer/dev/scripts/tess1mm && \
chmod +x /opt/freesurfer/bin/tess1mm
RUN wget -qO- https://fsl.fmrib.ox.ac.uk/fsldownloads/patches/eddy-patch-fsl-5.0.9/centos6/eddy_openmp > $FSLDIR/bin/eddy_openmp
RUN chmod +x $FSLDIR/bin/eddy_openmp

COPY run.py /run.py
RUN chmod +x /run.py

Expand Down
9 changes: 4 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ dependencies:
- "~/data"

override:
- if [[ ! -d ~/data/hcp_example_bids ]]; then wget -c -O ${HOME}/hcp_example_bids.zip "https://files.osf.io/v1/resources/9q7dv/providers/osfstorage/58a1fd039ad5a101f23cd94f" && mkdir -p ${HOME}/data && unzip ${HOME}/hcp_example_bids.zip -d ${HOME}/data; fi
- if [[ ! -d ~/data/lifespan_example_bids ]]; then wget -c -O ${HOME}/lifespan_example_bids.zip "https://files.osf.io/v1/resources/9q7dv/providers/osfstorage/58a1fc4eb83f6901f3b47a54" && mkdir -p ${HOME}/data && unzip ${HOME}/lifespan_example_bids.zip -d ${HOME}/data; fi
- if [[ ! -d ~/data/hcp_example_bids ]]; then wget -c -O ${HOME}/hcp_example_bids.zip "https://files.osf.io/v1/resources/9q7dv/providers/osfstorage/5a8efffe91b689000c9f5ce5" && mkdir -p ${HOME}/data && unzip ${HOME}/hcp_example_bids.zip -d ${HOME}/data; fi
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- git describe --tags > version
- docker build -t bids/${CIRCLE_PROJECT_REPONAME,,} . :
timeout: 21600
timeout: 40000
- mkdir -p ~/docker; docker save "bids/${CIRCLE_PROJECT_REPONAME,,}" > ~/docker/image.tar
- mkdir -p ${HOME}/outputs

test:
override:
# print version
- docker run -ti --rm --read-only -v /tmp:/tmp -v /var/tmp:/var/tmp -v ${HOME}/data/hcp_example_bids:/bids_dataset bids/${CIRCLE_PROJECT_REPONAME,,} --version
- docker run -ti --rm --read-only -v /tmp:/tmp -v /var/tmp:/var/tmp -v ${HOME}/data/hcp_example_bids_v3:/bids_dataset bids/${CIRCLE_PROJECT_REPONAME,,} --version
# participant level tests for single session dataset
- docker run -ti --rm --read-only -v /tmp:/tmp -v /var/tmp:/var/tmp -v ${HOME}/data/hcp_example_bids:/bids_dataset -v ${HOME}/outputs1:/outputs bids/${CIRCLE_PROJECT_REPONAME,,} /bids_dataset /outputs participant --participant_label 100307 --stages PreFreeSurfer --license_key="*CxjskRdd7" --n_cpus 2:
- docker run -ti --rm --read-only -v /tmp:/tmp -v /var/tmp:/var/tmp -v ${HOME}/data/hcp_example_bids_v3:/bids_dataset -v ${HOME}/outputs1:/outputs bids/${CIRCLE_PROJECT_REPONAME,,} /bids_dataset /outputs participant --participant_label 100307 --stages PreFreeSurfer --n_cpus 2:
timeout: 21600
deployment:
hub:
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
grabbit==0.1.0
pybids==0.4.2
Loading