diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cbee05f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +"/.idea" diff --git a/360CortSurf_19Vol_parcel.dlabel.nii b/360CortSurf_19Vol_parcel.dlabel.nii new file mode 100644 index 0000000..d131d9f Binary files /dev/null and b/360CortSurf_19Vol_parcel.dlabel.nii differ diff --git a/Dockerfile b/Dockerfile index 6510472..0b9e62e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,36 @@ # Use Ubuntu 14.04 LTS FROM ubuntu:trusty-20170119 +# Configure environment +ENV OS Linux +ENV FS_OVERRIDE 0 +ENV FIX_VERTEX_AREA= +ENV SUBJECTS_DIR /opt/freesurfer/subjects +ENV FSF_OUTPUT_FORMAT nii.gz +ENV MNI_DIR /opt/freesurfer/mni +ENV LOCAL_DIR /opt/freesurfer/local +ENV FREESURFER_HOME /opt/freesurfer +ENV FSFAST_HOME /opt/freesurfer/fsfast +ENV MINC_BIN_DIR /opt/freesurfer/mni/bin +ENV MINC_LIB_DIR /opt/freesurfer/mni/lib +ENV MNI_DATAPATH /opt/freesurfer/mni/data +ENV FMRI_ANALYSIS_DIR /opt/freesurfer/fsfast +ENV PERL5LIB /opt/freesurfer/mni/lib/perl5/5.8.5 +ENV MNI_PERL5LIB /opt/freesurfer/mni/lib/perl5/5.8.5 +ENV PATH /opt/freesurfer/bin:/opt/freesurfer/fsfast/bin:/opt/freesurfer/tktools:/opt/freesurfer/mni/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH +ENV PYTHONPATH="" +ENV FSL_FIXDIR /opt/fix +ENV FSLDIR=/usr/share/fsl/5.0 +ENV FSL_DIR="${FSLDIR}" +ENV FSLOUTPUTTYPE=NIFTI_GZ +ENV PATH=/usr/lib/fsl/5.0:$PATH +ENV FSLMULTIFILEQUIT=TRUE +ENV POSSUMDIR=/usr/share/fsl/5.0 +ENV LD_LIBRARY_PATH=/usr/lib/fsl/5.0 +ENV FSLTCLSH=/usr/bin/tclsh +ENV FSLWISH=/usr/bin/wish +ENV FSLOUTPUTTYPE=NIFTI_GZ + # Download FreeSurfer RUN apt-get -y update \ && apt-get install -y wget && \ @@ -20,115 +50,100 @@ RUN apt-get -y update \ --exclude='freesurfer/lib/qt' && \ apt-get install -y tcsh bc tar libgomp1 perl-modules curl -# Set up the environment -ENV OS=Linux \ - FS_OVERRIDE=0 \ - FIX_VERTEX_AREA= \ - SUBJECTS_DIR=/opt/freesurfer/subjects \ - FSF_OUTPUT_FORMAT=nii.gz \ - MNI_DIR=/opt/freesurfer/mni \ - LOCAL_DIR=/opt/freesurfer/local \ - FREESURFER_HOME=/opt/freesurfer \ - FSFAST_HOME=/opt/freesurfer/fsfast \ - MINC_BIN_DIR=/opt/freesurfer/mni/bin \ - MINC_LIB_DIR=/opt/freesurfer/mni/lib \ - MNI_DATAPATH=/opt/freesurfer/mni/data \ - FMRI_ANALYSIS_DIR=/opt/freesurfer/fsfast \ - PERL5LIB=/opt/freesurfer/mni/lib/perl5/5.8.5 \ - MNI_PERL5LIB=/opt/freesurfer/mni/lib/perl5/5.8.5 \ - PATH=/opt/freesurfer/bin:/opt/freesurfer/fsfast/bin:/opt/freesurfer/tktools:/opt/freesurfer/mni/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH - - -# https://bugs.debian.org/830696 (apt uses gpgv by default in newer releases, rather than gpg) -RUN set -x \ - && apt-get update \ - && { \ - which gpg \ - || apt-get install -y --no-install-recommends gnupg \ - ; } \ -# Ubuntu includes "gnupg" (not "gnupg2", but still 2.x), but not dirmngr, and gnupg 2.x requires dirmngr -# so, if we're not running gnupg 1.x, explicitly install dirmngr too - && { \ - gpg --version | grep -q '^gpg (GnuPG) 1\.' \ - || apt-get install -y --no-install-recommends dirmngr \ - ; } \ - && rm -rf /var/lib/apt/lists/* - -# apt-key is a bit finicky during "docker build" with gnupg 2.x, so install the repo key the same way debian-archive-keyring does (/etc/apt/trusted.gpg.d) -# this makes "apt-key list" output prettier too! -RUN set -x \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys DD95CC430502E37EF840ACEEA5D32F012649A5A9 \ - && gpg --export DD95CC430502E37EF840ACEEA5D32F012649A5A9 > /etc/apt/trusted.gpg.d/neurodebian.gpg \ - && rm -rf "$GNUPGHOME" \ - && apt-key list | grep neurodebian - -RUN { \ - echo 'deb http://neuro.debian.net/debian trusty main'; \ - echo 'deb http://neuro.debian.net/debian data main'; \ - echo '#deb-src http://neuro.debian.net/debian-devel trusty main'; \ -} > /etc/apt/sources.list.d/neurodebian.sources.list - RUN sed -i -e 's,main *$,main contrib non-free,g' /etc/apt/sources.list.d/neurodebian.sources.list; grep -q 'deb .* multiverse$' /etc/apt/sources.list || sed -i -e 's,universe *$,universe multiverse,g' /etc/apt/sources.list - + # Install FSL 5.0.9 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 install -y fsl-core=5.0.9-4~nd14.04+1 + curl -sSL http://neuro.debian.net/lists/trusty.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list -# Configure environment -ENV FSLDIR=/usr/share/fsl/5.0 -ENV FSL_DIR="${FSLDIR}" \ - FSLOUTPUTTYPE=NIFTI_GZ \ - PATH=/usr/lib/fsl/5.0:$PATH \ - FSLMULTIFILEQUIT=TRUE \ - POSSUMDIR=/usr/share/fsl/5.0 \ - LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \ - FSLTCLSH=/usr/bin/tclsh \ - FSLWISH=/usr/bin/wish \ - FSLOUTPUTTYPE=NIFTI_GZ +RUN apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 -RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh +RUN apt-get update && \ + apt-get install -y fsl-core=5.0.9-4~nd14.04+1 + +RUN apt-get build-dep -y gridengine && apt-get update -y # Install Connectome Workbench RUN apt-get update && apt-get -y install connectome-workbench=1.2.3-1~nd14.04+1 -ENV CARET7DIR=/usr/bin -# Install HCP Pipelines and MSM binaries -WORKDIR /opt -RUN apt-get -y update \ +# Install HCP Pipelines +RUN apt-get update \ && apt-get install -y --no-install-recommends python-numpy && \ - wget -q https://github.com/Washington-University/Pipelines/archive/v3.17.0.tar.gz -O pipelines.tar.gz && \ - tar zxf pipelines.tar.gz && \ - mv /opt/Pipelines-* /opt/HCP-Pipelines && \ - rm pipelines.tar.gz && \ - wget -q https://www.doc.ic.ac.uk/~ecr05/MSM_HOCR_v1/MSM_HOCR_v1-download.tgz -O MSMs.tar.gz && \ - tar zxf MSMs.tar.gz && \ - rm MSMs.tar.gz && \ - mv MSM_HOCR_v1/Ubuntu /opt/HCP-Pipelines/MSMBinaries && \ - rm -rf MSM_HOCR_v1 - -WORKDIR / - + wget https://github.com/Washington-University/Pipelines/archive/v3.17.0.tar.gz -O pipelines.tar.gz && \ + cd /opt/ && \ + mkdir /opt/HCP-Pipelines && \ + tar zxf /pipelines.tar.gz -C /opt/HCP-Pipelines --strip-components=1 && \ + rm /pipelines.tar.gz + +# Install FIX +RUN apt-get update && apt-get install -y build-essential libpcre3 libpcre3-dev fort77 xorg-dev libbz2-dev liblzma-dev libblas-dev gfortran gcc-multilib gobjc++ libreadline-dev bzip2 libcurl4-gnutls-dev default-jdk gdebi + +RUN cd /opt && \ + wget http://www.fmrib.ox.ac.uk/~steve/ftp/fix.tar.gz && \ + tar zxvf fix.tar.gz && \ + rm fix.tar.gz +RUN mv /opt/fix* /opt/fix + +RUN cd /opt && \ + wget https://cloud.r-project.org/bin/linux/ubuntu/trusty/r-base-core_3.4.4-1trusty0_amd64.deb && \ + wget https://cloud.r-project.org/bin/linux/ubuntu/trusty/r-base-dev_3.4.4-1trusty0_all.deb && \ + gdebi -n r-base-core_3.4.4-1trusty0_amd64.deb && \ + gdebi -n r-base-dev_3.4.4-1trusty0_all.deb && \ + apt-get install -y libssl-dev + +RUN R --vanilla -e "install.packages('coin', repos='http://cran.us.r-project.org', dependencies=TRUE)" -e "install.packages('strucchange', repos='http://cran.us.r-project.org', dependencies=TRUE)" -e "install.packages('https://cran.r-project.org/src/contrib/Archive/party/party_1.0-25.tar.gz', repos=NULL, type='source')" -e "install.packages('https://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_0.9-24.tar.gz', repos=NULL, type='source')" -e "install.packages('ROCR', repos='http://cran.us.r-project.org', dependencies=TRUE)" -e "install.packages('https://cran.r-project.org/src/contrib/Archive/e1071/e1071_1.6-7.tar.gz', repos=NULL, type='source')" -e "install.packages('https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-12.tar.gz', repos=NULL, type='source')" + +RUN mkdir /tmp/v83 && \ + cp /opt/fix*/compiled/Linux/x86_64/MCRInstaller.zip /tmp/v83 && \ + cd /tmp/v83 && \ + unzip MCRInstaller.zip + +COPY modified_files/MCR_installer_input_v83.txt /tmp/v83/MCR_installer_input.txt +RUN cd /tmp/v83 && ./install -mode silent -inputFile MCR_installer_input.txt + +# Ensure Dependencies for PostFix are met +RUN apt-get update +RUN mkdir /tmp/v81 && \ + cd /tmp/v81 && \ + wget http://ssd.mathworks.com/supportfiles/MCR_Runtime/R2013a/MCR_R2013a_glnxa64_installer.zip && \ + unzip MCR_R2013a_glnxa64_installer.zip +COPY modified_files/MCR_installer_input_v81.txt /tmp/v81/MCR_installer_input.txt +RUN cd /tmp/v81 && ./install -mode silent -inputFile MCR_installer_input.txt + +#Create necessary environment variables +RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh +ENV CARET7DIR=/usr/bin ENV HCPPIPEDIR=/opt/HCP-Pipelines -ENV HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates \ - HCPPIPEDIR_Bin=${HCPPIPEDIR}/global/binaries \ - HCPPIPEDIR_Config=${HCPPIPEDIR}/global/config \ - HCPPIPEDIR_PreFS=${HCPPIPEDIR}/PreFreeSurfer/scripts \ - HCPPIPEDIR_FS=${HCPPIPEDIR}/FreeSurfer/scripts \ - HCPPIPEDIR_PostFS=${HCPPIPEDIR}/PostFreeSurfer/scripts \ - HCPPIPEDIR_fMRISurf=${HCPPIPEDIR}/fMRISurface/scripts \ - HCPPIPEDIR_fMRIVol=${HCPPIPEDIR}/fMRIVolume/scripts \ - HCPPIPEDIR_tfMRI=${HCPPIPEDIR}/tfMRI/scripts \ - HCPPIPEDIR_dMRI=${HCPPIPEDIR}/DiffusionPreprocessing/scripts \ - HCPPIPEDIR_dMRITract=${HCPPIPEDIR}/DiffusionTractography/scripts \ - HCPPIPEDIR_Global=${HCPPIPEDIR}/global/scripts \ - HCPPIPEDIR_tfMRIAnalysis=${HCPPIPEDIR}/TaskfMRIAnalysis/scripts \ - MSMBin=${HCPPIPEDIR}/MSMBinaries +ENV HCPPIPEDIR_Templates=${HCPPIPEDIR}/global/templates +ENV HCPPIPEDIR_Bin=${HCPPIPEDIR}/global/binaries +ENV HCPPIPEDIR_Config=${HCPPIPEDIR}/global/config +ENV HCPPIPEDIR_PreFS=${HCPPIPEDIR}/PreFreeSurfer/scripts +ENV HCPPIPEDIR_FS=${HCPPIPEDIR}/FreeSurfer/scripts +ENV HCPPIPEDIR_PostFS=${HCPPIPEDIR}/PostFreeSurfer/scripts +ENV HCPPIPEDIR_fMRISurf=${HCPPIPEDIR}/fMRISurface/scripts +ENV HCPPIPEDIR_fMRIVol=${HCPPIPEDIR}/fMRIVolume/scripts +ENV HCPPIPEDIR_tfMRI=${HCPPIPEDIR}/tfMRI/scripts +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 + +# Install python Dependencies +RUN apt-get update && apt-get install -y --no-install-recommends python-pip python-six python-nibabel python-setuptools +RUN pip install pybids==0.5.1 +RUN pip install --upgrade pybids + + +#make /bids_dir and /output_dir +RUN mkdir /bids_dir && \ + mkdir /output_dir + +#create 360CortSurf_19Vol_parcel.dlabel.nii +RUN cd / && \ + wget https://github.umn.edu/hendr522/HCPPipelines/blob/master/modified_files/360CortSurf_19Vol_parcel.dlabel.nii ## Install the validator RUN apt-get update && \ @@ -144,7 +159,17 @@ RUN pip install pybids==0.5.1 ENV PYTHONPATH="" COPY run.py /run.py -RUN chmod +x /run.py +RUN chmod 555 /run.py COPY version /version +COPY IntendedFor.py /IntendedFor.py +COPY modified_files/fsl_sub /usr/lib/fsl/5.0/fsl_sub +COPY modified_files/settings.sh /opt/fix/settings.sh +COPY modified_files/360CortSurf_19Vol_parcel.dlabel.nii /360CortSurf_19Vol_parcel.dlabel.nii +COPY modified_files/PostFix.sh /opt/HCP-Pipelines/PostFix/PostFix.sh +COPY modified_files/run_prepareICAs.sh /opt/HCP-Pipelines/PostFix/Compiled_prepareICAs/distrib/run_prepareICAs.sh +COPY modified_files/RestingStateStats.sh /opt/HCP-Pipelines/RestingStateStats/RestingStateStats.sh +COPY modified_files/run_RestingStateStats.sh /opt/HCP-Pipelines/RestingStateStats/Compiled_RestingStateStats/distrib/run_RestingStateStats.sh + + ENTRYPOINT ["/run.py"] diff --git a/IntendedFor.py b/IntendedFor.py new file mode 100755 index 0000000..d858c25 --- /dev/null +++ b/IntendedFor.py @@ -0,0 +1,67 @@ + +#!/usr/bin/python +import json +import os +from glob import glob +import numpy + +""" +This script is designed to determine which field maps apply to discrete fMRI scans + +Author - Timothy J Hendrickson +""" + +def setup(subject_path): + if "ses" in os.listdir(subject_path)[0]: + for item in (os.listdir(subject_path)): + session_path = subject_path + '/'+ item + IntendedFor(session_path) + IntendedFor(subject_path) + +def IntendedFor(data_path): + for fmap in sorted(glob(data_path+'/fmap/*.json')): + with open(fmap, 'r') as f: + fmap_json = json.load(f) + f.close() + if "IntendedFor" in fmap_json: + del fmap_json["IntendedFor"] + shim_fmap = fmap_json["ShimSetting"] + patient_pos_fmap = fmap_json["ImageOrientationPatientDICOM"] + func_list = [] + for func in sorted(glob(data_path+'/func/*bold.json')): + with open(func, 'r') as g: + func_json = json.load(g) + shim_func = func_json["ShimSetting"] + patient_pos_func = func_json["ImageOrientationPatientDICOM"] + g.close() + if shim_fmap == shim_func: + func_nii = glob(data_path+'/func/' +func.split('/')[-1].split('.')[0]+".nii*")[0] + if "ses" in data_path: + func_nii = "/".join(func_nii.split("/")[-3:]) + func_list.append(func_nii) + else: + func_nii = "/".join(func_nii.split("/")[-2:]) + func_list.append(func_nii) + #elif patient_pos_fmap == patient_pos_func: + # shim_func_np = numpy.array(shim_func) + # shim_fmap_np = numpy.array(shim_fmap) + # diff_shims = shim_fmap_np - shim_func_np + # print("difference between fieldmap and functional scan is " + str(sum(abs(diff_shims)))) + # user_input = raw_input("Do you accept this difference? [y/n]: ") + # if user_input == 'y': + # func_nii = glob(data_path + '/func/' + func.split('/')[-1].split('.')[0] + ".nii*")[0] + # if "ses" in data_path: + # func_nii = "/".join(func_nii.split("/")[-3:]) + # func_list.append(func_nii) + # else: + # func_nii = "/".join(func_nii.split("/")[-2:]) + # func_list.append(func_nii) + # else: + # print(fmap + " does not have match yet...") + entry = {"IntendedFor": func_list} + + fmap_json.update(entry) + with open(fmap, 'w') as f: + json.dump(fmap_json, f) + f.close() + diff --git a/MCR_installer_input_v81.txt b/MCR_installer_input_v81.txt new file mode 100644 index 0000000..bd22df3 --- /dev/null +++ b/MCR_installer_input_v81.txt @@ -0,0 +1,314 @@ +################################################################## +## +## Use this file to specify parameters required by the installer at runtime. +## +## Instructions for using this file. +## +## 1. Create a copy of this template file and fill in the required +## information. +## +## 2. Uncomment only those lines that start with a single '#' +## and set the desired values. All allowed values for the +## parameters are defined in the comments section for each +## parameter. +## +## 3. Launch the installer from the command line, using the -inputFile option +## to specify the name of your installer initialization file. +## +## (Windows) setup.exe -inputFile +## (Mac/Unix) install -inputFile +## +## NOTE: +## If you want to run the activation application in silent +## mode immediately after the installer completes, you must create +## an activation initialization file and specify its name as the +## value of the activationPropertiesFile= option. You can also +## pass the name of the activation initialization file to the +## installer using the -activationPropertiesFile command line +## option. +## +################################################################## +## +## +## SPECIFY INSTALLATION FOLDER +## +## Example: +## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX +## (Unix) destinationFolder=/usr/local/RXXXX +## (Mac) destinationFolder=/Applications +## +## Set the desired value for destinationFolder and +## uncomment the line. + +destinationFolder=/usr/local/R2013a + +## +## SPECIFY FILE INSTALLATION KEY +## +## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx..... +## +## Set the desired value for fileInstallationKey and +## uncomment the line. +## +# fileInstallationKey= + +## +## ACCEPT LICENSE AGREEMENT +## +## You must agree to the license agreement to install MathWorks products. +## The license agreement can be found in the license.txt file at the +## root level of the installation DVD. +## +## Example: agreeToLicense=yes +## +## Set agreeToLicense value to yes or no and +## uncomment the line. + +agreeToLicense=yes + +## +## SPECIFY OUTPUT LOG +## +## Specify full path of file into which you want the results of the +## installation to be recorded. +## +## Example: +## (Windows) outputFile=C:\TEMP\mathworks_.log +## (Unix/Mac) outputFile=/tmp/mathworks_.log +## +## Set the desired value for outputFile and +## uncomment the line. + +# outputFile= + +## SPECIFY INSTALLER MODE +## +## interactive: Run the installer GUI, waiting for user input on all +## dialog boxes. +## +## silent: Run the installer without displaying the GUI. +## +## automated: Run the installer GUI, displaying all dialog boxes, but only +## waiting for user input on dialogs that are missing required +## input. +## +## Set mode value to either interactive, silent, or automated and +## uncomment the line. + +mode=silent + +## SPECIFY LENGTH OF TIME DIALOG BOXES ARE DISPLAYED +## +## Specify how long the installer dialog boxes are displayed, in milliseconds. +## +## NOTE: Use this value only if you set the installer mode to automated. +## +## By default, the dialog boxes display on the screen for one second. +## +## Example: (To specify a value of 1 second.) automatedModeTimeout=1000 +## +## Set the desired value for automatedModeTimeout and +## uncomment the line. + +# automatedModeTimeout= + +## SPECIFY ACTIVATION PROPERTIES FILE (For non-network license types only) +## +## Enter the path to an existing file that contains properties to configure +## the activation process. + +# activationPropertiesFile= + +########## Begin: Options for Network License Types ######### +## +## SPECIFY PATH TO LICENSE FILE (Required for network license types only) +## +## This value is required when installing either the License Manager or when +## installing as a Network End-User +## Example: +## (Windows) licensePath=C:\TEMP\license.dat +## (Unix) licensePath=/tmp/license.dat +## Set the desired value for licensePath and +## uncomment the line. + +# licensePath= + +## CHOOSE TO INSTALL LICENSE MANAGER (For network license types only) +## +## Installs license manager files to disk. +## +## NOTE: You only need to install the license manager files +## on your license server. +## +## Set lmgrFiles value to true or false and +## uncomment the line. + +# lmgrFiles= + +## INSTALL LICENSE MANAGER AS A SERVICE (For network license types only) +## +## Configure the license manager as a service on Windows. +## +## NOTE: Not applicable for Unix or Mac. +## +## NOTE: The lmgr_files option (set in previous step) must also be set to true. +## +## Set lmgrService value to true or false and +## uncomment the line. + +# lmgrService= + +########## End: Options for Network License Types ######### + + + +################# Begin - Windows Only Options ################ +## +## CHOOSE TO SET FILE ASSOCIATIONS +## +## Set to true if you want the installer to associate file types used by MathWorks +## products to this version of MATLAB, or false if you do not want the installer to +## associate MathWorks file types with this version of MATLAB. +## +## Default value is true. +## +## Set setFileAssoc value to true or false and +## uncomment the line. + +# setFileAssoc= + +## +## CHOOSE TO CREATE WINDOWS DESKTOP SHORTCUT +## +## Set to true if you would like the installer to create a desktop shortcut icon +## when MATLAB is installed or false if you don't want the shortcut created. +## +## Set desktopShortcut value to true or false and +## uncomment the line. + +# desktopShortcut= + +## CHOOSE TO ADD SHORTCUT TO WINDOWS START MENU +## +## Set to true if you would like the installer to create a Start Menu shortcut +## icon when MATLAB is installed or false if you don't want the shortcut created. +## +## Set startMenuShortcut value to true or false and +## uncomment the line. + +# startMenuShortcut= + +## CREATE a MATLAB Startup Accelerator task +## +## The MATLAB Startup Accelerator installer creates a +## system task to preload MATLAB into the system�s cache +## for faster startup. +## +## NOTE: By default, a MATLAB Startup Accelerator task will +## automatically be created. +## +## If you want a MATLAB Startup Accelerator task to be created, +## do not edit this section. +## +## Set createAccelTask value to false if you do not want to +## create an Accelerator task and uncomment the line. + +# createAccelTask= + +################ End - Windows Only Options ################ + + +## SPECIFY PRODUCTS YOU WANT TO INSTALL +## +## By default, the installer installs all the products and +## documentation for which you are licensed. Products you are not licensed for +## are not installed, even if they are listed here. +## +## Note: +## 1. To automatically install all your licensed products, do not edit +## any lines in this section. +## +## 2. To install a specific product or a subset of products for +## which you are licensed, uncomment the line for the product(s) you want +## to install. + +#product.Aerospace_Blockset +#product.Aerospace_Toolbox +#product.Bioinformatics_Toolbox +#product.Communications_System_Toolbox +#product.Computer_Vision_System_Toolbox +#product.Control_System_Toolbox +#product.Curve_Fitting_Toolbox +#product.DO_Qualification_Kit +#product.DSP_System_Toolbox +#product.Data_Acquisition_Toolbox +#product.Database_Toolbox +#product.Datafeed_Toolbox +#product.Econometrics_Toolbox +#product.Embedded_Coder +#product.Filter_Design_HDL_Coder +#product.Financial_Instruments_Toolbox +#product.Financial_Toolbox +#product.Fixed_Point_Designer +#product.Fuzzy_Logic_Toolbox +#product.Gauges_Blockset +#product.Global_Optimization_Toolbox +#product.HDL_Coder +#product.HDL_Verifier +#product.IEC_Certification_Kit +#product.Image_Acquisition_Toolbox +#product.Image_Processing_Toolbox +#product.Instrument_Control_Toolbox +#product.MATLAB +#product.MATLAB_Builder_EX +#product.MATLAB_Builder_JA +#product.MATLAB_Builder_NE +#product.MATLAB_Coder +#product.MATLAB_Compiler +#product.MATLAB_Distributed_Computing_Server +#product.MATLAB_Production_Server +#product.MATLAB_Report_Generator +#product.Mapping_Toolbox +#product.Model_Predictive_Control_Toolbox +#product.Model_Based_Calibration_Toolbox +#product.Neural_Network_Toolbox +#product.OPC_Toolbox +#product.Optimization_Toolbox +#product.Parallel_Computing_Toolbox +#product.Partial_Differential_Equation_Toolbox +#product.Phased_Array_System_Toolbox +#product.RF_Toolbox +#product.Real_Time_Windows_Target +#product.Robust_Control_Toolbox +#product.Signal_Processing_Toolbox +#product.SimBiology +#product.SimDriveline +#product.SimElectronics +#product.SimEvents +#product.SimHydraulics +#product.SimMechanics +#product.SimPowerSystems +#product.SimRF +#product.Simscape +#product.Simulink +#product.Simulink_3D_Animation +#product.Simulink_Code_Inspector +#product.Simulink_Coder +#product.Simulink_Control_Design +#product.Simulink_Design_Optimization +#product.Simulink_Design_Verifier +#product.Simulink_PLC_Coder +#product.Simulink_Report_Generator +#product.Simulink_Verification_and_Validation +#product.Spreadsheet_Link_EX +#product.Stateflow +#product.Statistics_Toolbox +#product.Symbolic_Math_Toolbox +#product.System_Identification_Toolbox +#product.SystemTest +#product.Trading_Toolbox +#product.Vehicle_Network_Toolbox +#product.Wavelet_Toolbox +#product.xPC_Target +#product.xPC_Target_Embedded_Option + diff --git a/MCR_installer_input_v83.txt b/MCR_installer_input_v83.txt new file mode 100644 index 0000000..5fb5e85 --- /dev/null +++ b/MCR_installer_input_v83.txt @@ -0,0 +1,317 @@ +################################################################## +## +## Use this file to specify parameters required by the installer at runtime. +## +## Instructions for using this file. +## +## 1. Create a copy of this template file and fill in the required +## information. +## +## 2. Uncomment only those lines that start with a single '#' +## and set the desired values. All allowed values for the +## parameters are defined in the comments section for each +## parameter. +## +## 3. Launch the installer from the command line, using the -inputFile option +## to specify the name of your installer initialization file. +## +## (Windows) setup.exe -inputFile +## (Mac/Unix) install -inputFile +## +## NOTE: +## If you want to run the activation application in silent +## mode immediately after the installer completes, you must create +## an activation initialization file and specify its name as the +## value of the activationPropertiesFile= option. You can also +## pass the name of the activation initialization file to the +## installer using the -activationPropertiesFile command line +## option. +## +################################################################## +## +## +## SPECIFY INSTALLATION FOLDER +## +## Example: +## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX +## (Unix) destinationFolder=/usr/local/RXXXX +## (Mac) destinationFolder=/Applications +## +## Set the desired value for destinationFolder and +## uncomment the line. + +destinationFolder=/usr/local/R2014a + +## +## SPECIFY FILE INSTALLATION KEY +## +## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx..... +## +## Set the desired value for fileInstallationKey and +## uncomment the line. +## +# fileInstallationKey= + +## +## ACCEPT LICENSE AGREEMENT +## +## You must agree to the license agreement to install MathWorks products. +## The license agreement can be found in the license.txt file at the +## root level of the installation DVD. +## +## Example: agreeToLicense=yes +## +## Set agreeToLicense value to yes or no and +## uncomment the line. + +agreeToLicense=yes + +## +## SPECIFY OUTPUT LOG +## +## Specify full path of file into which you want the results of the +## installation to be recorded. +## +## Example: +## (Windows) outputFile=C:\TEMP\mathworks_.log +## (Unix/Mac) outputFile=/tmp/mathworks_.log +## +## Set the desired value for outputFile and +## uncomment the line. + +outputFile=/tmp/mathworks_root.log + +## SPECIFY INSTALLER MODE +## +## interactive: Run the installer GUI, waiting for user input on all +## dialog boxes. +## +## silent: Run the installer without displaying the GUI. +## +## automated: Run the installer GUI, displaying all dialog boxes, but only +## waiting for user input on dialogs that are missing required +## input. +## +## Set mode value to either interactive, silent, or automated and +## uncomment the line. + +mode=silent + +## SPECIFY LENGTH OF TIME DIALOG BOXES ARE DISPLAYED +## +## Specify how long the installer dialog boxes are displayed, in milliseconds. +## +## NOTE: Use this value only if you set the installer mode to automated. +## +## By default, the dialog boxes display on the screen for one second. +## +## Example: (To specify a value of 1 second.) automatedModeTimeout=1000 +## +## Set the desired value for automatedModeTimeout and +## uncomment the line. + +# automatedModeTimeout= + +## SPECIFY ACTIVATION PROPERTIES FILE (For non-network license types only) +## +## Enter the path to an existing file that contains properties to configure +## the activation process. + +# activationPropertiesFile= + +########## Begin: Options for Network License Types ######### +## +## SPECIFY PATH TO LICENSE FILE (Required for network license types only) +## +## This value is required when installing either the License Manager or when +## installing as a Network End-User +## Example: +## (Windows) licensePath=C:\TEMP\license.dat +## (Unix) licensePath=/tmp/license.dat +## Set the desired value for licensePath and +## uncomment the line. + +# licensePath= + +## CHOOSE TO INSTALL LICENSE MANAGER (For network license types only) +## +## Installs license manager files to disk. +## +## NOTE: You only need to install the license manager files +## on your license server. +## +## Set lmgrFiles value to true or false and +## uncomment the line. + +# lmgrFiles= + +## INSTALL LICENSE MANAGER AS A SERVICE (For network license types only) +## +## Configure the license manager as a service on Windows. +## +## NOTE: Not applicable for Unix or Mac. +## +## NOTE: The lmgr_files option (set in previous step) must also be set to true. +## +## Set lmgrService value to true or false and +## uncomment the line. + +# lmgrService= + +########## End: Options for Network License Types ######### + + + +################# Begin - Windows Only Options ################ +## +## CHOOSE TO SET FILE ASSOCIATIONS +## +## Set to true if you want the installer to associate file types used by MathWorks +## products to this version of MATLAB, or false if you do not want the installer to +## associate MathWorks file types with this version of MATLAB. +## +## Default value is true. +## +## Set setFileAssoc value to true or false and +## uncomment the line. + +# setFileAssoc= + +## +## CHOOSE TO CREATE WINDOWS DESKTOP SHORTCUT +## +## Set to true if you would like the installer to create a desktop shortcut icon +## when MATLAB is installed or false if you don't want the shortcut created. +## +## Set desktopShortcut value to true or false and +## uncomment the line. + +# desktopShortcut= + +## CHOOSE TO ADD SHORTCUT TO WINDOWS START MENU +## +## Set to true if you would like the installer to create a Start Menu shortcut +## icon when MATLAB is installed or false if you don't want the shortcut created. +## +## Set startMenuShortcut value to true or false and +## uncomment the line. + +# startMenuShortcut= + +## CREATE a MATLAB Startup Accelerator task +## +## The MATLAB Startup Accelerator installer creates a +## system task to preload MATLAB into the system�s cache +## for faster startup. +## +## NOTE: By default, a MATLAB Startup Accelerator task will +## automatically be created. +## +## If you want a MATLAB Startup Accelerator task to be created, +## do not edit this section. +## +## Set createAccelTask value to false if you do not want to +## create an Accelerator task and uncomment the line. + +# createAccelTask= + +################ End - Windows Only Options ################ + + +## SPECIFY PRODUCTS YOU WANT TO INSTALL +## +## By default, the installer installs all the products and +## documentation for which you are licensed. Products you are not licensed for +## are not installed, even if they are listed here. +## +## Note: +## 1. To automatically install all your licensed products, do not edit +## any lines in this section. +## +## 2. To install a specific product or a subset of products for +## which you are licensed, uncomment the line for the product(s) you want +## to install. + +#product.Aerospace_Blockset +#product.Aerospace_Toolbox +#product.Bioinformatics_Toolbox +#product.Communications_System_Toolbox +#product.Computer_Vision_System_Toolbox +#product.Control_System_Toolbox +#product.Curve_Fitting_Toolbox +#product.DO_Qualification_Kit +#product.DSP_System_Toolbox +#product.Data_Acquisition_Toolbox +#product.Database_Toolbox +#product.Datafeed_Toolbox +#product.Econometrics_Toolbox +#product.Embedded_Coder +#product.Filter_Design_HDL_Coder +#product.Financial_Instruments_Toolbox +#product.Financial_Toolbox +#product.Fixed_Point_Designer +#product.Fuzzy_Logic_Toolbox +#product.Gauges_Blockset +#product.Global_Optimization_Toolbox +#product.HDL_Coder +#product.HDL_Verifier +#product.IEC_Certification_Kit +#product.Image_Acquisition_Toolbox +#product.Image_Processing_Toolbox +#product.Instrument_Control_Toolbox +#product.LTE_System_Toolbox +#product.MATLAB +#product.MATLAB_Builder_EX +#product.MATLAB_Builder_JA +#product.MATLAB_Builder_NE +#product.MATLAB_Coder +#product.MATLAB_Compiler +#product.MATLAB_Distributed_Computing_Server +#product.MATLAB_Production_Server +#product.MATLAB_Report_Generator +#product.Mapping_Toolbox +#product.Model_Predictive_Control_Toolbox +#product.Model_Based_Calibration_Toolbox +#product.Neural_Network_Toolbox +#product.OPC_Toolbox +#product.Optimization_Toolbox +#product.Parallel_Computing_Toolbox +#product.Partial_Differential_Equation_Toolbox +#product.Phased_Array_System_Toolbox +#product.Polyspace_Bug_Finder +#product.Polyspace_Code_Prover +#product.RF_Toolbox +#product.Real_Time_Windows_Target +#product.Robust_Control_Toolbox +#product.Signal_Processing_Toolbox +#product.SimBiology +#product.SimDriveline +#product.SimElectronics +#product.SimEvents +#product.SimHydraulics +#product.SimMechanics +#product.SimPowerSystems +#product.SimRF +#product.Simscape +#product.Simulink +#product.Simulink_3D_Animation +#product.Simulink_Code_Inspector +#product.Simulink_Coder +#product.Simulink_Control_Design +#product.Simulink_Design_Optimization +#product.Simulink_Design_Verifier +#product.Simulink_PLC_Coder +#product.Simulink_Real_Time +#product.Simulink_Report_Generator +#product.Simulink_Verification_and_Validation +#product.Spreadsheet_Link_EX +#product.Stateflow +#product.Statistics_Toolbox +#product.Symbolic_Math_Toolbox +#product.System_Identification_Toolbox +#product.SystemTest +#product.Trading_Toolbox +#product.Vehicle_Network_Toolbox +#product.Wavelet_Toolbox + + diff --git a/README.md b/README.md index 4b61aec..dde4cda 100644 --- a/README.md +++ b/README.md @@ -28,46 +28,47 @@ Please cite [Glasser et al. 2013][GlasserEtAl] and [Smith et al. 2013][SmithEtAl ### Usage This App has the following command line arguments: +``` PS C:\Users\filo> docker run -ti --rm -v /c/Users/filo/hcp_example_bids:/bids_dir:ro -v /c/Users/filo/test_output:/output bids/hcppipelines --help usage: run.py [-h] - [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]] - [--n_cpus N_CPUS] - [--stages {PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,DiffusionPreprocessing} [{PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,DiffusionPreprocessing} ...]] - --license_key LICENSE_KEY [-v] - bids_dir output_dir {participant} - - HCP Pipeliens BIDS App (T1w, T2w, fMRI) - - positional arguments: - bids_dir The directory with the input dataset formatted - according to the BIDS standard. - output_dir The directory where the output files should be stored. - If you are running group level analysis this folder - should be prepopulated with the results of - theparticipant level analysis. - {participant} Level of the analysis that will be performed. Multiple - participant level analyses can be run independently - (in parallel) using the same output_dir. - - optional arguments: - -h, --help show this help message and exit - --participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...] - The label of the participant that should be analyzed. - The label corresponds to sub- from - the BIDS spec (so it does not include "sub-"). If this - parameter is not provided all subjects should be - analyzed. Multiple participants can be specified with - a space separated list. - --n_cpus N_CPUS Number of CPUs/cores available to use. - --stages {PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,DiffusionPreprocessing} [{PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,DiffusionPreprocessing} ...] - Which stages to run. Space separated list. - --license_key LICENSE_KEY - FreeSurfer license key - letters and numbers after "*" - in the email you received after registration. To - register (for free) visit - https://surfer.nmr.mgh.harvard.edu/registration.html - -v, --version show program's version number and exit - + [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]] + [--n_cpus N_CPUS] + [--stages {PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,ICAFIX,PostFix,RestingStateStats,DiffusionPreprocessing} [{PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,ICAFIX,PostFix,RestingStateStats,DiffusionPreprocessing} ...]] + [--license_key LICENSE_KEY] [-v] + bids_dir output_dir {participant} + +HCP Pipelines BIDS App (T1w, T2w, fMRI) + +positional arguments: + bids_dir The directory with the input dataset formatted + according to the BIDS standard. + output_dir The directory where the output files should be stored. + If you are running group level analysis this folder + should be prepopulated with the results of + theparticipant level analysis. + {participant} Level of the analysis that will be performed. Multiple + participant level analyses can be run independently + (in parallel) using the same output_dir. + +optional arguments: + -h, --help show this help message and exit + --participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...] + The label of the participant that should be analyzed. + The label corresponds to sub- from + the BIDS spec (so it does not include "sub-"). If this + parameter is not provided all subjects should be + analyzed. Multiple participants can be specified with + a space separated list. + --n_cpus N_CPUS Number of CPUs/cores available to use. + --stages {PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,ICAFIX,PostFix,RestingStateStats,DiffusionPreprocessing} [{PreFreeSurfer,FreeSurfer,PostFreeSurfer,fMRIVolume,fMRISurface,ICAFIX,PostFix,RestingStateStats,DiffusionPreprocessing} ...] + Which stages to run. Space separated list. + --license_key LICENSE_KEY + FreeSurfer license key - letters and numbers after "*" + in the email you received after registration. To + register (for free) visit + https://surfer.nmr.mgh.harvard.edu/registration.html + -v, --version show program's version number and exit +``` To run it in participant level mode (for one participant): docker run -i --rm \ @@ -75,6 +76,23 @@ To run it in participant level mode (for one participant): -v /Users/filo/outputs:/outputs \ bids/hcppipelines \ /bids_dataset /outputs participant --participant_label 01 --license_key "XXXXXX" + +### Docker to Singularity Image Conversion + +To convert docker image to singularity you will need: +1) A system with docker +2) The docker image on that system (i.e. 'docker pull name/of/docker/image') +3) The docker image docker2singularity on that system ('docker pull docker2singularity') + +And the command: +``` + docker run --privileged -ti --rm \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /path/to/singularity/images/directory:/output \ + singularityware/docker2singularity \ + name/of/docker/image +``` + ### Commercial use @@ -101,13 +119,13 @@ If you are considering commercial use of this App please consult the relevant li ### TODO - - [ ] Add DiffusionProcessing stage + - [X] Add DiffusionProcessing stage - [ ] More testing for fMRI with different resolution - [ ] Run fMRI runs in parallel (when n_cpus present) - [ ] Add support for TOPUP and GE fieldmaps for structural scans (please get in touch if you can provide sample data) - [ ] Add support for Siemens and GE fieldmaps for fMRI scans (please get in touch if you can provide sample data) - [ ] Avoid copying fsaverage folder for every participant - - [ ] Add ICA FIX stage + - [X] Add ICA FIX stage - [ ] Add group level analysis - [ ] Add task fMRI model fitting diff --git a/fsl_sub b/fsl_sub new file mode 100755 index 0000000..7e017df --- /dev/null +++ b/fsl_sub @@ -0,0 +1,562 @@ +#!/bin/sh + +# Copyright (C) 2007-2014 University of Oxford +# Authors: Dave Flitney, Stephen Smith, Matthew Webster and Duncan Mortimer + +# Part of FSL - FMRIB's Software Library +# http://www.fmrib.ox.ac.uk/fsl +# fsl@fmrib.ox.ac.uk +# +# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance +# Imaging of the Brain), Department of Clinical Neurology, Oxford +# University, Oxford, UK +# +# +# LICENCE +# +# FMRIB Software Library, Release 5.0 (c) 2012, The University of +# Oxford (the "Software") +# +# The Software remains the property of the University of Oxford ("the +# University"). +# +# The Software is distributed "AS IS" under this Licence solely for +# non-commercial use in the hope that it will be useful, but in order +# that the University as a charitable foundation protects its assets for +# the benefit of its educational and research purposes, the University +# makes clear that no condition is made or to be implied, nor is any +# warranty given or to be implied, as to the accuracy of the Software, +# or that it will be suitable for any particular purpose or for use +# under any specific conditions. Furthermore, the University disclaims +# all responsibility for the use which is made of the Software. It +# further disclaims any liability for the outcomes arising from using +# the Software. +# +# The Licensee agrees to indemnify the University and hold the +# University harmless from and against any and all claims, damages and +# liabilities asserted by third parties (including claims for +# negligence) which arise directly or indirectly from the use of the +# Software or the sale of any products based on the Software. +# +# No part of the Software may be reproduced, modified, transmitted or +# transferred in any form or by any means, electronic or mechanical, +# without the express permission of the University. The permission of +# the University is not required if the said reproduction, modification, +# transmission or transference is done without financial return, the +# conditions of this Licence are imposed upon the receiver of the +# product, and all original and amended source code is included in any +# transmitted product. You may be held legally responsible for any +# copyright infringement that is caused or encouraged by your failure to +# abide by these terms and conditions. +# +# You are not permitted under this Licence to use this Software +# commercially. Use for which any financial return is received shall be +# defined as commercial use, and includes (1) integration of all or part +# of the source code or the Software into a product for sale or license +# by or on behalf of Licensee to third parties or (2) use of the +# Software or any derivative of it for research with the final aim of +# developing software products for sale or license to a third party or +# (3) use of the Software or any derivative of it for research with the +# final aim of developing non-software products for sale or license to a +# third party, or (4) use of the Software to provide any service to an +# external organisation for which payment is received. If you are +# interested in using the Software commercially, please contact Isis +# Innovation Limited ("Isis"), the technology transfer company of the +# University, to negotiate a licence. Contact details are: +# innovation@isis.ox.ac.uk quoting reference DE/9564. +export LC_ALL=C + +########################################################################### +# Edit this file in order to setup FSL to use your local compute +# cluster. +########################################################################### + +# Domain mail should be sent to if necessary. The complete address will be +# `whoami`@${fslcluster_mailto_domain} +fslcluster_mailto_domain=localhost +# When should the cluster engine send status email (see qsub -m ... docs) +# Don't send email by default; can be overidden by FSLCLUSTER_MAILOPTS +# environment variable +fslcluster_mailopts="${FSLCLUSTER_MAILOPTS:-n}" + +########################################################################### +# The following section determines what to do when fsl_sub is called +# by an FSL program. If SGE_ROOT is set it will attempt to pass the +# commands onto the cluster, otherwise it will run the commands +# itself. There are two values for the METHOD variable, "SGE" and +# "NONE". Note that a user can unset SGE_ROOT if they don't want the +# cluster to be used. +########################################################################### +METHOD=SGE +unset module +if [ "x$SGE_ROOT" = "x" ] ; then + METHOD=NONE +else + QCONF=`which qconf` + if [ "x$QCONF" = "x" ]; then + METHOD=NONE + echo "Warning: SGE_ROOT environment variable is set but Grid Engine software not found, will run locally" >&2 + fi +fi + +# define the default 'qsub' implementation to be used for cluster submission +qsub_cmd="qsub" + +# Allow to override the above automatic detection result with FSLPARALLEL +if [ -n "$FSLPARALLEL" ] ; then + # Whenever FSLPARALLEL is set enfore using SGE even if no SGE_ROOT is set + # which, for example, is the case on Debian systems running SGE + METHOD=SGE + # TODO: move cluster engine detection here to be able to support more than + # just SGE + if [ "$FSLPARALLEL" = "condor" ] ; then + # if condor shall be used, simply switch to Condor's qsub emulation + qsub_cmd="condor_qsub" + fi +else + METHOD=NONE +fi + +# stop submitted scripts from submitting jobs themselves +if [ "X$FSLSUBALREADYRUN" = "Xtrue" ] ; then + METHOD=NONE + echo "Warning: job on queue attempted to submit parallel jobs - running jobs serially instead" >&2 +fi + +if [ "X$METHOD" = "XNONE" ]; then + QCONF=echo +fi +FSLSUBALREADYRUN=true +export FSLSUBALREADYRUN + +########################################################################### +# The following auto-decides what cluster queue to use. The calling +# FSL program will probably use the -T option when calling fsl_sub, +# which tells fsl_sub how long (in minutes) the process is expected to +# take (in the case of the -t option, how long each line in the +# supplied file is expected to take). You need to setup the following +# list to map ranges of timings into your cluster queues - it doesn't +# matter how many you setup, that's up to you. +########################################################################### + +map_qname () +{ + # for Debian we can't do the stuff below, because it would be hard + # to determine how particular queues are meant to be used on any given + # system. Instead of translating into a queue name we specify proper + # resource limits, and let SGE decide what queue matches + # (qsub wants the time limit in seconds) + queueCmd="$queueCmd -l h_rt=$(echo "$1 * 60" | bc)" + if [ $1 -le 20 ] ; then + queue=veryshort.q + elif [ $1 -le 120 ] ; then + queue=short.q + elif [ $1 -le 1440 ] ; then + queue=long.q + else + queue=verylong.q + fi + queueCmd=" -q $queue " + + echo "Estimated time was $1 mins: queue name is $queue" +} + +########################################################################### +# Don't change the following (but keep scrolling down!) +########################################################################### + +OLD_POSIXLY_CORRECT=${POSIXLY_CORRECT} +POSIXLY_CORRECT=1 +export POSIXLY_CORRECT +command=`basename $0` + +usage () +{ + cat < + +$command gzip *.img *.hdr +$command -q short.q gzip *.img *.hdr +$command -a darwin regscript rawdata outputdir ... + + -T Estimated job length in minutes, used to let SGE select + an appropriate queue + -q Possible values for can be queried with + 'qconf -sql' + -a Architecture [e.g., darwin or lx24-amd64] + -p Lower priority [0:-1024] default = 0 + -M Who to email, default = `whoami`@localhost + -j Place a hold on this task until job jid has completed + -t Specify a task file of commands to execute in parallel + -N Specify jobname as it will appear on queue + -l Where to output logfiles + -m Change the SGE mail options, see qsub for details + -z If image or file already exists, do nothing and exit + -F Use flags embedded in scripts to set SGE queuing options + -s , Submit a multi-threaded task - requires a PE () to be + configured for the requested queues. + specifies the number of threads to run + -v Verbose mode. + +EOF + + exit 1 +} +# This part of the help is not applicable anymore +# +#Queues: +# +#There are several batch queues configured on the cluster, each with defined CPU +#time limits. All queues, except bigmem.q, have a 8GB memory limit. +# +#veryshort.q:This queue is for jobs which last under 30mins. +#short.q: This queue is for jobs which last up to 4h. +#long.q: This queue is for jobs which last less than 24h. Jobs run with a +# nice value of 10. +#verylong.q: This queue is for jobs which will take longer than 24h CPU time. +# There is one slot per node, and jobs on this queue have a nice value +# of 15. +#bigmem.q: This queue is like the verylong.q but has no memory limits. + + +nargs=$# +if [ $nargs -eq 0 ] ; then + usage +fi + +set -- `getopt T:q:a:p:M:j:t:z:N:Fvm:l:s: $*` +result=$? +if [ $result != 0 ] ; then + echo "What? Your arguments make no sense!" +fi + +if [ $nargs -eq 0 ] || [ $result != 0 ] ; then + usage +fi + +POSIXLY_CORRECT=${OLD_POSIXLY_CORRECT} +export POSIXLY_CORRECT + + +########################################################################### +# If you have a Parallel Environment configured for OpenMP tasks then +# the variable omp_pe should be set to the name you have defined for that +# PE. The script will work out which queues have that PE setup on them. +# Note, we support openmp tasks even when Grid Engine is not in use. +########################################################################### + +omp_pe='openmp' + +########################################################################### +# The following sets up the default queue name, which you may want to +# change. It also sets up the basic emailing control. +########################################################################### + +# SGE should already have a default queue, but allow for overwrite +queueCmd="" +if [ "x$FSLCLUSTER_DEFAULT_QUEUE" != "x" ] ; then + queueCmd=" -q $FSLCLUSTER_DEFAULT_QUEUE " +fi +mailto=`whoami`@${fslcluster_mailto_domain} +MailOpts=${fslcluster_mailopts} + + +########################################################################### +# In the following, you might want to change the behaviour of some +# flags so that they prepare the right arguments for the actual +# cluster queue submission program, in our case "qsub". +# +# -a sets is the cluster submission flag for controlling the required +# hardware architecture (normally not set by the calling program) +# +# -p set the priority of the job - ignore this if your cluster +# environment doesn't have priority control in this way. +# +# -j tells the cluster not to start this job until cluster job ID $jid +# has completed. You will need this feature. +# +# -t will pass on to the cluster software the name of a text file +# containing a set of commands to run in parallel; one command per +# line. +# +# -N option determines what the command will be called when you list +# running processes. +# +# -l tells the cluster what to call the standard output and standard +# -error logfiles for the submitted program. +########################################################################### + +if [ -z $FSLSUBVERBOSE ] ; then + verbose=0 +else + verbose=$FSLSUBVERBOSE; + echo "METHOD=$METHOD : args=$@" >&2 +fi + +scriptmode=0 + +while [ $1 != -- ] ; do + case $1 in + -z) + if [ -e $2 -o `${FSLDIR}/bin/imtest $2` = 1 ] ; then + exit 0 + fi + shift;; + -T) + map_qname $2 + shift;; + -q) + queue=$2 + queueCmd=" -q $queue " + $QCONF -sq $queue >/dev/null 2>&1 + if [ $? -eq 1 ]; then + echo "Invalid queue specified!" + exit 127 + fi + shift;; + -a) + acceptable_arch=no + available_archs=`qhost | tail -n +4 | awk '{print $2}' | sort | uniq` + for a in $available_archs; do + if [ $2 = $a ] ; then + acceptable_arch=yes + fi + done + if [ $acceptable_arch = yes ]; then + sge_arch="-l arch=$2" + else + echo "Sorry arch of $2 is not supported on this SGE configuration!" + echo "Should be one of:" $available_archs + exit 127 + fi + shift;; + -p) + sge_priority="-p $2" + shift;; + -M) + mailto=$2 + shift;; + -j) + jid=$2 + sge_hold="-hold_jid $jid" + shift;; + -t) + taskfile=$2 + if [ -f "$taskfile" ] ; then + tasks=`wc -l $taskfile | awk '{print $1}'` + if [ $tasks -ne 0 ]; then + sge_tasks="-t 1-$tasks" + else + echo "Task file ${taskfile} is empty" + echo "Should be a text file listing all the commands to run!" + exit -1 + fi + else + echo "Task file (${taskfile}) does not exist" + exit -1 + fi + shift;; + -N) + JobName=$2; + shift;; + -m) + MailOpts=$2; + shift;; + -l) + LogOpts="-o $2 -e $2"; + LogDir="${2}/"; + if [ ! -e ${2} ]; then + mkdir -p $2 + else + echo ${2} | grep '/dev/null' >/dev/null 2>&1 + if [ $? -eq 1 ] && [ -f ${2} ]; then + echo "Log destination is a file (should be a folder)" + exit -1 + fi + fi + shift;; + -F) + scriptmode=1; + ;; + -v) + verbose=1 + ;; + -s) + pe_string=$2; + peName=`echo $pe_string | cut -d',' -f 1` + peThreads=`echo $pe_string | cut -d',' -f 2` + shift;; + esac + shift # next flag +done +shift + +########################################################################### +# Don't change the following (but keep scrolling down!) +########################################################################### + +if [ -z "$taskfile" ] && [ -z "$1" ]; then + echo "Either supply a command to run or a parallel task file" + exit -1 +fi + +if [ -z "$taskfile" ] && [ ! -x "$1" ]; then + which $1 >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "The command you have requested cannot be found or is not executable" + exit -1 + fi +fi + +if [ "x$JobName" = x ] ; then + if [ "x$taskfile" != x ] ; then + JobName=`basename $taskfile` + else + JobName=`basename $1` + fi +fi + +if [ "x$tasks" != "x" ] && [ "x$@" != "x" ] ; then + echo "Spurious input after parsing command line: \"$@\"!" + echo "You appear to have specified both a task file and a command to run" + exit -1 +fi + +if [ "x$peName" != "x" ]; then + # If the PE name is 'openmp' then limit the number of threads to those specified + + if [ "X$peName" = "X$omp_pe" ]; then + OMP_NUM_THREADS=$peThreads + export OMP_NUM_THREADS + fi + +fi + +case $METHOD in + +########################################################################### +# The following is the main call to the cluster, using the "qsub" SGE +# program. If $tasks has not been set then qsub is running a single +# command, otherwise qsub is processing a text file of parallel +# commands. +########################################################################### + + SGE) + ########################################################################### + # Test Parallel environment options + ########################################################################### + if [ "x$peName" != x ]; then + # Is this a configured PE? + + $QCONF -sp $peName >/dev/null 2>&1 + + if [ $? -eq 1 ]; then + echo $@ + echo "$peName is not a valid PE" + exit -1 + fi + + if [ "x$queue" = "x" ] ; then + echo $@ + echo "No queue specified." + exit -1 + fi + # Get a list of queues configured for this PE and confirm that the queue + # we have submitted to has that PE set up. + qstat -g c -pe $peName >/dev/null 2>&1 + if [ $? -eq 1 ]; then + echo "No parallel environments configured!" + exit -1 + fi + + qstat -g c -pe $peName | sed '1,2d' | awk '{ print $1 }' | grep ^$queue >/dev/null 2>&1 + + if [ $? -eq 1 ]; then + echo $@ + echo "PE $peName is not configured on $queue" + exit -1 + fi + + # The -w e option will result in the job failing if there are insufficient slots + # on any of the cluster nodes + pe_options="-pe $peName $peThreads -w e" + + fi + + if [ "x$tasks" = "x" ] ; then + if [ $scriptmode -ne 1 ] ; then + sge_command="$qsub_cmd -V -cwd -shell n -b y -r y $queueCmd $pe_options -M $mailto -N $JobName -m $MailOpts $LogOpts $sge_arch $sge_hold" + else + sge_command="$qsub_cmd $LogOpts $sge_arch $sge_hold" + fi + if [ $verbose -eq 1 ] ; then + echo sge_command: $sge_command >&2 + echo executing: $@ >&2 + fi + exec $sge_command $@ | awk '{print $3}' + else + sge_command="$qsub_cmd -V -cwd $queueCmd $pe_options -M $mailto -N $JobName -m $MailOpts $LogOpts $sge_arch $sge_hold $sge_tasks" + if [ $verbose -eq 1 ] ; then + echo sge_command: $sge_command >&2 + echo control file: $taskfile >&2 + fi + exec $sge_command <&2 + fi + + /bin/sh < ${LogDir}${JobName}.o$$ 2> ${LogDir}${JobName}.e$$ +$@ +EOF1 + ERR=$? + if [ $ERR -ne 0 ] ; then + cat ${LogDir}${JobName}.e$$ >&2 + exit $ERR + fi + else + if [ $verbose -eq 1 ] ; then + echo "Running commands in: $taskfile" >&2 + fi + + n=1 + while [ $n -le $tasks ] ; do + line=`sed -n -e ''${n}'p' $taskfile` + if [ $verbose -eq 1 ] ; then + echo executing: $line >&2 + fi + /bin/sh < ${LogDir}${JobName}.o$$.$n 2> ${LogDir}${JobName}.e$$.$n +$line +EOF2 + n=`expr $n + 1` + done + fi + echo $$ + ;; + +esac + +########################################################################### +# Done. +########################################################################### + diff --git a/modified_files/360CortSurf_19Vol_parcel.dlabel.nii b/modified_files/360CortSurf_19Vol_parcel.dlabel.nii new file mode 100755 index 0000000..d131d9f Binary files /dev/null and b/modified_files/360CortSurf_19Vol_parcel.dlabel.nii differ diff --git a/modified_files/MCR_installer_input_v81.txt b/modified_files/MCR_installer_input_v81.txt new file mode 100755 index 0000000..bd22df3 --- /dev/null +++ b/modified_files/MCR_installer_input_v81.txt @@ -0,0 +1,314 @@ +################################################################## +## +## Use this file to specify parameters required by the installer at runtime. +## +## Instructions for using this file. +## +## 1. Create a copy of this template file and fill in the required +## information. +## +## 2. Uncomment only those lines that start with a single '#' +## and set the desired values. All allowed values for the +## parameters are defined in the comments section for each +## parameter. +## +## 3. Launch the installer from the command line, using the -inputFile option +## to specify the name of your installer initialization file. +## +## (Windows) setup.exe -inputFile +## (Mac/Unix) install -inputFile +## +## NOTE: +## If you want to run the activation application in silent +## mode immediately after the installer completes, you must create +## an activation initialization file and specify its name as the +## value of the activationPropertiesFile= option. You can also +## pass the name of the activation initialization file to the +## installer using the -activationPropertiesFile command line +## option. +## +################################################################## +## +## +## SPECIFY INSTALLATION FOLDER +## +## Example: +## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX +## (Unix) destinationFolder=/usr/local/RXXXX +## (Mac) destinationFolder=/Applications +## +## Set the desired value for destinationFolder and +## uncomment the line. + +destinationFolder=/usr/local/R2013a + +## +## SPECIFY FILE INSTALLATION KEY +## +## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx..... +## +## Set the desired value for fileInstallationKey and +## uncomment the line. +## +# fileInstallationKey= + +## +## ACCEPT LICENSE AGREEMENT +## +## You must agree to the license agreement to install MathWorks products. +## The license agreement can be found in the license.txt file at the +## root level of the installation DVD. +## +## Example: agreeToLicense=yes +## +## Set agreeToLicense value to yes or no and +## uncomment the line. + +agreeToLicense=yes + +## +## SPECIFY OUTPUT LOG +## +## Specify full path of file into which you want the results of the +## installation to be recorded. +## +## Example: +## (Windows) outputFile=C:\TEMP\mathworks_.log +## (Unix/Mac) outputFile=/tmp/mathworks_.log +## +## Set the desired value for outputFile and +## uncomment the line. + +# outputFile= + +## SPECIFY INSTALLER MODE +## +## interactive: Run the installer GUI, waiting for user input on all +## dialog boxes. +## +## silent: Run the installer without displaying the GUI. +## +## automated: Run the installer GUI, displaying all dialog boxes, but only +## waiting for user input on dialogs that are missing required +## input. +## +## Set mode value to either interactive, silent, or automated and +## uncomment the line. + +mode=silent + +## SPECIFY LENGTH OF TIME DIALOG BOXES ARE DISPLAYED +## +## Specify how long the installer dialog boxes are displayed, in milliseconds. +## +## NOTE: Use this value only if you set the installer mode to automated. +## +## By default, the dialog boxes display on the screen for one second. +## +## Example: (To specify a value of 1 second.) automatedModeTimeout=1000 +## +## Set the desired value for automatedModeTimeout and +## uncomment the line. + +# automatedModeTimeout= + +## SPECIFY ACTIVATION PROPERTIES FILE (For non-network license types only) +## +## Enter the path to an existing file that contains properties to configure +## the activation process. + +# activationPropertiesFile= + +########## Begin: Options for Network License Types ######### +## +## SPECIFY PATH TO LICENSE FILE (Required for network license types only) +## +## This value is required when installing either the License Manager or when +## installing as a Network End-User +## Example: +## (Windows) licensePath=C:\TEMP\license.dat +## (Unix) licensePath=/tmp/license.dat +## Set the desired value for licensePath and +## uncomment the line. + +# licensePath= + +## CHOOSE TO INSTALL LICENSE MANAGER (For network license types only) +## +## Installs license manager files to disk. +## +## NOTE: You only need to install the license manager files +## on your license server. +## +## Set lmgrFiles value to true or false and +## uncomment the line. + +# lmgrFiles= + +## INSTALL LICENSE MANAGER AS A SERVICE (For network license types only) +## +## Configure the license manager as a service on Windows. +## +## NOTE: Not applicable for Unix or Mac. +## +## NOTE: The lmgr_files option (set in previous step) must also be set to true. +## +## Set lmgrService value to true or false and +## uncomment the line. + +# lmgrService= + +########## End: Options for Network License Types ######### + + + +################# Begin - Windows Only Options ################ +## +## CHOOSE TO SET FILE ASSOCIATIONS +## +## Set to true if you want the installer to associate file types used by MathWorks +## products to this version of MATLAB, or false if you do not want the installer to +## associate MathWorks file types with this version of MATLAB. +## +## Default value is true. +## +## Set setFileAssoc value to true or false and +## uncomment the line. + +# setFileAssoc= + +## +## CHOOSE TO CREATE WINDOWS DESKTOP SHORTCUT +## +## Set to true if you would like the installer to create a desktop shortcut icon +## when MATLAB is installed or false if you don't want the shortcut created. +## +## Set desktopShortcut value to true or false and +## uncomment the line. + +# desktopShortcut= + +## CHOOSE TO ADD SHORTCUT TO WINDOWS START MENU +## +## Set to true if you would like the installer to create a Start Menu shortcut +## icon when MATLAB is installed or false if you don't want the shortcut created. +## +## Set startMenuShortcut value to true or false and +## uncomment the line. + +# startMenuShortcut= + +## CREATE a MATLAB Startup Accelerator task +## +## The MATLAB Startup Accelerator installer creates a +## system task to preload MATLAB into the system�s cache +## for faster startup. +## +## NOTE: By default, a MATLAB Startup Accelerator task will +## automatically be created. +## +## If you want a MATLAB Startup Accelerator task to be created, +## do not edit this section. +## +## Set createAccelTask value to false if you do not want to +## create an Accelerator task and uncomment the line. + +# createAccelTask= + +################ End - Windows Only Options ################ + + +## SPECIFY PRODUCTS YOU WANT TO INSTALL +## +## By default, the installer installs all the products and +## documentation for which you are licensed. Products you are not licensed for +## are not installed, even if they are listed here. +## +## Note: +## 1. To automatically install all your licensed products, do not edit +## any lines in this section. +## +## 2. To install a specific product or a subset of products for +## which you are licensed, uncomment the line for the product(s) you want +## to install. + +#product.Aerospace_Blockset +#product.Aerospace_Toolbox +#product.Bioinformatics_Toolbox +#product.Communications_System_Toolbox +#product.Computer_Vision_System_Toolbox +#product.Control_System_Toolbox +#product.Curve_Fitting_Toolbox +#product.DO_Qualification_Kit +#product.DSP_System_Toolbox +#product.Data_Acquisition_Toolbox +#product.Database_Toolbox +#product.Datafeed_Toolbox +#product.Econometrics_Toolbox +#product.Embedded_Coder +#product.Filter_Design_HDL_Coder +#product.Financial_Instruments_Toolbox +#product.Financial_Toolbox +#product.Fixed_Point_Designer +#product.Fuzzy_Logic_Toolbox +#product.Gauges_Blockset +#product.Global_Optimization_Toolbox +#product.HDL_Coder +#product.HDL_Verifier +#product.IEC_Certification_Kit +#product.Image_Acquisition_Toolbox +#product.Image_Processing_Toolbox +#product.Instrument_Control_Toolbox +#product.MATLAB +#product.MATLAB_Builder_EX +#product.MATLAB_Builder_JA +#product.MATLAB_Builder_NE +#product.MATLAB_Coder +#product.MATLAB_Compiler +#product.MATLAB_Distributed_Computing_Server +#product.MATLAB_Production_Server +#product.MATLAB_Report_Generator +#product.Mapping_Toolbox +#product.Model_Predictive_Control_Toolbox +#product.Model_Based_Calibration_Toolbox +#product.Neural_Network_Toolbox +#product.OPC_Toolbox +#product.Optimization_Toolbox +#product.Parallel_Computing_Toolbox +#product.Partial_Differential_Equation_Toolbox +#product.Phased_Array_System_Toolbox +#product.RF_Toolbox +#product.Real_Time_Windows_Target +#product.Robust_Control_Toolbox +#product.Signal_Processing_Toolbox +#product.SimBiology +#product.SimDriveline +#product.SimElectronics +#product.SimEvents +#product.SimHydraulics +#product.SimMechanics +#product.SimPowerSystems +#product.SimRF +#product.Simscape +#product.Simulink +#product.Simulink_3D_Animation +#product.Simulink_Code_Inspector +#product.Simulink_Coder +#product.Simulink_Control_Design +#product.Simulink_Design_Optimization +#product.Simulink_Design_Verifier +#product.Simulink_PLC_Coder +#product.Simulink_Report_Generator +#product.Simulink_Verification_and_Validation +#product.Spreadsheet_Link_EX +#product.Stateflow +#product.Statistics_Toolbox +#product.Symbolic_Math_Toolbox +#product.System_Identification_Toolbox +#product.SystemTest +#product.Trading_Toolbox +#product.Vehicle_Network_Toolbox +#product.Wavelet_Toolbox +#product.xPC_Target +#product.xPC_Target_Embedded_Option + diff --git a/modified_files/MCR_installer_input_v83.txt b/modified_files/MCR_installer_input_v83.txt new file mode 100755 index 0000000..5fb5e85 --- /dev/null +++ b/modified_files/MCR_installer_input_v83.txt @@ -0,0 +1,317 @@ +################################################################## +## +## Use this file to specify parameters required by the installer at runtime. +## +## Instructions for using this file. +## +## 1. Create a copy of this template file and fill in the required +## information. +## +## 2. Uncomment only those lines that start with a single '#' +## and set the desired values. All allowed values for the +## parameters are defined in the comments section for each +## parameter. +## +## 3. Launch the installer from the command line, using the -inputFile option +## to specify the name of your installer initialization file. +## +## (Windows) setup.exe -inputFile +## (Mac/Unix) install -inputFile +## +## NOTE: +## If you want to run the activation application in silent +## mode immediately after the installer completes, you must create +## an activation initialization file and specify its name as the +## value of the activationPropertiesFile= option. You can also +## pass the name of the activation initialization file to the +## installer using the -activationPropertiesFile command line +## option. +## +################################################################## +## +## +## SPECIFY INSTALLATION FOLDER +## +## Example: +## (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX +## (Unix) destinationFolder=/usr/local/RXXXX +## (Mac) destinationFolder=/Applications +## +## Set the desired value for destinationFolder and +## uncomment the line. + +destinationFolder=/usr/local/R2014a + +## +## SPECIFY FILE INSTALLATION KEY +## +## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx..... +## +## Set the desired value for fileInstallationKey and +## uncomment the line. +## +# fileInstallationKey= + +## +## ACCEPT LICENSE AGREEMENT +## +## You must agree to the license agreement to install MathWorks products. +## The license agreement can be found in the license.txt file at the +## root level of the installation DVD. +## +## Example: agreeToLicense=yes +## +## Set agreeToLicense value to yes or no and +## uncomment the line. + +agreeToLicense=yes + +## +## SPECIFY OUTPUT LOG +## +## Specify full path of file into which you want the results of the +## installation to be recorded. +## +## Example: +## (Windows) outputFile=C:\TEMP\mathworks_.log +## (Unix/Mac) outputFile=/tmp/mathworks_.log +## +## Set the desired value for outputFile and +## uncomment the line. + +outputFile=/tmp/mathworks_root.log + +## SPECIFY INSTALLER MODE +## +## interactive: Run the installer GUI, waiting for user input on all +## dialog boxes. +## +## silent: Run the installer without displaying the GUI. +## +## automated: Run the installer GUI, displaying all dialog boxes, but only +## waiting for user input on dialogs that are missing required +## input. +## +## Set mode value to either interactive, silent, or automated and +## uncomment the line. + +mode=silent + +## SPECIFY LENGTH OF TIME DIALOG BOXES ARE DISPLAYED +## +## Specify how long the installer dialog boxes are displayed, in milliseconds. +## +## NOTE: Use this value only if you set the installer mode to automated. +## +## By default, the dialog boxes display on the screen for one second. +## +## Example: (To specify a value of 1 second.) automatedModeTimeout=1000 +## +## Set the desired value for automatedModeTimeout and +## uncomment the line. + +# automatedModeTimeout= + +## SPECIFY ACTIVATION PROPERTIES FILE (For non-network license types only) +## +## Enter the path to an existing file that contains properties to configure +## the activation process. + +# activationPropertiesFile= + +########## Begin: Options for Network License Types ######### +## +## SPECIFY PATH TO LICENSE FILE (Required for network license types only) +## +## This value is required when installing either the License Manager or when +## installing as a Network End-User +## Example: +## (Windows) licensePath=C:\TEMP\license.dat +## (Unix) licensePath=/tmp/license.dat +## Set the desired value for licensePath and +## uncomment the line. + +# licensePath= + +## CHOOSE TO INSTALL LICENSE MANAGER (For network license types only) +## +## Installs license manager files to disk. +## +## NOTE: You only need to install the license manager files +## on your license server. +## +## Set lmgrFiles value to true or false and +## uncomment the line. + +# lmgrFiles= + +## INSTALL LICENSE MANAGER AS A SERVICE (For network license types only) +## +## Configure the license manager as a service on Windows. +## +## NOTE: Not applicable for Unix or Mac. +## +## NOTE: The lmgr_files option (set in previous step) must also be set to true. +## +## Set lmgrService value to true or false and +## uncomment the line. + +# lmgrService= + +########## End: Options for Network License Types ######### + + + +################# Begin - Windows Only Options ################ +## +## CHOOSE TO SET FILE ASSOCIATIONS +## +## Set to true if you want the installer to associate file types used by MathWorks +## products to this version of MATLAB, or false if you do not want the installer to +## associate MathWorks file types with this version of MATLAB. +## +## Default value is true. +## +## Set setFileAssoc value to true or false and +## uncomment the line. + +# setFileAssoc= + +## +## CHOOSE TO CREATE WINDOWS DESKTOP SHORTCUT +## +## Set to true if you would like the installer to create a desktop shortcut icon +## when MATLAB is installed or false if you don't want the shortcut created. +## +## Set desktopShortcut value to true or false and +## uncomment the line. + +# desktopShortcut= + +## CHOOSE TO ADD SHORTCUT TO WINDOWS START MENU +## +## Set to true if you would like the installer to create a Start Menu shortcut +## icon when MATLAB is installed or false if you don't want the shortcut created. +## +## Set startMenuShortcut value to true or false and +## uncomment the line. + +# startMenuShortcut= + +## CREATE a MATLAB Startup Accelerator task +## +## The MATLAB Startup Accelerator installer creates a +## system task to preload MATLAB into the system�s cache +## for faster startup. +## +## NOTE: By default, a MATLAB Startup Accelerator task will +## automatically be created. +## +## If you want a MATLAB Startup Accelerator task to be created, +## do not edit this section. +## +## Set createAccelTask value to false if you do not want to +## create an Accelerator task and uncomment the line. + +# createAccelTask= + +################ End - Windows Only Options ################ + + +## SPECIFY PRODUCTS YOU WANT TO INSTALL +## +## By default, the installer installs all the products and +## documentation for which you are licensed. Products you are not licensed for +## are not installed, even if they are listed here. +## +## Note: +## 1. To automatically install all your licensed products, do not edit +## any lines in this section. +## +## 2. To install a specific product or a subset of products for +## which you are licensed, uncomment the line for the product(s) you want +## to install. + +#product.Aerospace_Blockset +#product.Aerospace_Toolbox +#product.Bioinformatics_Toolbox +#product.Communications_System_Toolbox +#product.Computer_Vision_System_Toolbox +#product.Control_System_Toolbox +#product.Curve_Fitting_Toolbox +#product.DO_Qualification_Kit +#product.DSP_System_Toolbox +#product.Data_Acquisition_Toolbox +#product.Database_Toolbox +#product.Datafeed_Toolbox +#product.Econometrics_Toolbox +#product.Embedded_Coder +#product.Filter_Design_HDL_Coder +#product.Financial_Instruments_Toolbox +#product.Financial_Toolbox +#product.Fixed_Point_Designer +#product.Fuzzy_Logic_Toolbox +#product.Gauges_Blockset +#product.Global_Optimization_Toolbox +#product.HDL_Coder +#product.HDL_Verifier +#product.IEC_Certification_Kit +#product.Image_Acquisition_Toolbox +#product.Image_Processing_Toolbox +#product.Instrument_Control_Toolbox +#product.LTE_System_Toolbox +#product.MATLAB +#product.MATLAB_Builder_EX +#product.MATLAB_Builder_JA +#product.MATLAB_Builder_NE +#product.MATLAB_Coder +#product.MATLAB_Compiler +#product.MATLAB_Distributed_Computing_Server +#product.MATLAB_Production_Server +#product.MATLAB_Report_Generator +#product.Mapping_Toolbox +#product.Model_Predictive_Control_Toolbox +#product.Model_Based_Calibration_Toolbox +#product.Neural_Network_Toolbox +#product.OPC_Toolbox +#product.Optimization_Toolbox +#product.Parallel_Computing_Toolbox +#product.Partial_Differential_Equation_Toolbox +#product.Phased_Array_System_Toolbox +#product.Polyspace_Bug_Finder +#product.Polyspace_Code_Prover +#product.RF_Toolbox +#product.Real_Time_Windows_Target +#product.Robust_Control_Toolbox +#product.Signal_Processing_Toolbox +#product.SimBiology +#product.SimDriveline +#product.SimElectronics +#product.SimEvents +#product.SimHydraulics +#product.SimMechanics +#product.SimPowerSystems +#product.SimRF +#product.Simscape +#product.Simulink +#product.Simulink_3D_Animation +#product.Simulink_Code_Inspector +#product.Simulink_Coder +#product.Simulink_Control_Design +#product.Simulink_Design_Optimization +#product.Simulink_Design_Verifier +#product.Simulink_PLC_Coder +#product.Simulink_Real_Time +#product.Simulink_Report_Generator +#product.Simulink_Verification_and_Validation +#product.Spreadsheet_Link_EX +#product.Stateflow +#product.Statistics_Toolbox +#product.Symbolic_Math_Toolbox +#product.System_Identification_Toolbox +#product.SystemTest +#product.Trading_Toolbox +#product.Vehicle_Network_Toolbox +#product.Wavelet_Toolbox + + diff --git a/modified_files/PostFix.sh b/modified_files/PostFix.sh new file mode 100755 index 0000000..4a7d1ec --- /dev/null +++ b/modified_files/PostFix.sh @@ -0,0 +1,389 @@ +#!/bin/bash + +#~ND~FORMAT~MARKDOWN~ +#~ND~START~ +# +# # PostFix.sh +# +# ## Copyright Notice +# +# Copyright (C) 2015 The Human Connectome Project +# +# * Washington University in St. Louis +# * University of Minnesota +# * Oxford University +# +# ## Author(s) +# +# * Matthew F. Glasser, Department of Anatomy and Neurobiology, Washington University in St. Louis +# * Timothy B. Brown, Neuroinformatics Research Group, Washington University in St. Louis +# +# ## Product +# +# [Human Connectome Project][HCP] (HCP) Pipelines +# +# ## License +# +# See the [LICENSE](https://github.com/Washington-Univesity/Pipelines/blob/master/LICENSE.md) file +# +# ## Description +# +# TBW +# +# ## Prerequisites +# +# ### Previous Processing +# +# The necessary input files for this processing come from +# +# * ICA FIX processing +# +# ### Installed Software +# +# * Connectome Workbench (v1.0 or above) +# * FSL (version 5.0.6 or above) +# +# ### Environment Variables +# +# * HCPPIPEDIR +# * CARET7DIR +# * FSLDIR +# +# +# [HCP]: http://www.humanconnectome.org +# +#~ND~END~ + +# ------------------------------------------------------------------------------ +# Code Start +# ------------------------------------------------------------------------------ + +# If any commands exit with non-zero value, this script exits +set -e +g_script_name=`basename ${0}` + +# ------------------------------------------------------------------------------ +# Load function libraries +# ------------------------------------------------------------------------------ + +source ${HCPPIPEDIR}/global/scripts/log.shlib # Logging related functions +log_SetToolName "${g_script_name}" + +source ${HCPPIPEDIR}/global/scripts/fsl_version.shlib # Function for getting FSL version + +# +# Function Description: +# Document Tool Versions +# +show_tool_versions() { + # Show HCP pipelines version + log_Msg "Showing HCP Pipelines version" + cat ${HCPPIPEDIR}/version.txt + + # Show wb_command version + log_Msg "Showing wb_command version" + ${CARET7DIR}/wb_command -version + + # Show fsl version + log_Msg "Showing FSL version" + fsl_version_get fsl_ver + log_Msg "FSL version: ${fsl_ver}" +} + +# +# Function Description: +# Show usage information for this script +# +usage() +{ + echo "" + echo " Compute PostFix ..." + echo "" + echo " Usage: ${g_script_name} " + echo "" + echo " Options: [ ] = optional; < > = user supplied value" + echo "" + echo " [--help] : show usage information and exit" + echo " --path= OR --study-folder=" + echo " --subject=" + echo " --fmri-name=" + echo " --high-pass=" + echo " --template-scene-dual-screen=