contributed by Habiba Noamany & Rachel Wilson

You can query the neuprint hemibrain dataset programatically using Python.

If you’re starting from scratch, begin by installing miniconda from here.

For Windows, open Anaconda Prompt. For Mac, open the terminal.

Enter:

conda create -n neuprint
conda activate neuprint

Next, install neuprint python using conda (documentation here):

conda install -c flyem-forge neuprint-python

Then install Jupyter notebook, matplotlib for plotting, pandas for interacting with the hemibrain data, numpy for matrix manipulations and some other plotting software used in the neuprint-python tutorial:

conda install -c conda-forge notebook
conda install -c conda-forge matplotlib
conda install pandas
conda install numpy 
conda install -c conda-forge bokeh holoviews hvplot

Configure the IPython kernel (the Python execution backend for Jupyter) so that the python environment named neuprint shows up when you open up jupyter notebook:

python -m ipykernel install --user --name=neuprint

Then navigate to the folder where your copy of the notebook is using the command line, cd command (stands for change directory) followed by the full path to your notebook. This is so that when you open jupyter notebook in the next step, you are able to easily find the notebook in the Jupyter home page. For example, if your notebook is in your downloads folder, you would navigate using (note that for mac, you need to use forward slashes not back slashes):

cd C:\Users\rache\Downloads

Then open a Jupyter notebook using this command in the command line:

jupyter notebook

Start a new notebook with the neuprint kernel (New->neuprint). You can find the tutorial notebook on using neuprint-python from the github repo, here. Before you start, you need to copy your token from the neuprint server (https://neuprint.janelia.org/account), and then, in the Jupyter notebook, create a client:

from neuprint import Client
c = Client('neuprint.janelia.org', dataset='hemibrain', token='YOUR TOKEN HERE')
c.fetch_version()