diff --git a/Dockerfile b/Dockerfile index 151ae61..fa98f40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,28 +18,17 @@ RUN apt-get update && apt-get install -y --force-yes \ ############################ -# FUZZY +# Install the Flywheel SDK -RUN pip install --upgrade pip && \ - pip install fuzzywuzzy && \ - pip install fuzzywuzzy[speedup] +RUN pip install flywheel-sdk ############################ -# Install the Flywheel SDK +# FUZZY -WORKDIR /opt/flywheel -# Commit for version of SDK to build -ENV COMMIT bf2e0d6 -ENV LD_LIBRARY_PATH_TMP ${LD_LIBRARY_PATH} -ENV LD_LIBRARY_PATH ' ' -RUN git clone https://github.com/flywheel-io/sdk workspace/src/flywheel.io/sdk -RUN ln -s workspace/src/flywheel.io/sdk sdk -RUN cd sdk && git checkout $COMMIT && cd ../ -RUN sdk/make.sh -RUN sdk/bridge/make.sh -ENV PYTHONPATH /opt/flywheel/workspace/src/flywheel.io/sdk/bridge/dist/python/flywheel -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH_TMP} +RUN pip install --upgrade pip && \ + pip install fuzzywuzzy && \ + pip install fuzzywuzzy[speedup] ############################ diff --git a/fw_sdk_functions.py b/fw_sdk_functions.py index d55e208..e187c1b 100644 --- a/fw_sdk_functions.py +++ b/fw_sdk_functions.py @@ -17,14 +17,13 @@ def get_diffusion_acquisitions(acquisitions, diffusion_acquisition_label): # Find diffusion acquisitions by finding acquisitions with a diffusion type and a bvec file diffusion_acquisitions = [ x for x in acquisitions if [y for y in x['files'] - if y.has_key('measurements') and 'diffusion' in y['measurements']] + if y.classification.has_key('Measurement') and 'Diffusion' in y.classification['Measurement']] and [z for z in x['files'] if z['type'] == 'bvec' or z['type'] == 'bval'] ] # Determine acquisitions to use based on label fuzzy matching if len(diffusion_acquisitions) == 0: - print('No Diffusion acquisitions found! Either classification was not set or required \ - files (bvec, nifti, bval) do not exist in any aquisitions.') + print('No Diffusion acquisitions found! Either classification was not set or required files (bvec, nifti, bval) do not exist in any aquisitions.') return diffusion_acquisitions if len(diffusion_acquisitions) > 2: @@ -62,7 +61,7 @@ def get_anatomical_acquisitions(acquisitions, anatomical_acquisition_label): # Find diffusion acquisitions by finding acquisitions with a diffusion type and a bvec file anatomical_acquisitions = [ x for x in acquisitions if [y for y in x['files'] - if y.has_key('measurements') and 'anatomy_t1' in y['measurements']] + if y.classification.has_key('Measurement') and 'T1' in y.classification['Measurement']] and [z for z in x['files'] if z['type'] == 'nifti' ] ] else: diff --git a/manifest.json b/manifest.json index 7c5f128..0d49069 100644 --- a/manifest.json +++ b/manifest.json @@ -9,9 +9,12 @@ "source": "https://github.com/scitran-apps/afq-pipeline-sdk", "license": "Other", "flywheel": "0", - "version": "1.0.2", + "version": "1.1.0", "custom": { - "docker-image": "scitran/afq-pipeline-sdk:1.0.2" + "docker-image": "scitran/afq-pipeline-sdk:1.1.0", + "flywheel": { + "suite": "VISTA Lab" + } }, "inputs": { "api_key": {