Welcome to the AFQ-Browser exploratory notebook

What is this thing?

This is a Jupyter notebook. You can add code cells to this notebook, and execute Python code that you write in these cells, by pressing the shift and enter keys on your keyboard.

For example:


In [1]:
a = 1
print(a)


1

To embed figures in the notebook, please use the following Jupyter command at the top of your notebook:


In [2]:
%matplotlib inline

Reading AFQ-browser data

To read data in from the AFQ-browser, you can use the Pandas library.


In [3]:
import pandas as pd

In [4]:
subjects = pd.read_csv('./data/subjects.csv')

In [5]:
subjects.head()


Out[5]:
Unnamed: 0 patient score session subjectID
0 0 1 0.194764 1 patient_01
1 1 1 0.225922 1 patient_02
2 2 1 0.170708 1 patient_03
3 3 0 0.227664 1 control_01
4 4 0 0.435699 1 control_02

In [6]:
nodes = pd.read_csv('./data/nodes.csv')

In [7]:
nodes.head()


Out[7]:
subjectID tractID nodeID rd md cl torsion curvature fa ad volume
0 patient_01 Left Thalamic Radiation 0 0.613340 0.851832 0.257362 -0.065856 0.137844 0.452992 1.328816 70.0
1 patient_01 Left Thalamic Radiation 1 0.611204 0.848955 0.256652 -0.087893 0.153220 0.453549 1.324456 60.0
2 patient_01 Left Thalamic Radiation 2 0.608178 0.843154 0.254787 -0.244466 0.092622 0.452349 1.313105 76.0
3 patient_01 Left Thalamic Radiation 3 0.604815 0.837168 0.253062 -0.533194 0.027443 0.451471 1.301873 55.0
4 patient_01 Left Thalamic Radiation 4 0.601006 0.831444 0.251759 0.272117 0.047876 0.451726 1.292319 71.0

For an example analysis, see our example analysis notebook


In [ ]: