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.api.group import GroupAFQ
import AFQ.data.fetch 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<03:06, 29.90 MB/s]
  0%|          | 8/5578 [00:00<02:48, 33.02 MB/s]
  0%|          | 15/5578 [00:00<01:57, 47.34 MB/s]
  0%|          | 24/5578 [00:00<01:42, 54.04 MB/s]
  1%|          | 35/5578 [00:00<01:18, 70.68 MB/s]
  1%|          | 49/5578 [00:00<01:08, 80.75 MB/s]
  1%|1         | 65/5578 [00:00<00:54, 101.93 MB/s]
  2%|1         | 85/5578 [00:00<00:47, 114.82 MB/s]
  2%|1         | 104/5578 [00:01<00:40, 133.74 MB/s]
  2%|2         | 125/5578 [00:01<00:39, 137.58 MB/s]
  3%|2         | 144/5578 [00:01<00:36, 150.39 MB/s]
  3%|2         | 164/5578 [00:01<00:37, 145.72 MB/s]
  3%|3         | 183/5578 [00:01<00:34, 156.82 MB/s]
  4%|3         | 204/5578 [00:01<00:35, 152.21 MB/s]
  4%|3         | 223/5578 [00:01<00:33, 161.62 MB/s]
  4%|4         | 244/5578 [00:01<00:34, 154.85 MB/s]
  5%|4         | 265/5578 [00:02<00:31, 168.66 MB/s]
  5%|5         | 283/5578 [00:02<00:34, 152.87 MB/s]
  5%|5         | 300/5578 [00:02<00:33, 156.11 MB/s]
  6%|5         | 318/5578 [00:02<00:32, 161.88 MB/s]
  6%|6         | 339/5578 [00:02<00:33, 157.28 MB/s]
  6%|6         | 356/5578 [00:02<00:32, 159.64 MB/s]
  7%|6         | 373/5578 [00:02<00:32, 160.88 MB/s]
  7%|7         | 395/5578 [00:02<00:32, 158.76 MB/s]
  7%|7         | 413/5578 [00:03<00:31, 162.15 MB/s]
  8%|7         | 433/5578 [00:03<00:29, 172.14 MB/s]
  8%|8         | 451/5578 [00:03<00:32, 156.89 MB/s]
  8%|8         | 468/5578 [00:03<00:32, 157.68 MB/s]
  9%|8         | 490/5578 [00:03<00:32, 157.43 MB/s]
  9%|9         | 508/5578 [00:03<00:31, 160.39 MB/s]
 10%|9         | 530/5578 [00:03<00:31, 159.33 MB/s]
 10%|9         | 547/5578 [00:03<00:31, 158.78 MB/s]
 10%|#         | 569/5578 [00:04<00:31, 158.33 MB/s]
 11%|#         | 587/5578 [00:04<00:30, 161.33 MB/s]
 11%|#         | 606/5578 [00:04<00:29, 168.81 MB/s]
 11%|#1        | 625/5578 [00:04<00:31, 157.51 MB/s]
 12%|#1        | 642/5578 [00:04<00:30, 160.55 MB/s]
 12%|#1        | 659/5578 [00:04<00:30, 161.51 MB/s]
 12%|#2        | 678/5578 [00:04<00:28, 169.09 MB/s]
 12%|#2        | 697/5578 [00:04<00:31, 155.68 MB/s]
 13%|#2        | 714/5578 [00:04<00:30, 159.25 MB/s]
 13%|#3        | 732/5578 [00:04<00:29, 164.87 MB/s]
 13%|#3        | 752/5578 [00:05<00:30, 156.99 MB/s]
 14%|#3        | 768/5578 [00:05<00:30, 156.02 MB/s]
 14%|#4        | 788/5578 [00:05<00:28, 167.69 MB/s]
 14%|#4        | 808/5578 [00:05<00:30, 156.14 MB/s]
 15%|#4        | 832/5578 [00:05<00:30, 157.95 MB/s]
 15%|#5        | 855/5578 [00:05<00:29, 159.74 MB/s]
 16%|#5        | 872/5578 [00:05<00:29, 159.65 MB/s]
 16%|#6        | 895/5578 [00:06<00:29, 158.21 MB/s]
 16%|#6        | 919/5578 [00:06<00:29, 159.38 MB/s]
 17%|#6        | 943/5578 [00:06<00:28, 160.14 MB/s]
 17%|#7        | 964/5578 [00:06<00:26, 171.72 MB/s]
 18%|#7        | 982/5578 [00:06<00:29, 155.71 MB/s]
 18%|#7        | 1001/5578 [00:06<00:27, 164.03 MB/s]
 18%|#8        | 1021/5578 [00:06<00:26, 173.11 MB/s]
 19%|#8        | 1039/5578 [00:06<00:29, 155.59 MB/s]
 19%|#8        | 1059/5578 [00:07<00:27, 166.88 MB/s]
 19%|#9        | 1077/5578 [00:07<00:29, 151.62 MB/s]
 20%|#9        | 1096/5578 [00:07<00:27, 160.84 MB/s]
 20%|#9        | 1113/5578 [00:07<00:27, 162.62 MB/s]
 20%|##        | 1133/5578 [00:07<00:28, 154.40 MB/s]
 21%|##        | 1152/5578 [00:07<00:27, 162.11 MB/s]
 21%|##1       | 1173/5578 [00:07<00:28, 156.31 MB/s]
 21%|##1       | 1192/5578 [00:07<00:26, 163.65 MB/s]
 22%|##1       | 1212/5578 [00:08<00:28, 155.13 MB/s]
 22%|##2       | 1231/5578 [00:08<00:26, 162.85 MB/s]
 22%|##2       | 1248/5578 [00:08<00:26, 164.23 MB/s]
 23%|##2       | 1268/5578 [00:08<00:27, 155.12 MB/s]
 23%|##3       | 1287/5578 [00:08<00:26, 162.97 MB/s]
 23%|##3       | 1308/5578 [00:08<00:27, 156.78 MB/s]
 24%|##3       | 1327/5578 [00:08<00:25, 164.20 MB/s]
 24%|##4       | 1348/5578 [00:08<00:26, 157.72 MB/s]
 24%|##4       | 1366/5578 [00:08<00:25, 162.11 MB/s]
 25%|##4       | 1387/5578 [00:09<00:26, 156.45 MB/s]
 25%|##5       | 1406/5578 [00:09<00:25, 163.85 MB/s]
 26%|##5       | 1427/5578 [00:09<00:26, 157.54 MB/s]
 26%|##5       | 1445/5578 [00:09<00:25, 161.78 MB/s]
 26%|##6       | 1467/5578 [00:09<00:25, 158.65 MB/s]
 27%|##6       | 1485/5578 [00:09<00:25, 163.11 MB/s]
 27%|##6       | 1506/5578 [00:09<00:25, 157.08 MB/s]
 27%|##7       | 1525/5578 [00:09<00:24, 164.36 MB/s]
 28%|##7       | 1546/5578 [00:10<00:25, 157.79 MB/s]
 28%|##8       | 1564/5578 [00:10<00:24, 162.37 MB/s]
 28%|##8       | 1586/5578 [00:10<00:25, 159.00 MB/s]
 29%|##8       | 1604/5578 [00:10<00:24, 163.02 MB/s]
 29%|##9       | 1626/5578 [00:10<00:24, 159.65 MB/s]
 29%|##9       | 1644/5578 [00:10<00:24, 163.36 MB/s]
 30%|##9       | 1665/5578 [00:10<00:24, 157.85 MB/s]
 30%|###       | 1683/5578 [00:10<00:24, 162.15 MB/s]
 31%|###       | 1705/5578 [00:11<00:24, 159.05 MB/s]
 31%|###       | 1723/5578 [00:11<00:23, 163.15 MB/s]
 31%|###1      | 1745/5578 [00:11<00:24, 159.32 MB/s]
 32%|###1      | 1762/5578 [00:11<00:23, 160.75 MB/s]
 32%|###2      | 1785/5578 [00:11<00:23, 158.87 MB/s]
 32%|###2      | 1808/5578 [00:11<00:23, 157.46 MB/s]
 33%|###2      | 1832/5578 [00:11<00:23, 158.82 MB/s]
 33%|###3      | 1856/5578 [00:12<00:23, 159.71 MB/s]
 34%|###3      | 1873/5578 [00:12<00:22, 161.78 MB/s]
 34%|###3      | 1896/5578 [00:12<00:23, 159.43 MB/s]
 34%|###4      | 1918/5578 [00:12<00:21, 174.00 MB/s]
 35%|###4      | 1936/5578 [00:12<00:23, 156.62 MB/s]
 35%|###5      | 1953/5578 [00:12<00:22, 159.61 MB/s]
 35%|###5      | 1975/5578 [00:12<00:23, 156.55 MB/s]
 36%|###5      | 1992/5578 [00:12<00:22, 159.20 MB/s]
 36%|###6      | 2015/5578 [00:13<00:22, 158.76 MB/s]
 36%|###6      | 2032/5578 [00:13<00:21, 161.19 MB/s]
 37%|###6      | 2055/5578 [00:13<00:22, 159.14 MB/s]
 37%|###7      | 2079/5578 [00:13<00:21, 160.01 MB/s]
 38%|###7      | 2102/5578 [00:13<00:21, 160.85 MB/s]
 38%|###7      | 2119/5578 [00:13<00:21, 160.60 MB/s]
 38%|###8      | 2142/5578 [00:13<00:21, 159.97 MB/s]
 39%|###8      | 2159/5578 [00:13<00:21, 161.57 MB/s]
 39%|###9      | 2179/5578 [00:14<00:19, 170.81 MB/s]
 39%|###9      | 2198/5578 [00:14<00:21, 156.36 MB/s]
 40%|###9      | 2222/5578 [00:14<00:21, 158.31 MB/s]
 40%|####      | 2246/5578 [00:14<00:20, 159.40 MB/s]
 41%|####      | 2265/5578 [00:14<00:19, 166.68 MB/s]
 41%|####      | 2285/5578 [00:14<00:21, 156.80 MB/s]
 41%|####1     | 2306/5578 [00:14<00:19, 169.68 MB/s]
 42%|####1     | 2324/5578 [00:14<00:18, 171.81 MB/s]
 42%|####1     | 2342/5578 [00:15<00:20, 155.34 MB/s]
 42%|####2     | 2364/5578 [00:15<00:20, 154.91 MB/s]
 43%|####2     | 2380/5578 [00:15<00:20, 154.91 MB/s]
 43%|####3     | 2399/5578 [00:15<00:19, 163.99 MB/s]
 43%|####3     | 2420/5578 [00:15<00:20, 156.85 MB/s]
 44%|####3     | 2438/5578 [00:15<00:19, 162.56 MB/s]
 44%|####4     | 2456/5578 [00:15<00:18, 165.35 MB/s]
 44%|####4     | 2476/5578 [00:15<00:19, 157.25 MB/s]
 45%|####4     | 2495/5578 [00:15<00:18, 165.72 MB/s]
 45%|####5     | 2512/5578 [00:16<00:18, 164.05 MB/s]
 45%|####5     | 2531/5578 [00:16<00:19, 154.66 MB/s]
 46%|####5     | 2549/5578 [00:16<00:18, 160.73 MB/s]
 46%|####6     | 2567/5578 [00:16<00:18, 163.67 MB/s]
 46%|####6     | 2587/5578 [00:16<00:19, 156.35 MB/s]
 47%|####6     | 2605/5578 [00:16<00:18, 162.45 MB/s]
 47%|####7     | 2622/5578 [00:16<00:18, 162.40 MB/s]
 47%|####7     | 2642/5578 [00:16<00:18, 155.04 MB/s]
 48%|####7     | 2661/5578 [00:17<00:17, 163.39 MB/s]
 48%|####8     | 2678/5578 [00:17<00:17, 164.12 MB/s]
 48%|####8     | 2698/5578 [00:17<00:18, 155.66 MB/s]
 49%|####8     | 2717/5578 [00:17<00:17, 160.27 MB/s]
 49%|####9     | 2734/5578 [00:17<00:17, 162.50 MB/s]
 49%|####9     | 2753/5578 [00:17<00:18, 155.18 MB/s]
 50%|####9     | 2772/5578 [00:17<00:17, 159.13 MB/s]
 50%|#####     | 2793/5578 [00:17<00:17, 158.23 MB/s]
 50%|#####     | 2812/5578 [00:17<00:17, 161.23 MB/s]
 51%|#####     | 2833/5578 [00:18<00:17, 159.56 MB/s]
 51%|#####1    | 2852/5578 [00:18<00:16, 162.22 MB/s]
 51%|#####1    | 2872/5578 [00:18<00:17, 157.69 MB/s]
 52%|#####1    | 2888/5578 [00:18<00:17, 158.20 MB/s]
 52%|#####2    | 2907/5578 [00:18<00:16, 161.76 MB/s]
 52%|#####2    | 2924/5578 [00:18<00:16, 162.93 MB/s]
 53%|#####2    | 2944/5578 [00:18<00:16, 158.51 MB/s]
 53%|#####3    | 2963/5578 [00:18<00:16, 160.93 MB/s]
 53%|#####3    | 2984/5578 [00:19<00:16, 160.03 MB/s]
 54%|#####3    | 3002/5578 [00:19<00:16, 159.33 MB/s]
 54%|#####4    | 3023/5578 [00:19<00:16, 158.98 MB/s]
 55%|#####4    | 3042/5578 [00:19<00:15, 160.65 MB/s]
 55%|#####4    | 3063/5578 [00:19<00:15, 159.03 MB/s]
 55%|#####5    | 3081/5578 [00:19<00:15, 159.33 MB/s]
 56%|#####5    | 3103/5578 [00:19<00:15, 160.93 MB/s]
 56%|#####5    | 3120/5578 [00:19<00:15, 162.23 MB/s]
 56%|#####6    | 3137/5578 [00:20<00:15, 160.04 MB/s]
 57%|#####6    | 3158/5578 [00:20<00:15, 159.10 MB/s]
 57%|#####6    | 3176/5578 [00:20<00:14, 164.03 MB/s]
 57%|#####7    | 3193/5578 [00:20<00:14, 159.57 MB/s]
 58%|#####7    | 3214/5578 [00:20<00:14, 160.04 MB/s]
 58%|#####7    | 3231/5578 [00:20<00:14, 162.33 MB/s]
 58%|#####8    | 3248/5578 [00:20<00:14, 158.21 MB/s]
 59%|#####8    | 3266/5578 [00:20<00:14, 164.09 MB/s]
 59%|#####8    | 3285/5578 [00:20<00:14, 157.67 MB/s]
 59%|#####9    | 3303/5578 [00:21<00:14, 157.46 MB/s]
 60%|#####9    | 3325/5578 [00:21<00:14, 160.06 MB/s]
 60%|#####9    | 3343/5578 [00:21<00:14, 159.63 MB/s]
 60%|######    | 3365/5578 [00:21<00:13, 161.31 MB/s]
 61%|######    | 3383/5578 [00:21<00:13, 160.46 MB/s]
 61%|######    | 3401/5578 [00:21<00:13, 162.94 MB/s]
 61%|######1   | 3420/5578 [00:21<00:13, 159.32 MB/s]
 62%|######1   | 3438/5578 [00:21<00:13, 159.62 MB/s]
 62%|######1   | 3455/5578 [00:21<00:13, 161.76 MB/s]
 62%|######2   | 3472/5578 [00:22<00:13, 161.47 MB/s]
 63%|######2   | 3492/5578 [00:22<00:13, 160.16 MB/s]
 63%|######2   | 3510/5578 [00:22<00:12, 159.99 MB/s]
 63%|######3   | 3527/5578 [00:22<00:12, 160.17 MB/s]
 64%|######3   | 3547/5578 [00:22<00:12, 159.07 MB/s]
 64%|######3   | 3565/5578 [00:22<00:12, 158.96 MB/s]
 64%|######4   | 3583/5578 [00:22<00:12, 162.87 MB/s]
 65%|######4   | 3603/5578 [00:22<00:12, 160.49 MB/s]
 65%|######4   | 3621/5578 [00:23<00:12, 160.27 MB/s]
 65%|######5   | 3638/5578 [00:23<00:12, 160.91 MB/s]
 66%|######5   | 3658/5578 [00:23<00:12, 158.57 MB/s]
 66%|######5   | 3676/5578 [00:23<00:11, 159.74 MB/s]
 66%|######6   | 3694/5578 [00:23<00:11, 162.41 MB/s]
 67%|######6   | 3714/5578 [00:23<00:11, 159.37 MB/s]
 67%|######6   | 3732/5578 [00:23<00:11, 161.33 MB/s]
 67%|######7   | 3749/5578 [00:23<00:11, 159.95 MB/s]
 68%|######7   | 3766/5578 [00:23<00:11, 161.25 MB/s]
 68%|######7   | 3785/5578 [00:24<00:11, 157.96 MB/s]
 68%|######8   | 3803/5578 [00:24<00:11, 161.13 MB/s]
 69%|######8   | 3821/5578 [00:24<00:11, 159.67 MB/s]
 69%|######8   | 3841/5578 [00:24<00:10, 160.18 MB/s]
 69%|######9   | 3858/5578 [00:24<00:10, 162.66 MB/s]
 69%|######9   | 3875/5578 [00:24<00:10, 161.36 MB/s]
 70%|######9   | 3892/5578 [00:24<00:10, 157.00 MB/s]
 70%|#######   | 3912/5578 [00:24<00:10, 158.90 MB/s]
 70%|#######   | 3930/5578 [00:24<00:10, 161.11 MB/s]
 71%|#######   | 3947/5578 [00:25<00:10, 156.73 MB/s]
 71%|#######1  | 3967/5578 [00:25<00:10, 159.37 MB/s]
 71%|#######1  | 3985/5578 [00:25<00:09, 160.87 MB/s]
 72%|#######1  | 4003/5578 [00:25<00:09, 159.39 MB/s]
 72%|#######2  | 4019/5578 [00:25<00:09, 159.00 MB/s]
 72%|#######2  | 4039/5578 [00:25<00:09, 162.45 MB/s]
 73%|#######2  | 4057/5578 [00:25<00:09, 162.98 MB/s]
 73%|#######3  | 4074/5578 [00:25<00:09, 156.75 MB/s]
 73%|#######3  | 4094/5578 [00:25<00:09, 160.91 MB/s]
 74%|#######3  | 4112/5578 [00:26<00:09, 162.28 MB/s]
 74%|#######4  | 4130/5578 [00:26<00:09, 158.27 MB/s]
 74%|#######4  | 4150/5578 [00:26<00:08, 162.35 MB/s]
 75%|#######4  | 4168/5578 [00:26<00:08, 163.47 MB/s]
 75%|#######5  | 4185/5578 [00:26<00:08, 156.17 MB/s]
 75%|#######5  | 4205/5578 [00:26<00:08, 160.88 MB/s]
 76%|#######5  | 4223/5578 [00:26<00:08, 162.45 MB/s]
 76%|#######6  | 4240/5578 [00:26<00:08, 154.55 MB/s]
 76%|#######6  | 4261/5578 [00:27<00:08, 163.19 MB/s]
 77%|#######6  | 4279/5578 [00:27<00:07, 163.84 MB/s]
 77%|#######7  | 4296/5578 [00:27<00:08, 155.63 MB/s]
 77%|#######7  | 4316/5578 [00:27<00:07, 161.36 MB/s]
 78%|#######7  | 4334/5578 [00:27<00:07, 162.73 MB/s]
 78%|#######8  | 4351/5578 [00:27<00:07, 154.40 MB/s]
 78%|#######8  | 4372/5578 [00:27<00:07, 163.35 MB/s]
 79%|#######8  | 4390/5578 [00:27<00:07, 164.30 MB/s]
 79%|#######9  | 4407/5578 [00:27<00:07, 155.14 MB/s]
 79%|#######9  | 4426/5578 [00:28<00:07, 164.02 MB/s]
 80%|#######9  | 4443/5578 [00:28<00:07, 160.49 MB/s]
 80%|#######9  | 4461/5578 [00:28<00:06, 163.04 MB/s]
 80%|########  | 4478/5578 [00:28<00:07, 153.53 MB/s]
 81%|########  | 4495/5578 [00:28<00:06, 157.81 MB/s]
 81%|########  | 4511/5578 [00:28<00:06, 158.31 MB/s]
 81%|########1 | 4531/5578 [00:28<00:06, 164.09 MB/s]
 82%|########1 | 4549/5578 [00:28<00:06, 154.80 MB/s]
 82%|########1 | 4567/5578 [00:28<00:06, 160.29 MB/s]
 82%|########2 | 4586/5578 [00:29<00:06, 163.46 MB/s]
 83%|########2 | 4604/5578 [00:29<00:05, 166.46 MB/s]
 83%|########2 | 4621/5578 [00:29<00:06, 155.31 MB/s]
 83%|########3 | 4638/5578 [00:29<00:05, 157.75 MB/s]
 84%|########3 | 4658/5578 [00:29<00:05, 165.24 MB/s]
 84%|########3 | 4675/5578 [00:29<00:05, 164.62 MB/s]
 84%|########4 | 4692/5578 [00:29<00:05, 153.91 MB/s]
 84%|########4 | 4710/5578 [00:29<00:05, 158.53 MB/s]
 85%|########4 | 4729/5578 [00:29<00:05, 163.99 MB/s]
 85%|########5 | 4746/5578 [00:30<00:05, 164.10 MB/s]
 85%|########5 | 4763/5578 [00:30<00:05, 152.90 MB/s]
 86%|########5 | 4781/5578 [00:30<00:05, 158.07 MB/s]
 86%|########6 | 4800/5578 [00:30<00:04, 163.74 MB/s]
 86%|########6 | 4818/5578 [00:30<00:04, 166.62 MB/s]
 87%|########6 | 4835/5578 [00:30<00:04, 154.59 MB/s]
 87%|########6 | 4852/5578 [00:30<00:04, 157.25 MB/s]
 87%|########7 | 4872/5578 [00:30<00:04, 165.83 MB/s]
 88%|########7 | 4889/5578 [00:30<00:04, 164.76 MB/s]
 88%|########7 | 4906/5578 [00:31<00:04, 153.41 MB/s]
 88%|########8 | 4924/5578 [00:31<00:04, 158.37 MB/s]
 89%|########8 | 4943/5578 [00:31<00:03, 164.96 MB/s]
 89%|########8 | 4960/5578 [00:31<00:03, 163.86 MB/s]
 89%|########9 | 4977/5578 [00:31<00:03, 152.79 MB/s]
 90%|########9 | 4995/5578 [00:31<00:03, 158.08 MB/s]
 90%|########9 | 5014/5578 [00:31<00:03, 164.73 MB/s]
 90%|######### | 5032/5578 [00:31<00:03, 166.61 MB/s]
 91%|######### | 5049/5578 [00:31<00:03, 154.01 MB/s]
 91%|######### | 5067/5578 [00:32<00:03, 159.78 MB/s]
 91%|#########1| 5086/5578 [00:32<00:02, 165.44 MB/s]
 91%|#########1| 5103/5578 [00:32<00:02, 165.04 MB/s]
 92%|#########1| 5120/5578 [00:32<00:03, 151.95 MB/s]
 92%|#########2| 5138/5578 [00:32<00:02, 158.16 MB/s]
 92%|#########2| 5157/5578 [00:32<00:02, 165.21 MB/s]
 93%|#########2| 5174/5578 [00:32<00:02, 165.00 MB/s]
 93%|#########3| 5191/5578 [00:32<00:02, 151.29 MB/s]
 93%|#########3| 5209/5578 [00:32<00:02, 157.53 MB/s]
 94%|#########3| 5229/5578 [00:33<00:02, 168.18 MB/s]
 94%|#########4| 5247/5578 [00:33<00:02, 153.75 MB/s]
 94%|#########4| 5265/5578 [00:33<00:01, 159.43 MB/s]
 95%|#########4| 5284/5578 [00:33<00:01, 167.77 MB/s]
 95%|#########5| 5302/5578 [00:33<00:01, 152.58 MB/s]
 95%|#########5| 5320/5578 [00:33<00:01, 158.37 MB/s]
 96%|#########5| 5340/5578 [00:33<00:01, 168.08 MB/s]
 96%|#########6| 5358/5578 [00:33<00:01, 154.30 MB/s]
 96%|#########6| 5376/5578 [00:33<00:01, 159.53 MB/s]
 97%|#########6| 5396/5578 [00:34<00:01, 168.03 MB/s]
 97%|#########7| 5414/5578 [00:34<00:01, 154.64 MB/s]
 97%|#########7| 5431/5578 [00:34<00:00, 158.06 MB/s]
 98%|#########7| 5448/5578 [00:34<00:00, 161.11 MB/s]
 98%|#########8| 5467/5578 [00:34<00:00, 166.87 MB/s]
 98%|#########8| 5484/5578 [00:34<00:00, 149.83 MB/s]
 99%|#########8| 5507/5578 [00:34<00:00, 168.75 MB/s]
 99%|#########9| 5525/5578 [00:34<00:00, 153.97 MB/s]
 99%|#########9| 5541/5578 [00:35<00:00, 155.44 MB/s]
100%|#########9| 5563/5578 [00:35<00:00, 152.80 MB/s]
100%|##########| 5578/5578 [00:35<00:00, 158.35 MB/s]

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

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

  0%|          | 0/71 [00:00<?, ? MB/s]
  4%|4         | 3/71 [00:00<00:02, 27.94 MB/s]
  8%|8         | 6/71 [00:00<00:02, 28.66 MB/s]
 15%|#5        | 11/71 [00:00<00:01, 37.29 MB/s]
 24%|##3       | 17/71 [00:00<00:01, 45.06 MB/s]
 35%|###5      | 25/71 [00:00<00:00, 56.27 MB/s]
 49%|####9     | 35/71 [00:00<00:00, 69.45 MB/s]
 65%|######4   | 46/71 [00:00<00:00, 80.76 MB/s]
 86%|########5 | 61/71 [00:00<00:00, 100.29 MB/s]
100%|##########| 71/71 [00:00<00:00, 79.26 MB/s]

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

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

Set tractography parameters (optional)#

We make this tracking_params which we will pass to the GroupAFQ 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 a GroupAFQ 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 = GroupAFQ(bids_path=op.join(afd.afq_home,
                                   'stanford_hardi'),
                 preproc_pipeline='vistasoft',
                 segmentation_params={"seg_algo": "reco80"},
                 tracking_params=tracking_params)

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.export("all_bundles_figure")
plotly.io.show(bundle_html["01"])