RecoBundles80 using AFQ API

An example using the AFQ API to run recobundles with the 80 bundle atlas.

import os.path as op

import plotly

from AFQ import api
import AFQ.data as afd

Get some example data

Retrieves Stanford HARDI dataset.

afd.organize_stanford_data(clear_previous_afq=True)

Out:

  0%|          | 0/5578 [00:00<?, ? MB/s]
  0%|          | 3/5578 [00:00<05:03, 18.39 MB/s]
  0%|          | 7/5578 [00:00<04:11, 22.15 MB/s]
  0%|          | 13/5578 [00:00<03:12, 28.86 MB/s]
  0%|          | 20/5578 [00:00<02:41, 34.42 MB/s]
  1%|          | 29/5578 [00:00<02:12, 41.91 MB/s]
  1%|          | 40/5578 [00:00<01:49, 50.63 MB/s]
  1%|          | 53/5578 [00:01<01:31, 60.16 MB/s]
  1%|1         | 69/5578 [00:01<01:16, 72.24 MB/s]
  2%|1         | 85/5578 [00:01<01:08, 80.30 MB/s]
  2%|1         | 101/5578 [00:01<01:03, 85.82 MB/s]
  2%|2         | 117/5578 [00:01<01:00, 89.54 MB/s]
  2%|2         | 133/5578 [00:01<00:59, 92.13 MB/s]
  3%|2         | 149/5578 [00:02<00:57, 93.98 MB/s]
  3%|2         | 164/5578 [00:02<00:58, 93.29 MB/s]
  3%|3         | 180/5578 [00:02<00:57, 94.67 MB/s]
  4%|3         | 196/5578 [00:02<00:56, 95.82 MB/s]
  4%|3         | 212/5578 [00:02<00:55, 96.50 MB/s]
  4%|4         | 228/5578 [00:02<00:55, 97.03 MB/s]
  4%|4         | 244/5578 [00:03<00:54, 97.34 MB/s]
  5%|4         | 260/5578 [00:03<00:54, 96.73 MB/s]
  5%|4         | 275/5578 [00:03<00:50, 104.02 MB/s]
  5%|5         | 286/5578 [00:03<00:53, 99.37 MB/s]
  5%|5         | 299/5578 [00:03<00:56, 92.96 MB/s]
  6%|5         | 315/5578 [00:03<00:55, 94.68 MB/s]
  6%|5         | 331/5578 [00:03<00:54, 95.68 MB/s]
  6%|6         | 347/5578 [00:04<00:54, 96.41 MB/s]
  7%|6         | 363/5578 [00:04<00:53, 96.84 MB/s]
  7%|6         | 379/5578 [00:04<00:53, 97.27 MB/s]
  7%|7         | 395/5578 [00:04<00:53, 97.57 MB/s]
  7%|7         | 411/5578 [00:04<00:52, 97.80 MB/s]
  8%|7         | 426/5578 [00:04<00:53, 96.05 MB/s]
  8%|7         | 442/5578 [00:05<00:53, 96.71 MB/s]
  8%|8         | 458/5578 [00:05<00:52, 97.20 MB/s]
  8%|8         | 474/5578 [00:05<00:52, 97.49 MB/s]
  9%|8         | 490/5578 [00:05<00:52, 97.72 MB/s]
  9%|9         | 506/5578 [00:05<00:51, 97.86 MB/s]
  9%|9         | 522/5578 [00:05<00:51, 98.05 MB/s]
 10%|9         | 538/5578 [00:06<00:51, 98.10 MB/s]
 10%|9         | 554/5578 [00:06<00:51, 98.06 MB/s]
 10%|#         | 569/5578 [00:06<00:48, 104.03 MB/s]
 10%|#         | 580/5578 [00:06<00:49, 100.07 MB/s]
 11%|#         | 593/5578 [00:06<00:53, 93.80 MB/s]
 11%|#         | 609/5578 [00:06<00:52, 95.20 MB/s]
 11%|#1        | 625/5578 [00:07<00:51, 96.19 MB/s]
 11%|#1        | 641/5578 [00:07<00:51, 96.77 MB/s]
 12%|#1        | 657/5578 [00:07<00:50, 97.13 MB/s]
 12%|#2        | 673/5578 [00:07<00:50, 97.52 MB/s]
 12%|#2        | 689/5578 [00:07<00:50, 97.76 MB/s]
 13%|#2        | 705/5578 [00:07<00:49, 97.87 MB/s]
 13%|#2        | 720/5578 [00:07<00:50, 96.10 MB/s]
 13%|#3        | 736/5578 [00:08<00:50, 96.74 MB/s]
 13%|#3        | 752/5578 [00:08<00:49, 97.15 MB/s]
 14%|#3        | 768/5578 [00:08<00:49, 97.44 MB/s]
 14%|#4        | 784/5578 [00:08<00:49, 97.68 MB/s]
 14%|#4        | 800/5578 [00:08<00:48, 97.78 MB/s]
 15%|#4        | 816/5578 [00:08<00:48, 97.92 MB/s]
 15%|#4        | 832/5578 [00:09<00:48, 97.82 MB/s]
 15%|#5        | 847/5578 [00:09<00:49, 96.13 MB/s]
 15%|#5        | 863/5578 [00:09<00:48, 96.78 MB/s]
 16%|#5        | 879/5578 [00:09<00:48, 97.20 MB/s]
 16%|#6        | 895/5578 [00:09<00:48, 97.52 MB/s]
 16%|#6        | 911/5578 [00:09<00:47, 97.77 MB/s]
 17%|#6        | 927/5578 [00:10<00:47, 97.88 MB/s]
 17%|#6        | 943/5578 [00:10<00:47, 97.98 MB/s]
 17%|#7        | 959/5578 [00:10<00:47, 98.02 MB/s]
 17%|#7        | 975/5578 [00:10<00:47, 97.10 MB/s]
 18%|#7        | 991/5578 [00:10<00:47, 97.49 MB/s]
 18%|#8        | 1006/5578 [00:10<00:44, 102.94 MB/s]
 18%|#8        | 1017/5578 [00:11<00:45, 99.95 MB/s]
 18%|#8        | 1030/5578 [00:11<00:48, 94.45 MB/s]
 19%|#8        | 1046/5578 [00:11<00:47, 95.74 MB/s]
 19%|#9        | 1062/5578 [00:11<00:46, 96.43 MB/s]
 19%|#9        | 1078/5578 [00:11<00:46, 96.22 MB/s]
 20%|#9        | 1094/5578 [00:11<00:46, 96.83 MB/s]
 20%|#9        | 1110/5578 [00:11<00:45, 97.23 MB/s]
 20%|##        | 1126/5578 [00:12<00:45, 97.49 MB/s]
 20%|##        | 1142/5578 [00:12<00:45, 97.73 MB/s]
 21%|##        | 1157/5578 [00:12<00:43, 102.43 MB/s]
 21%|##        | 1168/5578 [00:12<00:43, 100.62 MB/s]
 21%|##1       | 1181/5578 [00:12<00:46, 93.74 MB/s]
 21%|##1       | 1197/5578 [00:12<00:46, 94.88 MB/s]
 22%|##1       | 1213/5578 [00:13<00:45, 95.95 MB/s]
 22%|##2       | 1229/5578 [00:13<00:45, 96.60 MB/s]
 22%|##2       | 1239/5578 [00:13<00:45, 96.01 MB/s]
 22%|##2       | 1253/5578 [00:13<00:46, 92.84 MB/s]
 23%|##2       | 1269/5578 [00:13<00:45, 94.58 MB/s]
 23%|##3       | 1285/5578 [00:13<00:44, 95.70 MB/s]
 23%|##3       | 1301/5578 [00:13<00:44, 96.51 MB/s]
 24%|##3       | 1317/5578 [00:14<00:43, 96.97 MB/s]
 24%|##3       | 1332/5578 [00:14<00:44, 95.52 MB/s]
 24%|##4       | 1348/5578 [00:14<00:43, 96.39 MB/s]
 24%|##4       | 1364/5578 [00:14<00:43, 96.92 MB/s]
 25%|##4       | 1380/5578 [00:14<00:43, 97.19 MB/s]
 25%|##5       | 1396/5578 [00:14<00:42, 97.42 MB/s]
 25%|##5       | 1412/5578 [00:15<00:42, 97.68 MB/s]
 26%|##5       | 1428/5578 [00:15<00:42, 97.80 MB/s]
 26%|##5       | 1444/5578 [00:15<00:42, 98.01 MB/s]
 26%|##6       | 1460/5578 [00:15<00:41, 98.08 MB/s]
 26%|##6       | 1475/5578 [00:15<00:40, 102.27 MB/s]
 27%|##6       | 1486/5578 [00:15<00:40, 100.81 MB/s]
 27%|##6       | 1499/5578 [00:16<00:43, 93.89 MB/s]
 27%|##7       | 1515/5578 [00:16<00:42, 95.33 MB/s]
 27%|##7       | 1531/5578 [00:16<00:42, 96.17 MB/s]
 28%|##7       | 1547/5578 [00:16<00:41, 96.86 MB/s]
 28%|##8       | 1563/5578 [00:16<00:41, 97.23 MB/s]
 28%|##8       | 1579/5578 [00:16<00:40, 97.55 MB/s]
 29%|##8       | 1595/5578 [00:16<00:40, 97.76 MB/s]
 29%|##8       | 1611/5578 [00:17<00:40, 97.87 MB/s]
 29%|##9       | 1627/5578 [00:17<00:40, 97.62 MB/s]
 29%|##9       | 1643/5578 [00:17<00:40, 97.74 MB/s]
 30%|##9       | 1658/5578 [00:17<00:40, 95.89 MB/s]
 30%|###       | 1674/5578 [00:17<00:40, 96.55 MB/s]
 30%|###       | 1690/5578 [00:17<00:40, 96.93 MB/s]
 31%|###       | 1706/5578 [00:18<00:39, 97.31 MB/s]
 31%|###       | 1722/5578 [00:18<00:39, 97.57 MB/s]
 31%|###1      | 1738/5578 [00:18<00:39, 97.70 MB/s]
 31%|###1      | 1754/5578 [00:18<00:39, 97.66 MB/s]
 32%|###1      | 1770/5578 [00:18<00:38, 97.77 MB/s]
 32%|###2      | 1786/5578 [00:18<00:38, 97.96 MB/s]
 32%|###2      | 1802/5578 [00:19<00:38, 98.01 MB/s]
 33%|###2      | 1817/5578 [00:19<00:39, 96.16 MB/s]
 33%|###2      | 1833/5578 [00:19<00:38, 96.68 MB/s]
 33%|###3      | 1849/5578 [00:19<00:38, 97.09 MB/s]
 33%|###3      | 1865/5578 [00:19<00:38, 97.00 MB/s]
 34%|###3      | 1881/5578 [00:19<00:37, 97.39 MB/s]
 34%|###4      | 1897/5578 [00:20<00:37, 97.69 MB/s]
 34%|###4      | 1913/5578 [00:20<00:37, 97.82 MB/s]
 35%|###4      | 1929/5578 [00:20<00:37, 97.98 MB/s]
 35%|###4      | 1945/5578 [00:20<00:37, 98.00 MB/s]
 35%|###5      | 1961/5578 [00:20<00:36, 97.87 MB/s]
 35%|###5      | 1976/5578 [00:20<00:37, 96.34 MB/s]
 36%|###5      | 1992/5578 [00:21<00:37, 96.87 MB/s]
 36%|###5      | 2008/5578 [00:21<00:36, 97.36 MB/s]
 36%|###6      | 2024/5578 [00:21<00:36, 97.60 MB/s]
 37%|###6      | 2040/5578 [00:21<00:36, 97.79 MB/s]
 37%|###6      | 2056/5578 [00:21<00:35, 97.83 MB/s]
 37%|###7      | 2072/5578 [00:21<00:35, 98.02 MB/s]
 37%|###7      | 2088/5578 [00:22<00:35, 98.07 MB/s]
 38%|###7      | 2104/5578 [00:22<00:35, 98.05 MB/s]
 38%|###7      | 2119/5578 [00:22<00:35, 96.23 MB/s]
 38%|###8      | 2135/5578 [00:22<00:35, 96.69 MB/s]
 39%|###8      | 2151/5578 [00:22<00:35, 97.16 MB/s]
 39%|###8      | 2167/5578 [00:22<00:34, 97.50 MB/s]
 39%|###9      | 2183/5578 [00:23<00:34, 97.64 MB/s]
 39%|###9      | 2199/5578 [00:23<00:34, 97.86 MB/s]
 40%|###9      | 2215/5578 [00:23<00:34, 97.88 MB/s]
 40%|###9      | 2230/5578 [00:23<00:33, 100.30 MB/s]
 40%|####      | 2241/5578 [00:23<00:33, 98.85 MB/s]
 40%|####      | 2254/5578 [00:23<00:35, 94.90 MB/s]
 41%|####      | 2264/5578 [00:23<00:34, 96.00 MB/s]
 41%|####      | 2278/5578 [00:24<00:34, 96.40 MB/s]
 41%|####1     | 2288/5578 [00:24<00:33, 97.22 MB/s]
 41%|####1     | 2302/5578 [00:24<00:34, 94.58 MB/s]
 42%|####1     | 2318/5578 [00:24<00:34, 95.77 MB/s]
 42%|####1     | 2334/5578 [00:24<00:33, 96.04 MB/s]
 42%|####2     | 2350/5578 [00:24<00:33, 96.74 MB/s]
 42%|####2     | 2365/5578 [00:24<00:33, 95.32 MB/s]
 43%|####2     | 2381/5578 [00:25<00:33, 96.15 MB/s]
 43%|####2     | 2397/5578 [00:25<00:32, 96.65 MB/s]
 43%|####3     | 2413/5578 [00:25<00:32, 97.12 MB/s]
 44%|####3     | 2429/5578 [00:25<00:32, 97.40 MB/s]
 44%|####3     | 2445/5578 [00:25<00:32, 97.65 MB/s]
 44%|####4     | 2461/5578 [00:25<00:31, 97.81 MB/s]
 44%|####4     | 2476/5578 [00:26<00:30, 102.90 MB/s]
 45%|####4     | 2487/5578 [00:26<00:30, 100.30 MB/s]
 45%|####4     | 2500/5578 [00:26<00:32, 93.89 MB/s]
 45%|####5     | 2516/5578 [00:26<00:32, 95.35 MB/s]
 45%|####5     | 2532/5578 [00:26<00:31, 96.29 MB/s]
 46%|####5     | 2548/5578 [00:26<00:31, 96.90 MB/s]
 46%|####5     | 2564/5578 [00:26<00:30, 97.33 MB/s]
 46%|####6     | 2580/5578 [00:27<00:30, 97.55 MB/s]
 47%|####6     | 2596/5578 [00:27<00:30, 97.75 MB/s]
 47%|####6     | 2611/5578 [00:27<00:30, 96.04 MB/s]
 47%|####7     | 2627/5578 [00:27<00:30, 96.57 MB/s]
 47%|####7     | 2643/5578 [00:27<00:30, 96.99 MB/s]
 48%|####7     | 2659/5578 [00:27<00:29, 97.38 MB/s]
 48%|####7     | 2675/5578 [00:28<00:29, 97.65 MB/s]
 48%|####8     | 2691/5578 [00:28<00:29, 97.80 MB/s]
 49%|####8     | 2707/5578 [00:28<00:29, 97.85 MB/s]
 49%|####8     | 2723/5578 [00:28<00:29, 97.83 MB/s]
 49%|####9     | 2738/5578 [00:28<00:29, 96.09 MB/s]
 49%|####9     | 2754/5578 [00:28<00:29, 96.71 MB/s]
 50%|####9     | 2770/5578 [00:29<00:28, 97.20 MB/s]
 50%|####9     | 2786/5578 [00:29<00:28, 97.39 MB/s]
 50%|#####     | 2802/5578 [00:29<00:28, 97.50 MB/s]
 51%|#####     | 2818/5578 [00:29<00:28, 97.69 MB/s]
 51%|#####     | 2834/5578 [00:29<00:28, 97.83 MB/s]
 51%|#####1    | 2849/5578 [00:29<00:26, 104.11 MB/s]
 51%|#####1    | 2860/5578 [00:29<00:27, 100.11 MB/s]
 52%|#####1    | 2873/5578 [00:30<00:28, 93.37 MB/s]
 52%|#####1    | 2889/5578 [00:30<00:28, 94.84 MB/s]
 52%|#####2    | 2905/5578 [00:30<00:27, 95.90 MB/s]
 52%|#####2    | 2921/5578 [00:30<00:27, 96.60 MB/s]
 53%|#####2    | 2937/5578 [00:30<00:27, 97.16 MB/s]
 53%|#####2    | 2953/5578 [00:30<00:26, 97.42 MB/s]
 53%|#####3    | 2969/5578 [00:31<00:26, 97.68 MB/s]
 54%|#####3    | 2985/5578 [00:31<00:26, 97.85 MB/s]
 54%|#####3    | 3000/5578 [00:31<00:26, 96.11 MB/s]
 54%|#####4    | 3016/5578 [00:31<00:26, 96.72 MB/s]
 54%|#####4    | 3032/5578 [00:31<00:26, 97.15 MB/s]
 55%|#####4    | 3048/5578 [00:31<00:25, 97.43 MB/s]
 55%|#####4    | 3064/5578 [00:32<00:25, 97.61 MB/s]
 55%|#####5    | 3080/5578 [00:32<00:25, 96.91 MB/s]
 56%|#####5    | 3096/5578 [00:32<00:25, 97.28 MB/s]
 56%|#####5    | 3112/5578 [00:32<00:25, 97.61 MB/s]
 56%|#####6    | 3127/5578 [00:32<00:25, 95.95 MB/s]
 56%|#####6    | 3143/5578 [00:32<00:25, 96.65 MB/s]
 57%|#####6    | 3159/5578 [00:33<00:24, 97.11 MB/s]
 57%|#####6    | 3175/5578 [00:33<00:24, 97.32 MB/s]
 57%|#####7    | 3191/5578 [00:33<00:24, 97.61 MB/s]
 57%|#####7    | 3207/5578 [00:33<00:24, 97.74 MB/s]
 58%|#####7    | 3223/5578 [00:33<00:24, 97.84 MB/s]
 58%|#####8    | 3239/5578 [00:33<00:23, 97.98 MB/s]
 58%|#####8    | 3255/5578 [00:34<00:23, 98.10 MB/s]
 59%|#####8    | 3270/5578 [00:34<00:23, 96.22 MB/s]
 59%|#####8    | 3286/5578 [00:34<00:23, 96.83 MB/s]
 59%|#####9    | 3302/5578 [00:34<00:23, 97.26 MB/s]
 59%|#####9    | 3318/5578 [00:34<00:23, 97.52 MB/s]
 60%|#####9    | 3334/5578 [00:34<00:22, 97.70 MB/s]
 60%|######    | 3350/5578 [00:35<00:22, 97.84 MB/s]
 60%|######    | 3366/5578 [00:35<00:22, 97.84 MB/s]
 61%|######    | 3382/5578 [00:35<00:22, 97.84 MB/s]
 61%|######    | 3397/5578 [00:35<00:22, 96.14 MB/s]
 61%|######1   | 3413/5578 [00:35<00:22, 96.60 MB/s]
 61%|######1   | 3429/5578 [00:35<00:22, 97.00 MB/s]
 62%|######1   | 3445/5578 [00:36<00:21, 97.31 MB/s]
 62%|######2   | 3461/5578 [00:36<00:21, 97.51 MB/s]
 62%|######2   | 3477/5578 [00:36<00:21, 97.70 MB/s]
 63%|######2   | 3493/5578 [00:36<00:21, 97.84 MB/s]
 63%|######2   | 3509/5578 [00:36<00:21, 97.55 MB/s]
 63%|######3   | 3524/5578 [00:36<00:21, 96.34 MB/s]
 63%|######3   | 3540/5578 [00:36<00:21, 96.88 MB/s]
 64%|######3   | 3556/5578 [00:37<00:20, 97.25 MB/s]
 64%|######4   | 3572/5578 [00:37<00:20, 97.63 MB/s]
 64%|######4   | 3588/5578 [00:37<00:20, 97.80 MB/s]
 65%|######4   | 3604/5578 [00:37<00:20, 97.76 MB/s]
 65%|######4   | 3620/5578 [00:37<00:20, 97.89 MB/s]
 65%|######5   | 3635/5578 [00:37<00:19, 101.90 MB/s]
 65%|######5   | 3646/5578 [00:38<00:19, 99.15 MB/s]
 66%|######5   | 3659/5578 [00:38<00:20, 94.49 MB/s]
 66%|######5   | 3675/5578 [00:38<00:19, 95.71 MB/s]
 66%|######6   | 3691/5578 [00:38<00:19, 96.43 MB/s]
 66%|######6   | 3707/5578 [00:38<00:19, 96.99 MB/s]
 67%|######6   | 3723/5578 [00:38<00:19, 97.36 MB/s]
 67%|######7   | 3739/5578 [00:39<00:18, 97.61 MB/s]
 67%|######7   | 3754/5578 [00:39<00:18, 96.00 MB/s]
 68%|######7   | 3770/5578 [00:39<00:18, 96.63 MB/s]
 68%|######7   | 3786/5578 [00:39<00:18, 97.13 MB/s]
 68%|######8   | 3802/5578 [00:39<00:18, 97.46 MB/s]
 68%|######8   | 3818/5578 [00:39<00:18, 97.69 MB/s]
 69%|######8   | 3834/5578 [00:39<00:17, 97.72 MB/s]
 69%|######9   | 3850/5578 [00:40<00:17, 97.83 MB/s]
 69%|######9   | 3866/5578 [00:40<00:17, 97.44 MB/s]
 70%|######9   | 3882/5578 [00:40<00:17, 96.84 MB/s]
 70%|######9   | 3898/5578 [00:40<00:17, 97.21 MB/s]
 70%|#######   | 3913/5578 [00:40<00:16, 102.40 MB/s]
 70%|#######   | 3924/5578 [00:40<00:16, 100.06 MB/s]
 71%|#######   | 3937/5578 [00:41<00:17, 94.93 MB/s]
 71%|#######   | 3953/5578 [00:41<00:16, 95.99 MB/s]
 71%|#######1  | 3969/5578 [00:41<00:16, 96.72 MB/s]
 71%|#######1  | 3985/5578 [00:41<00:16, 95.70 MB/s]
 72%|#######1  | 4001/5578 [00:41<00:16, 96.42 MB/s]
 72%|#######2  | 4017/5578 [00:41<00:16, 97.06 MB/s]
 72%|#######2  | 4033/5578 [00:42<00:15, 97.39 MB/s]
 73%|#######2  | 4049/5578 [00:42<00:15, 97.50 MB/s]
 73%|#######2  | 4064/5578 [00:42<00:14, 102.94 MB/s]
 73%|#######3  | 4075/5578 [00:42<00:15, 100.10 MB/s]
 73%|#######3  | 4088/5578 [00:42<00:15, 93.58 MB/s]
 74%|#######3  | 4104/5578 [00:42<00:15, 95.05 MB/s]
 74%|#######3  | 4120/5578 [00:42<00:15, 95.78 MB/s]
 74%|#######4  | 4136/5578 [00:43<00:14, 96.46 MB/s]
 74%|#######4  | 4152/5578 [00:43<00:14, 97.00 MB/s]
 75%|#######4  | 4168/5578 [00:43<00:14, 97.44 MB/s]
 75%|#######5  | 4184/5578 [00:43<00:14, 97.66 MB/s]
 75%|#######5  | 4200/5578 [00:43<00:14, 97.70 MB/s]
 76%|#######5  | 4216/5578 [00:43<00:13, 97.81 MB/s]
 76%|#######5  | 4232/5578 [00:44<00:13, 97.92 MB/s]
 76%|#######6  | 4247/5578 [00:44<00:13, 96.16 MB/s]
 76%|#######6  | 4263/5578 [00:44<00:13, 96.33 MB/s]
 77%|#######6  | 4279/5578 [00:44<00:13, 96.84 MB/s]
 77%|#######6  | 4295/5578 [00:44<00:13, 97.24 MB/s]
 77%|#######7  | 4311/5578 [00:44<00:13, 97.42 MB/s]
 78%|#######7  | 4327/5578 [00:45<00:12, 97.67 MB/s]
 78%|#######7  | 4343/5578 [00:45<00:12, 97.76 MB/s]
 78%|#######8  | 4359/5578 [00:45<00:12, 97.90 MB/s]
 78%|#######8  | 4375/5578 [00:45<00:12, 97.97 MB/s]
 79%|#######8  | 4391/5578 [00:45<00:12, 98.03 MB/s]
 79%|#######9  | 4407/5578 [00:45<00:11, 98.01 MB/s]
 79%|#######9  | 4422/5578 [00:46<00:12, 96.24 MB/s]
 80%|#######9  | 4438/5578 [00:46<00:11, 96.83 MB/s]
 80%|#######9  | 4454/5578 [00:46<00:11, 97.22 MB/s]
 80%|########  | 4470/5578 [00:46<00:11, 97.46 MB/s]
 80%|########  | 4486/5578 [00:46<00:11, 97.63 MB/s]
 81%|########  | 4502/5578 [00:46<00:11, 97.81 MB/s]
 81%|########  | 4518/5578 [00:47<00:10, 97.92 MB/s]
 81%|########1 | 4534/5578 [00:47<00:10, 98.04 MB/s]
 82%|########1 | 4550/5578 [00:47<00:10, 98.05 MB/s]
 82%|########1 | 4566/5578 [00:47<00:10, 98.02 MB/s]
 82%|########2 | 4581/5578 [00:47<00:10, 96.37 MB/s]
 82%|########2 | 4597/5578 [00:47<00:10, 96.85 MB/s]
 83%|########2 | 4613/5578 [00:47<00:09, 97.22 MB/s]
 83%|########2 | 4629/5578 [00:48<00:09, 97.48 MB/s]
 83%|########3 | 4645/5578 [00:48<00:09, 97.65 MB/s]
 84%|########3 | 4661/5578 [00:48<00:09, 97.81 MB/s]
 84%|########3 | 4677/5578 [00:48<00:09, 97.95 MB/s]
 84%|########4 | 4692/5578 [00:48<00:08, 103.56 MB/s]
 84%|########4 | 4703/5578 [00:48<00:08, 100.46 MB/s]
 85%|########4 | 4716/5578 [00:49<00:09, 93.69 MB/s]
 85%|########4 | 4732/5578 [00:49<00:08, 95.14 MB/s]
 85%|########5 | 4748/5578 [00:49<00:08, 95.92 MB/s]
 85%|########5 | 4764/5578 [00:49<00:08, 96.63 MB/s]
 86%|########5 | 4780/5578 [00:49<00:08, 97.04 MB/s]
 86%|########5 | 4796/5578 [00:49<00:08, 97.36 MB/s]
 86%|########6 | 4812/5578 [00:50<00:07, 97.08 MB/s]
 87%|########6 | 4828/5578 [00:50<00:07, 97.33 MB/s]
 87%|########6 | 4844/5578 [00:50<00:07, 97.56 MB/s]
 87%|########7 | 4860/5578 [00:50<00:07, 97.81 MB/s]
 87%|########7 | 4876/5578 [00:50<00:07, 96.80 MB/s]
 88%|########7 | 4891/5578 [00:50<00:06, 105.55 MB/s]
 88%|########7 | 4902/5578 [00:50<00:06, 98.71 MB/s]
 88%|########8 | 4915/5578 [00:51<00:07, 92.69 MB/s]
 88%|########8 | 4931/5578 [00:51<00:06, 94.46 MB/s]
 89%|########8 | 4947/5578 [00:51<00:06, 95.59 MB/s]
 89%|########8 | 4963/5578 [00:51<00:06, 96.31 MB/s]
 89%|########9 | 4979/5578 [00:51<00:06, 96.95 MB/s]
 90%|########9 | 4995/5578 [00:51<00:05, 97.40 MB/s]
 90%|########9 | 5011/5578 [00:52<00:05, 97.55 MB/s]
 90%|######### | 5027/5578 [00:52<00:05, 97.25 MB/s]
 90%|######### | 5043/5578 [00:52<00:05, 97.52 MB/s]
 91%|######### | 5058/5578 [00:52<00:05, 103.99 MB/s]
 91%|######### | 5069/5578 [00:52<00:05, 99.98 MB/s]
 91%|#########1| 5082/5578 [00:52<00:05, 93.52 MB/s]
 91%|#########1| 5098/5578 [00:52<00:05, 94.83 MB/s]
 92%|#########1| 5114/5578 [00:53<00:04, 95.82 MB/s]
 92%|#########1| 5130/5578 [00:53<00:04, 96.47 MB/s]
 92%|#########2| 5146/5578 [00:53<00:04, 96.68 MB/s]
 93%|#########2| 5162/5578 [00:53<00:04, 97.06 MB/s]
 93%|#########2| 5178/5578 [00:53<00:04, 97.35 MB/s]
 93%|#########3| 5193/5578 [00:53<00:04, 96.02 MB/s]
 93%|#########3| 5209/5578 [00:54<00:03, 96.71 MB/s]
 94%|#########3| 5225/5578 [00:54<00:03, 97.25 MB/s]
 94%|#########3| 5241/5578 [00:54<00:03, 97.23 MB/s]
 94%|#########4| 5257/5578 [00:54<00:03, 97.47 MB/s]
 95%|#########4| 5273/5578 [00:54<00:03, 97.82 MB/s]
 95%|#########4| 5289/5578 [00:54<00:02, 97.86 MB/s]
 95%|#########5| 5304/5578 [00:55<00:02, 96.58 MB/s]
 95%|#########5| 5320/5578 [00:55<00:02, 97.08 MB/s]
 96%|#########5| 5336/5578 [00:55<00:02, 97.43 MB/s]
 96%|#########5| 5352/5578 [00:55<00:02, 97.30 MB/s]
 96%|#########6| 5368/5578 [00:55<00:02, 97.49 MB/s]
 97%|#########6| 5384/5578 [00:55<00:01, 97.77 MB/s]
 97%|#########6| 5400/5578 [00:56<00:01, 97.82 MB/s]
 97%|#########7| 5416/5578 [00:56<00:01, 97.82 MB/s]
 97%|#########7| 5431/5578 [00:56<00:01, 96.71 MB/s]
 98%|#########7| 5447/5578 [00:56<00:01, 97.04 MB/s]
 98%|#########7| 5463/5578 [00:56<00:01, 97.40 MB/s]
 98%|#########8| 5479/5578 [00:56<00:01, 97.57 MB/s]
 99%|#########8| 5495/5578 [00:57<00:00, 96.56 MB/s]
 99%|#########8| 5511/5578 [00:57<00:00, 97.05 MB/s]
 99%|#########9| 5527/5578 [00:57<00:00, 97.37 MB/s]
 99%|#########9| 5543/5578 [00:57<00:00, 97.67 MB/s]
100%|#########9| 5558/5578 [00:57<00:00, 103.39 MB/s]
100%|#########9| 5569/5578 [00:57<00:00, 100.28 MB/s]
100%|##########| 5578/5578 [00:57<00:00, 96.37 MB/s]

  0%|          | 0/1 [00:00<?, ? MB/s]
100%|##########| 1/1 [00:00<00:00, 3158.36 MB/s]

  0%|          | 0/1 [00:00<?, ? MB/s]
100%|##########| 1/1 [00:00<00:00, 2851.33 MB/s]

  0%|          | 0/71 [00:00<?, ? MB/s]
  4%|4         | 3/71 [00:00<00:03, 18.39 MB/s]
  8%|8         | 6/71 [00:00<00:03, 18.50 MB/s]
 15%|#5        | 11/71 [00:00<00:02, 24.11 MB/s]
 24%|##3       | 17/71 [00:00<00:01, 29.17 MB/s]
 35%|###5      | 25/71 [00:00<00:01, 36.40 MB/s]
 48%|####7     | 34/71 [00:00<00:00, 42.82 MB/s]
 65%|######4   | 46/71 [00:01<00:00, 52.87 MB/s]
 83%|########3 | 59/71 [00:01<00:00, 61.43 MB/s]
100%|##########| 71/71 [00:01<00:00, 51.28 MB/s]

  0%|          | 0/4 [00:00<?, ? MB/s]
100%|##########| 4/4 [00:00<00:00, 1801.68 MB/s]

  0%|          | 0/1 [00:00<?, ? MB/s]
100%|##########| 1/1 [00:00<00:00, 3297.41 MB/s]

Set tractography parameters (optional)

We make this tracking_params which we will pass to the AFQ object which specifies that we want 50,000 seeds randomly distributed in the white matter.

We only do this to make this example faster and consume less space.

tracking_params = dict(n_seeds=50000,
                       random_seeds=True,
                       rng_seed=42)

Initialize an AFQ object:

We specify seg_algo as reco80 in segmentation_params. This tells the AFQ object to perform RecoBundles using the 80 bundles atlas in the segmentation step.

myafq = api.AFQ(bids_path=op.join(afd.afq_home,
                                  'stanford_hardi'),
                preproc_pipeline='vistasoft',
                segmentation_params={"seg_algo": "reco80"},
                tracking_params=tracking_params)

Out:

Downloading https://templateflow.s3.amazonaws.com/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz

  0%|          | 0.00/13.4k [00:00<?, ?B/s]
 30%|###       | 4.07k/13.4k [00:00<00:00, 40.7kB/s]
 68%|######8   | 9.10k/13.4k [00:00<00:00, 46.4kB/s]
13.4kB [00:00, 48.1kB/s]
Downloading https://templateflow.s3.amazonaws.com/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_desc-brain_mask.nii.gz

  0%|          | 0.00/155 [00:00<?, ?B/s]
156B [00:00, 6.19kB/s]

Visualizing bundles and tract profiles:

This would run the script and visualize the bundles using the plotly interactive visualization, which should automatically open in a new browser window.

bundle_html = myafq.all_bundles_figure
plotly.io.show(bundle_html["01"])