Title: Run local analysis and upload back to Flywheel
Date: 15-Apr-2020
Find and download input file from flywheel, process locally, create an analysis container and upload local process outputs to it.

Topics that will be covered:

Install and import dependencies

Flywheel API Key and Client

Get a API_KEY. More on this in the Flywheel SDK doc here.

Instantiate the Flywheel API client

Show Flywheel logging information


Before starting off, we want to check your permission on the Flywheel Instance in order to proceed in this notebook.

Tip: Group ID and Project Label can be found on top of the Project page on the Flywheel Instance as shown in the snippet below.

check_user_permission will return True if both the group and project meet the minimum requirement, else a compatible list will be printed.


Main script

Find file

Find the flywheel acquisition container by performing a lookup

Find the file in that acquisition container by name

Download file locally

Process file locally

This is a very simple processing which is just reorienting the nifti image

Create analysis container

Create an analysis container attached to the session with reference to the input files

Upload the output file to analysis container

Check the uploaded file