{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "22b3679d",
"metadata": {
"colab_type": "text",
"id": "view-in-github"
},
"source": [
"\n",
"
"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "843a313c",
"metadata": {},
"source": [
"## FSL's fMRI Data Analysis via Nipype\n",
"\n",
"Author: Monika Doerig\n",
"\n",
"Citation: \n",
"- Chen Y, Hopp FR, Malik M, Wang PT, Woodman K, Youk S and Weber R (2022) Reproducing FSL's fMRI data analysis via Nipype: Relevance, challenges, and solutions. Front. Neuroimaging 1:953215. doi: [10.3389/fnimg.2022.953215](https://www.frontiersin.org/articles/10.3389/fnimg.2022.953215/full)\n",
"\n",
"- [Original code on OSF](https://osf.io/prg53/?view_only=9d7974834a484cdb972bcc3989589b78)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a6aa2b67",
"metadata": {},
"source": [
"## Setup Neurodesk"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "db232ff4",
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"import os\n",
"import sys\n",
"IN_COLAB = 'google.colab' in sys.modules\n",
"\n",
"if IN_COLAB:\n",
" os.environ[\"LD_PRELOAD\"] = \"\";\n",
" os.environ[\"APPTAINER_BINDPATH\"] = \"/content,/tmp,/cvmfs\"\n",
" os.environ[\"MPLCONFIGDIR\"] = \"/content/matplotlib-mpldir\"\n",
" os.environ[\"LMOD_CMD\"] = \"/usr/share/lmod/lmod/libexec/lmod\"\n",
"\n",
" !curl -J -O https://raw.githubusercontent.com/NeuroDesk/neurocommand/main/googlecolab_setup.sh\n",
" !chmod +x googlecolab_setup.sh\n",
" !./googlecolab_setup.sh\n",
"\n",
" os.environ[\"MODULEPATH\"] = ':'.join(map(str, list(map(lambda x: os.path.join(os.path.abspath('/cvmfs/neurodesk.ardc.edu.au/neurodesk-modules/'), x),os.listdir('/cvmfs/neurodesk.ardc.edu.au/neurodesk-modules/')))))"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "0bc44d6c-c479-4071-bf4b-8e67c9700786",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"vendor_id\t: AuthenticAMD\n",
"model name\t: AMD EPYC 7742 64-Core Processor\n"
]
}
],
"source": [
"# Output CPU information:\n",
"!cat /proc/cpuinfo | grep 'vendor' | uniq\n",
"!cat /proc/cpuinfo | grep 'model name' | uniq"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ca8670a9",
"metadata": {},
"outputs": [],
"source": [
"!pip install pandas nilearn matplotlib"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "beb8b3fa",
"metadata": {},
"source": [
"# First-level GLM using Nipype FSL\n",
"\n",
"In this notebook, we recreate the first-level GLM and the first level GLM of FSL GUI using nipype code. For each nipype node, we list the corresponding fsl command from the log file. The dataset we use is a Flanker task, which can be downloaded [here](https://openneuro.org/datasets/ds000102/versions/00001).\n",
"\n",
"We also borrow some helps from this [document](https://nipype.readthedocs.io/en/latest/users/examples/fmri_fsl.html). \n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b2bbe67d-00d1-4781-9ad1-fac8f3905356",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"['fsl/6.0.5.1']"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#load fsl module\n",
"import lmod\n",
"await lmod.purge(force=True)\n",
"await lmod.load('fsl/6.0.5.1') #Original pipeline: FSL 6.0.4, nipype 1.6.1.\n",
"await lmod.list()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "4abe0d95",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"FSLOUTPUTTYPE\"]=\"NIFTI_GZ\""
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "82d81839",
"metadata": {},
"source": [
"## Preparation\n",
"Import all the relevant libraries needed for the preprocessing stage."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "bf70c656",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from __future__ import print_function\n",
"from __future__ import division\n",
"from builtins import str\n",
"from builtins import range\n",
"\n",
"from glob import glob\n",
"\n",
"from nipype import Function\n",
"from nipype.interfaces import fsl, utility as util, io as nio\n",
"import nipype.pipeline.engine as pe # pypeline engine\n",
"import nipype.algorithms.modelgen as model # model generation\n",
"import nipype.algorithms.rapidart as ra # artifact detection\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import nilearn\n",
"from nilearn import surface\n",
"from nilearn import plotting"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "6d9cb873",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"NIFTI_GZ\n",
"6.0.5.1:57b01774\n"
]
}
],
"source": [
"# check output type and fsl version\n",
"print(fsl.Info.output_type())\n",
"print(fsl.Info.version())"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "fad038b8",
"metadata": {},
"source": [
"#### Set up data path"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "a8005f06",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [],
"source": [
"# Input: Set the BIDS path\n",
"data_dir_first = os.path.join(os.getcwd(), 'ds000102')\n",
"# Output: Set path where nipype will store stepwise results\n",
"exp_dir_first = os.path.join(os.getcwd(), 'output_level1')\n",
"\n",
"# Input: Set path of first level outputs\n",
"data_dir_second = os.path.join(os.getcwd(), 'output_level1/level1_results/')\n",
"# Output: Set path where nipype will store stepwise results\n",
"exp_dir_second = os.path.join(os.getcwd(), 'output_level2/')\n",
"\n",
"# Input: Set path of second level outputs\n",
"data_dir_third = os.path.join(os.getcwd(), 'output_level2/level2_results/')\n",
"# Output: Set path where nipype will store stepwise results\n",
"exp_dir_third = os.path.join(os.getcwd(), 'output_level3/')\n",
"\n",
"PATTERN = \"sub-0*\""
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "13564f7b",
"metadata": {
"editable": true,
"scrolled": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"scroll-output"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Clone attempt: 0%| | 0.00/2.00 [00:00, ? Candidate locations/s]\n",
"Enumerating: 0.00 Objects [00:00, ? Objects/s]\u001b[A\n",
" \u001b[A\n",
"Counting: 0%| | 0.00/27.0 [00:00, ? Objects/s]\u001b[A\n",
" \u001b[A\n",
"Compressing: 0%| | 0.00/23.0 [00:00, ? Objects/s]\u001b[A\n",
" \u001b[A\n",
"Receiving: 0%| | 0.00/2.15k [00:00, ? Objects/s]\u001b[A\n",
" \u001b[A\n",
"Resolving: 0%| | 0.00/537 [00:00, ? Deltas/s]\u001b[A\n",
"[INFO ] Filesystem allows writing to files whose write bit is not set. \u001b[A\n",
"[INFO ] Detected a crippled filesystem. \n",
"[INFO ] Disabling core.symlinks. \n",
"[INFO ] Entering an adjusted branch where files are unlocked as this filesystem does not support locked files. \n",
"[INFO ] Switched to branch 'adjusted/master(unlocked)' \n",
"[INFO ] Remote origin not usable by git-annex; setting annex-ignore \n",
"[INFO ] https://github.com/OpenNeuroDatasets/ds000102.git/config download failed: Not Found \n",
"[INFO ] access to 1 dataset sibling s3-PRIVATE not auto-enabled, enable with:\n",
"| \t\tdatalad siblings -d \"/home/jovyan/example-notebooks/functional_imaging/ds000102\" enable -s s3-PRIVATE \n",
"\u001b[1;1minstall\u001b[0m(\u001b[1;32mok\u001b[0m): /home/jovyan/example-notebooks/functional_imaging/ds000102 (\u001b[1;35mdataset\u001b[0m)\n",
"Total: 0%| | 0.00/618M [00:00, ? Bytes/s]\n",
"Get sub-07/a .. 7_T1w.nii.gz: 0%| | 0.00/10.7M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 0%| | 18.9k/10.7M [00:00<01:28, 121k Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 0%| | 50.7k/10.7M [00:00<01:07, 158k Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 1%| | 138k/10.7M [00:00<00:34, 304k Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 3%|▏ | 277k/10.7M [00:00<00:20, 515k Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 5%|▎ | 573k/10.7M [00:00<00:10, 947k Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 11%|▎ | 1.16M/10.7M [00:01<00:05, 1.79M Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 22%|▋ | 2.36M/10.7M [00:01<00:02, 3.45M Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 35%|█ | 3.73M/10.7M [00:01<00:01, 4.69M Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 54%|█▌ | 5.76M/10.7M [00:01<00:00, 7.82M Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 73%|██▏| 7.78M/10.7M [00:01<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-07/a .. 7_T1w.nii.gz: 88%|██▋| 9.39M/10.7M [00:01<00:00, 10.6M Bytes/s]\u001b[A\n",
"Total: 2%|▍ | 10.7M/618M [00:03<02:57, 3.42M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 0%| | 0.00/28.9M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 6%|▏ | 1.88M/28.9M [00:00<00:02, 10.8M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 13%|▍ | 3.80M/28.9M [00:00<00:02, 10.9M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 20%|▌ | 5.75M/28.9M [00:00<00:02, 11.0M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 26%|▊ | 7.52M/28.9M [00:00<00:01, 12.8M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 33%|█ | 9.70M/28.9M [00:00<00:01, 10.8M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 40%|█▏ | 11.7M/28.9M [00:01<00:01, 11.0M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 47%|█▍ | 13.7M/28.9M [00:01<00:01, 11.2M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 54%|█▋ | 15.8M/28.9M [00:01<00:01, 11.4M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 62%|█▊ | 17.8M/28.9M [00:01<00:00, 13.2M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 69%|██ | 19.9M/28.9M [00:01<00:00, 11.4M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 75%|██▏| 21.6M/28.9M [00:01<00:00, 12.6M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 82%|██▍| 23.8M/28.9M [00:02<00:00, 11.9M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 90%|██▋| 26.2M/28.9M [00:02<00:00, 12.0M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 97%|██▉| 28.2M/28.9M [00:02<00:00, 12.6M Bytes/s]\u001b[A\n",
"Total: 6%|█▋ | 39.7M/618M [00:05<01:27, 6.65M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 0%| | 0.00/29.0M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 9%|▎ | 2.60M/29.0M [00:00<00:02, 13.0M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 14%|▍ | 4.10M/29.0M [00:00<00:02, 11.1M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 21%|▋ | 6.22M/29.0M [00:00<00:02, 9.35M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 27%|▊ | 7.89M/29.0M [00:00<00:01, 11.1M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 36%|█ | 10.4M/29.0M [00:01<00:01, 9.39M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 41%|█▏ | 12.0M/29.0M [00:01<00:01, 9.25M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 47%|█▍ | 13.6M/29.0M [00:01<00:01, 9.21M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 52%|█▌ | 15.2M/29.0M [00:01<00:01, 9.19M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 58%|█▋ | 16.8M/29.0M [00:01<00:01, 9.30M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 64%|█▉ | 18.4M/29.0M [00:01<00:01, 9.24M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 69%|██ | 20.1M/29.0M [00:02<00:00, 9.31M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 75%|██▎| 21.7M/29.0M [00:02<00:00, 9.84M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 80%|██▍| 23.2M/29.0M [00:02<00:00, 10.8M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 87%|██▌| 25.1M/29.0M [00:02<00:00, 9.07M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 92%|██▊| 26.8M/29.0M [00:02<00:00, 10.1M Bytes/s]\u001b[A\n",
"Get sub-07/f .. _bold.nii.gz: 98%|██▉| 28.5M/29.0M [00:02<00:00, 9.17M Bytes/s]\u001b[A\n",
"Total: 11%|██▉ | 68.6M/618M [00:09<01:14, 7.36M Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 0%| | 0.00/10.7M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 16%|▍ | 1.73M/10.7M [00:00<00:00, 9.87M Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 32%|▉ | 3.46M/10.7M [00:00<00:00, 9.91M Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 48%|█▍ | 5.21M/10.7M [00:00<00:00, 9.94M Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 65%|█▉ | 6.96M/10.7M [00:00<00:00, 9.98M Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 81%|██▍| 8.71M/10.7M [00:00<00:00, 10.0M Bytes/s]\u001b[A\n",
"Get sub-02/a .. 2_T1w.nii.gz: 98%|██▉| 10.5M/10.7M [00:01<00:00, 10.1M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 0%| | 0.00/29.2M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 6%|▏ | 1.78M/29.2M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 12%|▎ | 3.56M/29.2M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 18%|▌ | 5.34M/29.2M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 24%|▋ | 7.14M/29.2M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 31%|▉ | 8.95M/29.2M [00:00<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 37%|█ | 10.7M/29.2M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 43%|█▎ | 12.5M/29.2M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 49%|█▍ | 14.4M/29.2M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 55%|█▋ | 16.0M/29.2M [00:01<00:01, 11.6M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 62%|█▊ | 18.0M/29.2M [00:01<00:01, 10.1M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 68%|██ | 19.8M/29.2M [00:01<00:00, 10.1M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 74%|██▏| 21.7M/29.2M [00:02<00:00, 10.2M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 80%|██▍| 23.5M/29.2M [00:02<00:00, 10.8M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 85%|██▌| 24.9M/29.2M [00:02<00:00, 11.6M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 93%|██▊| 27.1M/29.2M [00:02<00:00, 9.92M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 99%|██▉| 29.0M/29.2M [00:02<00:00, 11.1M Bytes/s]\u001b[A\n",
"Total: 18%|████▉ | 109M/618M [00:13<01:05, 7.81M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 0%| | 0.00/29.2M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 6%|▏ | 1.83M/29.2M [00:00<00:02, 10.6M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 13%|▍ | 3.66M/29.2M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 19%|▌ | 5.51M/29.2M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 25%|▊ | 7.35M/29.2M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 31%|▉ | 9.18M/29.2M [00:00<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 38%|█▏ | 11.0M/29.2M [00:01<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 44%|█▎ | 12.9M/29.2M [00:01<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 50%|█▌ | 14.7M/29.2M [00:01<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 57%|█▋ | 16.5M/29.2M [00:01<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 63%|█▉ | 18.4M/29.2M [00:01<00:01, 10.6M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 69%|██ | 20.2M/29.2M [00:01<00:00, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 76%|██▎| 22.1M/29.2M [00:02<00:00, 10.5M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 82%|██▍| 23.9M/29.2M [00:02<00:00, 11.0M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 86%|██▌| 25.2M/29.2M [00:02<00:00, 11.6M Bytes/s]\u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 94%|██▊| 27.6M/29.2M [00:02<00:00, 10.2M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-02/f .. _bold.nii.gz: 0%| | 0.00/29.2M [00:00, ? Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-05/a .. 5_T1w.nii.gz: 0%| | 0.00/10.8M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-05/a .. 5_T1w.nii.gz: 17%|▌ | 1.84M/10.8M [00:00<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/a .. 5_T1w.nii.gz: 34%|█ | 3.69M/10.8M [00:00<00:00, 10.5M Bytes/s]\u001b[A\n",
"Get sub-05/a .. 5_T1w.nii.gz: 51%|█▌ | 5.52M/10.8M [00:00<00:00, 10.5M Bytes/s]\u001b[A\n",
"Get sub-05/a .. 5_T1w.nii.gz: 68%|██ | 7.36M/10.8M [00:00<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/a .. 5_T1w.nii.gz: 86%|██▌| 9.21M/10.8M [00:00<00:00, 10.5M Bytes/s]\u001b[A\n",
"Total: 24%|██████▋ | 148M/618M [00:18<00:57, 8.15M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 0%| | 0.00/29.7M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 6%|▏ | 1.83M/29.7M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 12%|▎ | 3.69M/29.7M [00:00<00:02, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 19%|▌ | 5.52M/29.7M [00:00<00:02, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 25%|▋ | 7.29M/29.7M [00:00<00:01, 12.5M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 31%|▉ | 9.21M/29.7M [00:00<00:02, 10.1M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 37%|█ | 11.1M/29.7M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 43%|█▎ | 12.9M/29.7M [00:01<00:01, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 50%|█▍ | 14.7M/29.7M [00:01<00:01, 12.2M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 56%|█▋ | 16.6M/29.7M [00:01<00:01, 10.0M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 62%|█▊ | 18.5M/29.7M [00:01<00:01, 10.8M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 67%|██ | 19.8M/29.7M [00:01<00:00, 11.3M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 75%|██▏| 22.2M/29.7M [00:02<00:00, 10.0M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 81%|██▍| 24.0M/29.7M [00:02<00:00, 11.2M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 87%|██▌| 25.9M/29.7M [00:02<00:00, 10.1M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 94%|██▊| 27.8M/29.7M [00:02<00:00, 10.3M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 0%| | 0.00/29.7M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 6%|▏ | 1.79M/29.7M [00:00<00:02, 10.3M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 12%|▎ | 3.68M/29.7M [00:00<00:02, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 19%|▌ | 5.56M/29.7M [00:00<00:02, 10.7M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 25%|▊ | 7.46M/29.7M [00:00<00:02, 10.8M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 32%|▉ | 9.37M/29.7M [00:00<00:01, 10.8M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 38%|█▏ | 11.3M/29.7M [00:01<00:01, 10.8M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 45%|█▎ | 13.2M/29.7M [00:01<00:01, 11.1M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 51%|█▌ | 15.1M/29.7M [00:01<00:01, 12.7M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 58%|█▋ | 17.1M/29.7M [00:01<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 64%|█▉ | 19.0M/29.7M [00:01<00:00, 11.3M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 69%|██ | 20.4M/29.7M [00:01<00:00, 11.9M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 77%|██▎| 23.0M/29.7M [00:02<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 84%|██▌| 24.9M/29.7M [00:02<00:00, 11.9M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 91%|██▋| 26.9M/29.7M [00:02<00:00, 10.7M Bytes/s]\u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 98%|██▉| 29.0M/29.7M [00:02<00:00, 10.9M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-05/f .. _bold.nii.gz: 0%| | 0.00/29.7M [00:00, ? Bytes/s]\u001b[A\n",
"Total: 34%|█████████▍ | 208M/618M [00:24<00:48, 8.52M Bytes/s]\u001b[A\n",
"Get sub-09/a .. 9_T1w.nii.gz: 0%| | 0.00/10.8M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-09/a .. 9_T1w.nii.gz: 17%|▍ | 1.79M/10.8M [00:00<00:00, 17.8M Bytes/s]\u001b[A\n",
"Get sub-09/a .. 9_T1w.nii.gz: 38%|█▏ | 4.05M/10.8M [00:00<00:00, 11.0M Bytes/s]\u001b[A\n",
"Get sub-09/a .. 9_T1w.nii.gz: 57%|█▋ | 6.11M/10.8M [00:00<00:00, 11.4M Bytes/s]\u001b[A\n",
"Get sub-09/a .. 9_T1w.nii.gz: 76%|██▎| 8.14M/10.8M [00:00<00:00, 13.7M Bytes/s]\u001b[A\n",
"Get sub-09/a .. 9_T1w.nii.gz: 95%|██▊| 10.3M/10.8M [00:00<00:00, 11.2M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 0%| | 0.00/29.2M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 7%|▏ | 2.10M/29.2M [00:00<00:02, 13.3M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 13%|▍ | 3.81M/29.2M [00:00<00:01, 15.1M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 22%|▋ | 6.37M/29.2M [00:00<00:01, 11.6M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 29%|▊ | 8.41M/29.2M [00:00<00:01, 13.9M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 37%|█ | 10.7M/29.2M [00:00<00:01, 11.7M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 44%|█▎ | 12.8M/29.2M [00:00<00:01, 13.7M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 52%|█▌ | 15.1M/29.2M [00:01<00:01, 13.2M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 59%|█▊ | 17.3M/29.2M [00:01<00:00, 13.3M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 67%|██ | 19.7M/29.2M [00:01<00:00, 11.7M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 75%|██▏| 21.8M/29.2M [00:01<00:00, 13.5M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 83%|██▍| 24.3M/29.2M [00:01<00:00, 12.1M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 90%|██▋| 26.4M/29.2M [00:02<00:00, 13.8M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 99%|██▉| 29.0M/29.2M [00:02<00:00, 12.5M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 0%| | 0.00/29.2M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 6%|▏ | 1.70M/29.2M [00:00<00:01, 16.9M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 13%|▍ | 3.85M/29.2M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 19%|▌ | 5.58M/29.2M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 25%|▊ | 7.31M/29.2M [00:00<00:02, 10.1M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 31%|▉ | 9.13M/29.2M [00:00<00:01, 10.2M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 38%|█▏ | 11.0M/29.2M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 44%|█▎ | 12.8M/29.2M [00:01<00:01, 10.9M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 49%|█▍ | 14.4M/29.2M [00:01<00:01, 12.0M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 57%|█▋ | 16.7M/29.2M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 64%|█▉ | 18.6M/29.2M [00:01<00:00, 11.4M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 70%|██ | 20.6M/29.2M [00:01<00:00, 10.5M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 77%|██▎| 22.4M/29.2M [00:02<00:00, 12.0M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 84%|██▌| 24.6M/29.2M [00:02<00:00, 12.0M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 91%|██▋| 26.5M/29.2M [00:02<00:00, 11.9M Bytes/s]\u001b[A\n",
"Get sub-09/f .. _bold.nii.gz: 98%|██▉| 28.7M/29.2M [00:02<00:00, 10.6M Bytes/s]\u001b[A\n",
"Total: 45%|████████████▌ | 277M/618M [00:31<00:38, 8.83M Bytes/s]\u001b[A\n",
"Get sub-04/a .. 4_T1w.nii.gz: 0%| | 0.00/10.7M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-04/a .. 4_T1w.nii.gz: 19%|▌ | 2.06M/10.7M [00:00<00:00, 11.8M Bytes/s]\u001b[A\n",
"Get sub-04/a .. 4_T1w.nii.gz: 39%|█▏ | 4.19M/10.7M [00:00<00:00, 12.0M Bytes/s]\u001b[A\n",
"Get sub-04/a .. 4_T1w.nii.gz: 59%|█▊ | 6.30M/10.7M [00:00<00:00, 15.0M Bytes/s]\u001b[A\n",
"Get sub-04/a .. 4_T1w.nii.gz: 79%|██▎| 8.49M/10.7M [00:00<00:00, 11.7M Bytes/s]\u001b[A\n",
"Get sub-04/a .. 4_T1w.nii.gz: 98%|██▉| 10.6M/10.7M [00:00<00:00, 13.8M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 0%| | 0.00/29.1M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 7%|▏ | 2.16M/29.1M [00:00<00:01, 21.6M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 15%|▍ | 4.40M/29.1M [00:00<00:02, 11.6M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 23%|▋ | 6.56M/29.1M [00:00<00:01, 14.7M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 33%|▉ | 9.54M/29.1M [00:00<00:01, 11.0M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 39%|█▏ | 11.4M/29.1M [00:01<00:01, 9.63M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 45%|█▎ | 13.0M/29.1M [00:01<00:01, 9.86M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 50%|█▌ | 14.6M/29.1M [00:01<00:01, 11.0M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 56%|█▋ | 16.3M/29.1M [00:01<00:01, 8.96M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 62%|█▊ | 17.9M/29.1M [00:01<00:01, 9.84M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 68%|██ | 19.6M/29.1M [00:01<00:01, 9.09M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 73%|██▏| 21.3M/29.1M [00:02<00:00, 9.32M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 79%|██▍| 23.0M/29.1M [00:02<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 85%|██▌| 24.8M/29.1M [00:02<00:00, 9.23M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 91%|██▋| 26.5M/29.1M [00:02<00:00, 9.50M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 97%|██▉| 28.3M/29.1M [00:02<00:00, 9.66M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 0%| | 0.00/29.1M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 6%|▏ | 1.77M/29.1M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 12%|▎ | 3.54M/29.1M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 18%|▌ | 5.34M/29.1M [00:00<00:02, 10.2M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 25%|▋ | 7.14M/29.1M [00:00<00:02, 10.3M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 31%|▉ | 8.95M/29.1M [00:00<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 37%|█ | 10.8M/29.1M [00:01<00:01, 10.3M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 43%|█▎ | 12.6M/29.1M [00:01<00:01, 10.4M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 50%|█▍ | 14.4M/29.1M [00:01<00:01, 10.4M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 56%|█▋ | 16.3M/29.1M [00:01<00:01, 10.4M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 62%|█▊ | 18.1M/29.1M [00:01<00:01, 10.8M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 68%|██ | 19.9M/29.1M [00:01<00:00, 12.2M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 75%|██▎| 21.9M/29.1M [00:02<00:00, 10.1M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 82%|██▍| 23.7M/29.1M [00:02<00:00, 11.0M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 86%|██▌| 25.0M/29.1M [00:02<00:00, 11.3M Bytes/s]\u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 95%|██▊| 27.5M/29.1M [00:02<00:00, 10.1M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-04/f .. _bold.nii.gz: 0%| | 0.00/29.1M [00:00, ? Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 0%| | 0.00/10.6M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 17%|▌ | 1.85M/10.6M [00:00<00:00, 10.7M Bytes/s]\u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 35%|█ | 3.74M/10.6M [00:00<00:00, 10.7M Bytes/s]\u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 53%|█▌ | 5.64M/10.6M [00:00<00:00, 10.8M Bytes/s]\u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 63%|█▉ | 6.72M/10.6M [00:00<00:00, 8.83M Bytes/s]\u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 83%|██▍| 8.81M/10.6M [00:00<00:00, 11.7M Bytes/s]\u001b[A\n",
"Get sub-01/a .. 1_T1w.nii.gz: 97%|██▉| 10.3M/10.6M [00:01<00:00, 9.21M Bytes/s]\u001b[A\n",
"Total: 58%|████████████████▏ | 356M/618M [00:40<00:29, 8.85M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 0%| | 0.00/28.1M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 5%|▏ | 1.36M/28.1M [00:00<00:03, 7.99M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 10%|▎ | 2.74M/28.1M [00:00<00:03, 7.94M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 15%|▍ | 4.12M/28.1M [00:00<00:03, 7.93M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 20%|▌ | 5.52M/28.1M [00:00<00:02, 8.31M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 25%|▋ | 6.96M/28.1M [00:00<00:02, 7.95M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 30%|▉ | 8.40M/28.1M [00:01<00:02, 8.04M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 35%|█ | 9.83M/28.1M [00:01<00:02, 8.81M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 39%|█▏ | 11.0M/28.1M [00:01<00:01, 9.40M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 46%|█▎ | 12.8M/28.1M [00:01<00:01, 7.82M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 51%|█▌ | 14.3M/28.1M [00:01<00:01, 9.02M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 56%|█▋ | 15.8M/28.1M [00:01<00:01, 7.92M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 62%|█▊ | 17.3M/28.1M [00:02<00:01, 8.11M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 67%|██ | 18.8M/28.1M [00:02<00:01, 8.28M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 72%|██▏| 20.3M/28.1M [00:02<00:00, 8.41M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 78%|██▎| 21.8M/28.1M [00:02<00:00, 8.54M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 83%|██▍| 23.4M/28.1M [00:02<00:00, 8.62M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 89%|██▋| 24.9M/28.1M [00:02<00:00, 8.68M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 94%|██▊| 26.5M/28.1M [00:03<00:00, 8.72M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 100%|██▉| 28.0M/28.1M [00:03<00:00, 8.81M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 0%| | 0.00/28.1M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 6%|▏ | 1.55M/28.1M [00:00<00:02, 9.47M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 11%|▎ | 3.14M/28.1M [00:00<00:02, 8.91M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 17%|▌ | 4.71M/28.1M [00:00<00:02, 8.95M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 22%|▋ | 6.28M/28.1M [00:00<00:02, 9.70M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 27%|▊ | 7.57M/28.1M [00:00<00:01, 10.5M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 34%|█ | 9.46M/28.1M [00:01<00:02, 8.56M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 38%|█▏ | 10.6M/28.1M [00:01<00:01, 9.09M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 45%|█▎ | 12.7M/28.1M [00:01<00:01, 8.77M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 51%|█▌ | 14.2M/28.1M [00:01<00:01, 8.89M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 56%|█▋ | 15.8M/28.1M [00:01<00:01, 8.96M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 62%|█▊ | 17.5M/28.1M [00:01<00:01, 9.00M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 68%|██ | 19.1M/28.1M [00:02<00:01, 9.06M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 73%|██▏| 20.7M/28.1M [00:02<00:00, 9.09M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 79%|██▎| 22.3M/28.1M [00:02<00:00, 9.08M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 86%|██▌| 24.2M/28.1M [00:02<00:00, 9.28M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 91%|██▋| 25.5M/28.1M [00:02<00:00, 9.13M Bytes/s]\u001b[A\n",
"Get sub-01/f .. _bold.nii.gz: 96%|██▉| 27.1M/28.1M [00:02<00:00, 9.21M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 0%| | 0.00/10.6M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 15%|▍ | 1.62M/10.6M [00:00<00:00, 9.23M Bytes/s]\u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 31%|▉ | 3.23M/10.6M [00:00<00:00, 9.24M Bytes/s]\u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 46%|█▎ | 4.83M/10.6M [00:00<00:00, 9.23M Bytes/s]\u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 61%|█▊ | 6.44M/10.6M [00:00<00:00, 9.20M Bytes/s]\u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 76%|██▎| 8.06M/10.6M [00:00<00:00, 9.21M Bytes/s]\u001b[A\n",
"Get sub-08/a .. 8_T1w.nii.gz: 92%|██▋| 9.67M/10.6M [00:01<00:00, 9.20M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 0%| | 0.00/28.6M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 5%|▏ | 1.57M/28.6M [00:00<00:03, 9.01M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 11%|▎ | 3.19M/28.6M [00:00<00:02, 9.13M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 17%|▌ | 4.80M/28.6M [00:00<00:02, 9.17M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 22%|▋ | 6.41M/28.6M [00:00<00:02, 9.18M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 28%|▊ | 8.02M/28.6M [00:00<00:02, 9.23M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 34%|█ | 9.64M/28.6M [00:01<00:02, 9.20M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 39%|█▏ | 11.2M/28.6M [00:01<00:01, 9.20M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 45%|█▎ | 12.8M/28.6M [00:01<00:01, 9.24M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 51%|█▌ | 14.5M/28.6M [00:01<00:01, 9.18M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 56%|█▋ | 16.1M/28.6M [00:01<00:01, 9.47M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 61%|█▊ | 17.4M/28.6M [00:01<00:01, 10.2M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 67%|██ | 19.3M/28.6M [00:02<00:01, 8.89M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 73%|██▏| 20.9M/28.6M [00:02<00:00, 9.63M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 77%|██▎| 22.0M/28.6M [00:02<00:00, 9.89M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 84%|██▌| 24.2M/28.6M [00:02<00:00, 8.76M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 90%|██▋| 25.8M/28.6M [00:02<00:00, 9.92M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 96%|██▊| 27.4M/28.6M [00:02<00:00, 8.72M Bytes/s]\u001b[A\n",
"Total: 73%|████████████████████▍ | 452M/618M [00:52<00:19, 8.62M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 0%| | 0.00/28.6M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 6%|▏ | 1.62M/28.6M [00:00<00:02, 9.31M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 11%|▎ | 3.24M/28.6M [00:00<00:02, 9.30M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 17%|▌ | 4.86M/28.6M [00:00<00:02, 9.29M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 23%|▋ | 6.50M/28.6M [00:00<00:02, 9.28M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 28%|▊ | 7.99M/28.6M [00:00<00:01, 10.6M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 34%|█ | 9.76M/28.6M [00:01<00:02, 9.03M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 40%|█▏ | 11.4M/28.6M [00:01<00:01, 9.21M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 46%|█▎ | 13.1M/28.6M [00:01<00:01, 9.21M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 51%|█▌ | 14.7M/28.6M [00:01<00:01, 9.25M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 57%|█▋ | 16.3M/28.6M [00:01<00:01, 9.81M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 61%|█▊ | 17.5M/28.6M [00:01<00:01, 10.2M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 69%|██ | 19.7M/28.6M [00:02<00:00, 9.08M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 75%|██▏| 21.3M/28.6M [00:02<00:00, 10.1M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 80%|██▍| 23.0M/28.6M [00:02<00:00, 9.12M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 86%|██▌| 24.7M/28.6M [00:02<00:00, 9.28M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 92%|██▊| 26.4M/28.6M [00:02<00:00, 9.39M Bytes/s]\u001b[A\n",
"Get sub-08/f .. _bold.nii.gz: 98%|██▉| 28.1M/28.6M [00:02<00:00, 9.53M Bytes/s]\u001b[A\n",
"Total: 78%|█████████████████████▊ | 481M/618M [00:55<00:15, 8.61M Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 0%| | 0.00/10.6M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 16%|▍ | 1.67M/10.6M [00:00<00:00, 9.64M Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 32%|▉ | 3.39M/10.6M [00:00<00:00, 9.76M Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 48%|█▍ | 5.13M/10.6M [00:00<00:00, 9.84M Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 65%|█▉ | 6.87M/10.6M [00:00<00:00, 10.1M Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 81%|██▍| 8.64M/10.6M [00:00<00:00, 9.93M Bytes/s]\u001b[A\n",
"Get sub-06/a .. 6_T1w.nii.gz: 98%|██▉| 10.4M/10.6M [00:01<00:00, 9.99M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 0%| | 0.00/29.4M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 6%|▏ | 1.76M/29.4M [00:00<00:02, 10.1M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 12%|▎ | 3.57M/29.4M [00:00<00:02, 10.3M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 18%|▌ | 5.39M/29.4M [00:00<00:02, 10.3M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 26%|▊ | 7.76M/29.4M [00:00<00:01, 11.0M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 31%|▉ | 8.98M/29.4M [00:01<00:02, 7.39M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 38%|█▏ | 11.1M/29.4M [00:01<00:01, 9.85M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 44%|█▎ | 12.8M/29.4M [00:01<00:01, 8.71M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 48%|█▍ | 14.2M/29.4M [00:01<00:01, 8.39M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 53%|█▌ | 15.5M/29.4M [00:01<00:01, 8.28M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 58%|█▋ | 16.9M/29.4M [00:01<00:01, 8.22M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 63%|█▉ | 18.4M/29.4M [00:02<00:01, 8.20M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 67%|██ | 19.8M/29.4M [00:02<00:01, 8.36M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 73%|██▏| 21.3M/29.4M [00:02<00:00, 8.27M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 78%|██▎| 22.8M/29.4M [00:02<00:00, 8.36M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 83%|██▍| 24.3M/29.4M [00:02<00:00, 8.97M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 87%|██▌| 25.7M/29.4M [00:02<00:00, 9.91M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 93%|██▊| 27.5M/29.4M [00:03<00:00, 8.25M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 99%|██▉| 29.0M/29.4M [00:03<00:00, 9.32M Bytes/s]\u001b[A\n",
"Total: 84%|███████████████████████▌ | 521M/618M [01:00<00:11, 8.55M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 0%| | 0.00/29.4M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 5%|▏ | 1.60M/29.4M [00:00<00:03, 9.19M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 11%|▎ | 3.23M/29.4M [00:00<00:02, 9.25M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 17%|▍ | 4.86M/29.4M [00:00<00:02, 9.31M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 22%|▋ | 6.52M/29.4M [00:00<00:02, 9.37M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 28%|▊ | 8.19M/29.4M [00:00<00:02, 9.44M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 34%|█ | 9.87M/29.4M [00:01<00:02, 9.50M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 39%|█▏ | 11.6M/29.4M [00:01<00:01, 9.65M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 45%|█▎ | 13.3M/29.4M [00:01<00:01, 9.64M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 51%|█▌ | 15.0M/29.4M [00:01<00:01, 9.70M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 57%|█▋ | 16.7M/29.4M [00:01<00:01, 10.2M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 62%|█▊ | 18.1M/29.4M [00:01<00:01, 11.0M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 69%|██ | 20.2M/29.4M [00:02<00:00, 9.49M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 75%|██▏| 22.0M/29.4M [00:02<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 81%|██▍| 23.8M/29.4M [00:02<00:00, 9.58M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 87%|██▌| 25.6M/29.4M [00:02<00:00, 9.74M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 93%|██▊| 27.4M/29.4M [00:02<00:00, 9.93M Bytes/s]\u001b[A\n",
"Get sub-06/f .. _bold.nii.gz: 99%|██▉| 29.2M/29.4M [00:02<00:00, 10.0M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-03/a .. 3_T1w.nii.gz: 0%| | 0.00/10.7M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-03/a .. 3_T1w.nii.gz: 17%|▍ | 1.78M/10.7M [00:00<00:00, 10.6M Bytes/s]\u001b[A\n",
"Get sub-03/a .. 3_T1w.nii.gz: 34%|█ | 3.61M/10.7M [00:00<00:00, 10.3M Bytes/s]\u001b[A\n",
"Get sub-03/a .. 3_T1w.nii.gz: 51%|█▌ | 5.42M/10.7M [00:00<00:00, 10.3M Bytes/s]\u001b[A\n",
"Get sub-03/a .. 3_T1w.nii.gz: 68%|██ | 7.24M/10.7M [00:00<00:00, 11.1M Bytes/s]\u001b[A\n",
"Get sub-03/a .. 3_T1w.nii.gz: 82%|██▍| 8.73M/10.7M [00:00<00:00, 12.0M Bytes/s]\u001b[A\n",
"Total: 91%|█████████████████████████▍ | 561M/618M [01:05<00:06, 8.55M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 0%| | 0.00/28.8M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 6%|▏ | 1.81M/28.8M [00:00<00:02, 10.4M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 13%|▍ | 3.66M/28.8M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 19%|▌ | 5.49M/28.8M [00:00<00:02, 10.5M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 26%|▊ | 7.35M/28.8M [00:00<00:02, 10.3M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 32%|▉ | 9.20M/28.8M [00:00<00:01, 10.4M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 38%|█▏ | 10.9M/28.8M [00:01<00:01, 10.1M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 45%|█▎ | 13.0M/28.8M [00:01<00:01, 8.31M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 50%|█▍ | 14.3M/28.8M [00:01<00:01, 8.07M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 54%|█▋ | 15.6M/28.8M [00:01<00:01, 8.09M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 59%|█▊ | 17.0M/28.8M [00:01<00:01, 7.85M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 64%|█▉ | 18.4M/28.8M [00:02<00:01, 7.84M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 69%|██ | 19.7M/28.8M [00:02<00:01, 8.30M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 73%|██▏| 21.1M/28.8M [00:02<00:00, 9.37M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 78%|██▎| 22.5M/28.8M [00:02<00:00, 7.43M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 83%|██▍| 23.9M/28.8M [00:02<00:00, 8.40M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 88%|██▋| 25.4M/28.8M [00:02<00:00, 7.57M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 93%|██▊| 26.8M/28.8M [00:03<00:00, 7.77M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 98%|██▉| 28.3M/28.8M [00:03<00:00, 7.92M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 0%| | 0.00/28.8M [00:00, ? Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 5%|▏ | 1.45M/28.8M [00:00<00:03, 8.35M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 10%|▎ | 2.93M/28.8M [00:00<00:03, 8.40M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 15%|▍ | 4.40M/28.8M [00:00<00:02, 8.43M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 20%|▌ | 5.89M/28.8M [00:00<00:02, 8.47M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 26%|▊ | 7.40M/28.8M [00:00<00:02, 8.51M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 31%|▉ | 8.91M/28.8M [00:01<00:02, 8.53M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 36%|█ | 10.4M/28.8M [00:01<00:02, 8.61M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 41%|█▏ | 11.9M/28.8M [00:01<00:01, 8.63M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 47%|█▍ | 13.5M/28.8M [00:01<00:01, 8.66M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 52%|█▌ | 15.0M/28.8M [00:01<00:01, 8.69M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 57%|█▋ | 16.5M/28.8M [00:01<00:01, 8.73M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 63%|█▉ | 18.1M/28.8M [00:02<00:01, 8.76M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 68%|██ | 19.6M/28.8M [00:02<00:01, 8.86M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 74%|██▏| 21.2M/28.8M [00:02<00:00, 8.80M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 79%|██▎| 22.7M/28.8M [00:02<00:00, 8.82M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 84%|██▌| 24.3M/28.8M [00:02<00:00, 9.32M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 88%|██▋| 25.3M/28.8M [00:02<00:00, 9.45M Bytes/s]\u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 95%|██▊| 27.4M/28.8M [00:03<00:00, 8.65M Bytes/s]\u001b[A\n",
" \u001b[A\n",
"Get sub-03/f .. _bold.nii.gz: 0%| | 0.00/28.8M [00:00, ? Bytes/s]\u001b[A\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-07/anat/sub-07_T1w.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-07/func/sub-07_task-flanker_run-1_bold.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-07/func/sub-07_task-flanker_run-2_bold.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-02/anat/sub-02_T1w.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-02/func/sub-02_task-flanker_run-1_bold.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-02/func/sub-02_task-flanker_run-2_bold.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-05/anat/sub-05_T1w.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-05/func/sub-05_task-flanker_run-1_bold.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-05/func/sub-05_task-flanker_run-2_bold.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-09/anat/sub-09_T1w.nii.gz (\u001b[1;35mfile\u001b[0m) [from s3-PUBLIC...]\n",
" [17 similar messages have been suppressed; disable with datalad.ui.suppress-similar-results=off]\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-07 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-02 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-05 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-09 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-04 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-01 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-08 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-06 (\u001b[1;35mdirectory\u001b[0m)\n",
"\u001b[1;1mget\u001b[0m(\u001b[1;32mok\u001b[0m): sub-03 (\u001b[1;35mdirectory\u001b[0m)\n",
"action summary:\n",
" get (ok: 36)\n",
"\u001b[0m"
]
}
],
"source": [
"!datalad install https://github.com/OpenNeuroDatasets/ds000102.git\n",
"!cd ds000102 && datalad get $PATTERN"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ac958d26",
"metadata": {},
"source": [
"#### Start the workflow"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "4e5d4b5f",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"wf_first = pe.Workflow(name='level1', base_dir=exp_dir_first)\n",
"wf_first.config[\"execution\"][\"crashfile_format\"] = \"txt\""
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "aa421d4e",
"metadata": {},
"source": [
"The following two nodes (`infosource` & `dg`) together define all inputs required for the preprocessing workflow"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "a6ba7973-27cc-43a6-a2a8-5648b696589b",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['01', '02', '03', '04', '05', '06', '07', '08', '09']\n"
]
}
],
"source": [
"# get subject_id list - we only do 9 subjects here so the notebook runs in a reasonable time\n",
"subj_list = [x.split('-')[-1] for x in glob(data_dir_first+\"/\"+PATTERN)]\n",
"subj_list.sort()\n",
"print(subj_list)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "ba6fc63e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"infosource_first = pe.Node(util.IdentityInterface(fields=[\"subject_id\"]),\n",
" name=\"infosource\")\n",
"infosource_first.iterables = [(\"subject_id\", subj_list)]"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "e670b09f",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"dg_first = pe.Node(\n",
" interface=nio.DataGrabber(\n",
" infields=[\"subject_id\",\"run_id\"], outfields=[\"struct\", \"func\", \"events\"]\n",
" ),\n",
" name=\"dg_first\"\n",
")\n",
"\n",
"# Specify run_ids and return a sorted filelist to ensure we match files to correct runs/tasks\n",
"dg_first.inputs.run_id = [1,2]\n",
"dg_first.inputs.sort_filelist = True\n",
"dg_first.inputs.template = \"*\"\n",
"dg_first.inputs.base_directory = data_dir_first\n",
"\n",
"# Define arguments fill the wildcards in the below paths \n",
"dg_first.inputs.template_args = dict(\n",
" struct=[[\"subject_id\",\"subject_id\"]],\n",
" func=[[\"subject_id\",\"subject_id\",\"run_id\"]],\n",
" events=[[\"subject_id\",\"subject_id\",\"run_id\"]]\n",
")\n",
"\n",
"dg_first.inputs.field_template = dict(\n",
" struct = \"sub-%s/anat/sub-%s_T1w.nii.gz\",\n",
" func=\"sub-%s/func/sub-%s_task-flanker_run-%d_bold.nii.gz\",\n",
" events=\"sub-%s/func/sub-%s_task-flanker_run-%d_events.tsv\", \n",
")\n",
"\n",
"wf_first.connect([\n",
" (infosource_first, dg_first, [(\"subject_id\", \"subject_id\")])\n",
"])"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "34b0b485",
"metadata": {},
"source": [
"## Initialisation"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "2c24143c",
"metadata": {
"tags": []
},
"source": [
"Convert functional images to float representation. Since there can be more than one functional run we use a MapNode to convert each run.\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths ../sub-11/func/sub-11_task-flanker_run-1_bold prefiltered_func_data -odt float\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "6781a85e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"img2float = pe.MapNode(\n",
" interface=fsl.ImageMaths(out_data_type='float', op_string='', suffix='_dtype'),\n",
" name='img2float',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(dg_first, 'func', img2float, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a7d07c38",
"metadata": {},
"source": [
"Extract the middle volume of the first run as the reference\n",
"\n",
"(Head movement, motion-correction)\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslroi prefiltered_func_data example_func 73 1\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "1608ecfb",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Extract one roi\n",
"extract_ref = pe.MapNode(interface=fsl.ExtractROI(t_size=1), \n",
" name='extractref',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(img2float, 'out_file', extract_ref, 'in_file')\n",
"\n",
"# Define a function to return the 1 based index of the middle volume\n",
"def getmiddlevolume(func):\n",
" from nibabel import load\n",
" funcfile = func\n",
" if isinstance(func, list):\n",
" funcfile = func[0]\n",
" _, _, _, timepoints = load(funcfile).shape\n",
" return int(timepoints/2) \n",
"\n",
"wf_first.connect(img2float, ('out_file', getmiddlevolume), extract_ref, 't_min')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a97d795e",
"metadata": {},
"source": [
"## Preprocessing"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "93cb4219",
"metadata": {},
"source": [
"### Motion Correction"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "35fb8c52",
"metadata": {},
"source": [
"Realign the functional runs to the middle volume of each run\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/mcflirt -in prefiltered_func_data -out prefiltered_func_data_mcf -mats -plots -reffile example_func -rmsrel -rmsabs -spline_final\n",
"```\n",
"\n",
"```\n",
"save_mats (a boolean) – Save transformation matrices. Maps to a command-line argument: -mats.\n",
"save_plots (a boolean) – Save transformation parameters. Maps to a command-line argument: -plots.\n",
"save_rms (a boolean) – Save rms displacement parameters. Maps to a command-line argument: -rmsabs -rmsrel.\n",
"Interpolation (‘spline’ or ‘nn’ or ‘sinc’) – Interpolation method for transformation. Maps to a command-line argument: -%s_final.\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "eda5a70e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"motion_correct = pe.MapNode(\n",
" interface=fsl.MCFLIRT(save_mats=True, save_plots=True, save_rms=True, interpolation='spline'),\n",
" name='realign',\n",
" iterfield=['in_file','ref_file'])\n",
"wf_first.connect(img2float, 'out_file', motion_correct, 'in_file')\n",
"wf_first.connect(extract_ref, 'roi_file', motion_correct, 'ref_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "73d650f2",
"metadata": {},
"source": [
"Plot the estimated motion parameters\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fsl_tsplot -i prefiltered_func_data_mcf.par -t 'MCFLIRT estimated rotations (radians)' -u 1 --start=1 --finish=3 -a x,y,z -w 640 -h 144 -o rot.png \n",
"\n",
"/usr/local/fsl/bin/fsl_tsplot -i prefiltered_func_data_mcf.par -t 'MCFLIRT estimated translations (mm)' -u 1 --start=4 --finish=6 -a x,y,z -w 640 -h 144 -o trans.png \n",
"\n",
"/usr/local/fsl/bin/fsl_tsplot -i prefiltered_func_data_mcf_abs.rms,prefiltered_func_data_mcf_rel.rms -t 'MCFLIRT estimated mean displacement (mm)' -u 1 -w 640 -h 144 -a absolute,relative -o disp.png\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "9b8ee86c",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"plot_motion = pe.MapNode(\n",
" interface=fsl.PlotMotionParams(in_source='fsl'),\n",
" name='plot_motion',\n",
" iterfield=['in_file'])\n",
"plot_motion.iterables = ('plot_type', ['rotations', 'translations','displacement'])\n",
"wf_first.connect(motion_correct, 'par_file', plot_motion, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ae7565b1",
"metadata": {},
"source": [
"### Functionally Masking\n",
"\n",
"```\n",
"Passing the reference volume to the FSL command-line tool bet to generate a binary brain mask and afterward multiplying the processed functional time series by the brain mask using the fslmaths command to produce a skull-stripped time series.\n",
"```\n",
"\n",
"See [Ciric et al.(2018)](https://www.nature.com/articles/s41596-018-0065-y)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "534139ea",
"metadata": {},
"source": [
"Extract the mean volume of each functional run\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths prefiltered_func_data_mcf -Tmean mean_func\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "8811bff3",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"meanfunc = pe.MapNode(\n",
" interface=fsl.ImageMaths(op_string='-Tmean', suffix='_mean'),\n",
" name='meanfunc',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(motion_correct, 'out_file', meanfunc, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "4b2ce3cc",
"metadata": {},
"source": [
"Strip the skull from the mean functional to generate a mask\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/bet2 mean_func mask -f 0.3 -n -m; /usr/local/fsl/bin/immv mask_mask mask\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "9dd9aaf4",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"meanfuncmask = pe.MapNode(\n",
" interface=fsl.BET(mask=True, no_output=True, frac=0.3),\n",
" name='meanfuncmask',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(meanfunc, 'out_file', meanfuncmask, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "aad51d3c",
"metadata": {},
"source": [
"Mask the functional data with the extracted mask\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths prefiltered_func_data_mcf -mas mask prefiltered_func_data_bet\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "2e1aa1d1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"maskfunc = pe.MapNode(\n",
" interface=fsl.ImageMaths(suffix='_bet', op_string='-mas'),\n",
" name='maskfunc',\n",
" iterfield=['in_file','in_file2'])\n",
"wf_first.connect(motion_correct, 'out_file', maskfunc, 'in_file')\n",
"wf_first.connect(meanfuncmask, 'mask_file', maskfunc, 'in_file2')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "2823f634",
"metadata": {},
"source": [
"### Grand Mean Scaling"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "31b58119",
"metadata": {},
"source": [
"Determine the 2nd and 98th percentile intensities \n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslstats prefiltered_func_data_bet -p 2 -p 98\n",
"0.000000 873.492249 (these numbers are for subject-11 run-01)\n",
"```\n",
"\n",
"More info [here](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Fslutils)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "e0f16d26",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"getthresh = pe.MapNode(\n",
" interface=fsl.ImageStats(op_string='-p 2 -p 98'),\n",
" name='getthreshold',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(maskfunc, 'out_file', getthresh, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "dba722a3",
"metadata": {},
"source": [
"Threshold the first TR of the functional data at 10% of the 98th percentile\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths prefiltered_func_data_bet -thr 87.3492249 -Tmin -bin mask -odt char\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "3923c97d",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"threshold = pe.MapNode(\n",
" interface=fsl.ImageMaths(out_data_type='char', suffix='_thresh'),\n",
" name='threshold',\n",
" iterfield=['in_file','op_string'])\n",
"wf_first.connect(maskfunc, 'out_file', threshold, 'in_file')\n",
"\n",
"# Define a function to get 10% of the intensity\n",
"def getthreshop(thresh):\n",
" return ['-thr %.10f -Tmin -bin' % (0.1 * th[1]) for th in thresh]\n",
"\n",
"wf_first.connect(getthresh, ('out_stat', getthreshop), threshold, 'op_string')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "c9d0c011",
"metadata": {},
"source": [
"Determine the median value of the TRs using the mask\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslstats prefiltered_func_data_mcf -k mask -p 50\n",
"728.800232 (this number is for subject-11 run-01)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "1a0e03cf",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"medianval = pe.MapNode(\n",
" interface=fsl.ImageStats(op_string='-k %s -p 50'),\n",
" name='medianval',\n",
" iterfield=['in_file','mask_file'])\n",
"wf_first.connect(motion_correct, 'out_file', medianval, 'in_file')\n",
"wf_first.connect(threshold, 'out_file', medianval, 'mask_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "96534375",
"metadata": {},
"source": [
"Dilate the mask\n",
"\n",
"The brain mask is \"dilated\" slightly before being used. Because it is normally important that masking be liberal (ie that there be little risk of cutting out valid brain voxels) "
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "fb9b43e0",
"metadata": {},
"source": [
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths mask -dilF mask\n",
"```\n",
"\n",
"The output of `dilatemask` (i.e., `/srv/scratch/yc/fsl/hw2/level1/_subject_id_26/dilatemask/mapflow/_dilatemask0/sub-26_task-flanker_run-1_bold_dtype_mcf_bet_thresh_dil.nii.gz`) is equivalent to `mask.nii.gz` from FSL GUI."
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "834c7b35",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"dilatemask = pe.MapNode(\n",
" interface=fsl.ImageMaths(suffix='_dil', op_string='-dilF'),\n",
" name='dilatemask',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(threshold, 'out_file', dilatemask, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ce7ee232",
"metadata": {},
"source": [
"Mask the motion corrected functional runs with the dilated mask\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths prefiltered_func_data_mcf -mas mask prefiltered_func_data_thresh\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "b950981d",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"maskfunc2 = pe.MapNode(\n",
" interface=fsl.ImageMaths(suffix='_thresh', op_string='-mas'),\n",
" iterfield=['in_file','in_file2'],\n",
" name='maskfunc2')\n",
"wf_first.connect(motion_correct, 'out_file', maskfunc2, 'in_file')\n",
"wf_first.connect(dilatemask, 'out_file', maskfunc2, 'in_file2')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "39b0fe34",
"metadata": {},
"source": [
"### SUSAN Noise Reduction"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "3d8173f0",
"metadata": {},
"source": [
"Determine the mean image from each TR\n",
"\n",
"**Corresponding FSL command:**\n",
"\n",
"```\n",
"/usr/local/fsl/bin/fslmaths prefiltered_func_data_thresh -Tmean mean_func\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "88faf6fb",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"meanfunc2 = pe.MapNode(\n",
" interface=fsl.ImageMaths(op_string='-Tmean', suffix='_mean'),\n",
" name='meanfunc2',\n",
" iterfield=['in_file'])\n",
"wf_first.connect(maskfunc2, 'out_file', meanfunc2, 'in_file')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a55cddbb",
"metadata": {},
"source": [
"Merge the median values with the mean functional images into a coupled list\n",
"\n",
"The output of this `merge` node will go into `susan` as `usans`,"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "6342ab2e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# why here use node not mapnode?\n",
"mergenode = pe.Node(interface=util.Merge(2, axis='hstack'), \n",
" name='merge')\n",
"wf_first.connect(meanfunc2, 'out_file', mergenode, 'in1')\n",
"wf_first.connect(medianval, 'out_stat', mergenode, 'in2')"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "6817330a",
"metadata": {},
"source": [
"Smooth each run using SUSAN with the brightness threshold set to 75% of the median value for each run and a mask constituting the mean functional\n",
"\n",
"```\n",
"Usage: susan [ [ ]]