Skip to content

Python command to download analysis output from Flywheel using SDK

Notifications You must be signed in to change notification settings

ig1401/fw_download_gear_output

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Download analysis output from Flywheel

This is a tool to download output files from a specified analysis gear. It uses the Flywheel SDK to download data either for all subjects in a given project, or for a subset of subjects based on a user inputted list (CSV).

If user chooses to download data for all subjects in the project, it will download any available output files for the gear for every subject and session. If the user specifies a subset of subjects via an input CSV, every session for those subjects will be included. If the user specifies a subset of subjects and sessions in the input CSV (see sub_list.csv for an example), then only those sessions will be included.

Getting Started

Dependencies

  • Python3

Instructions

First, download required packages:

$ pip3 install -r requirements.txt

If not already configured, install the Flywheel CLI and login: Installation Instructions

Then run the command with the following input arguments:

$ ./fw_download_analysis_files.py -h
usage: fw_download_analysis_files.py [-h] -output_dir [OUTPUT_DIR] -fw_group_label
                                     [{d3b,corsica}] -fw_proj_label [FW_PROJ_LABEL]
                                     -gear_name [GEAR_NAME] -all_subjects [{y,n}]
                                     [-sub_list_file [SUB_LIST_FILE]]

arguments:
  -output_dir        Output path on local disk to download files to.
  -fw_group_label    Flywheel group that owns the project [d3b, corsica].
  -fw_proj_label     Flywheel project to download.
  -gear_name         Name of the gear to look for.
  -all_subjects      Whether to download for all subjects in the project [y], or only a subset [n].

optional arguments:
  -h, --help          show this help message and exit
  -sub_list_file     If --all_subjects==n, path to CSV file with subject list.

Example usage:

$ ./fw_download_analysis_files.py -output_dir data/ -fw_group_label d3b -fw_proj_label Medullo_proc -gear_name captk-brats-pipeline -all_subjects n -sub_list_file sub_list.csv

About

Python command to download analysis output from Flywheel using SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%