Skip to content

Exporting Data in BIDS Format using the CLI

Introduction

If you have a project that follows the BIDS format, you can use the CLI to download the project so it stays in the BIDS format.

Note

Prefer videos?

We also have a collection of webinars on using BIDS and Flywheel.

Before You Begin

It is required that your project is already in the BIDS format to use the export bids command. If your project isn't yet in BIDS format, see our resources for help transitioning to BIDS. This also includes running the BIDS curation gear on your project.

If you data is not in BIDS format, use the fw download command to download files.

Usage

fw export bids [Project in Flywheel] [Destination folder] [optional flags]

Instruction Steps

  1. Download the Flywheel CLI and sign in to Flywheel.
  2. Open Terminal or Windows Command Prompt.
  3. Enter the export bids command:
fw export bids -p "Project Name" [Destination folder]

Example:

$ fw export bids -p "Anxiety Study" ~/Documents/FlywheelData
INFO: Verify download directory exists
INFO: Processing project files
INFO: Processing session files
INFO: Processing acquisition files
INFO: Downloading project files
INFO: Downloading session files
INFO: Downloading acquisition files
INFO: Downloading acquisition file: sub-13_inplaneT2.nii.gz
...
  1. Your data is downloaded to your computer, and your project maintains its BIDS format.

Example:

15df166e602118.jpg

Reference Guide

Required Flags

Required argument Description
-p
--project The Project label in Flywheel. If the project label includes spaces, make sure to use quotes. For example "My Project"
[dest folder] The path to the folder on your computer where you want to export the data to

Optional Flags

Optional Flag Description
-h
--help Displays the help for the command
-c FILE LOCATION
--config-file FILE LOCATION Uses the config file to set the flags for the command. See our article on how to create and use the config file to set optional flags for commands.
-y
-yes Assume the answer is yes to all prompts
--no-config Do not load the default config file
--ca-certs CERTS The file to use for SSL Certificate Validation
--timezone TIMEZONE Sets the timestamp for imports to the local timezone where they were uploaded
--debug Turns on debug logging
--quiet Turns off log messages to the console
-p \
--project \ Sets the label for the project
--subject SUBJECT Exports data for a single subject (ex. sub-01)
--session SESSION Exports data from a single session (ex. ses-01)
--data-type DATA TYPE Exports only the given data type (ex. func). Currently you can only indicate one data type. To include multiple data types, enter this flag more than once.
For example:
fw export bids -p "Anxiety Study" ~/Documents/FlywheelData --data-type func --data-type anat
--source-data Includes source data