-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtutorial setup instructions.rtf
52 lines (51 loc) · 3.67 KB
/
tutorial setup instructions.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{\rtf1\ansi\ansicpg1252\cocoartf1671
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue233;}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;\cssrgb\c0\c0\c93333;}
\margl1440\margr1440\vieww21320\viewh12180\viewkind1
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\f0\fs22 \cf0 1) Python setup and package installation\
\
Most of these instructions are primarily for mac / unix. Where possible, Windows alternatives are included but they haven\'92t been tested.\
\
If you don\'92t have python installed, Anaconda provides a good distribution (https://www.anaconda.com/distribution/), with nice virtual environment management. This is very convenient, and having a dedicated analysis environment helps prevent package versioning conflicts.\
\
If using anaconda: \
make a new conda environment. From your terminal (or anaconda terminal):\
conda create --name <your_environment_name_here> python=3.6 -y\
\
Activate the environment:\
source activate <your_environment_name>\
\
Regardless of virtual environment: \
\
Install jupyter:\
conda install jupyter\'93 or \'93pip install jupyter\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 \
Register the ipython kernel so jupyter notebooks can see it:\
\
python -m ipykernel install \'97user \'97name <your_environment_name_here> \'97display-name \'93Python3 <your_environment_name_here>\'94\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 \
Install the AllenSDK:\
\pard\pardeftab720\sl280\partightenfactor0
\cf2 \expnd0\expndtw0\kerning0
pip install allensdk==1.0.0.dev3 --extra-index-url {\field{\*\fldinst{HYPERLINK "https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Faibs.jfrog.io%2Faibs%2Fapi%2Fpypi%2Fni-pypi-local%2Fsimple&data=02%7C01%7C%7Cc12ea565c4934dc4b56808d6ad8bc1a3%7C32669cd6737f4b398bddd6951120d3fc%7C0%7C0%7C636887213095040765&sdata=Om6x%2Bi8%2BllqrCbXSVijeAOOUKdA3Gvyxf9bmrMh5Ro8%3D&reserved=0"}}{\fldrslt \cf3 \ul \ulc3 https://aibs.jfrog.io/aibs/api/pypi/ni-pypi-local/simple}}\cf0 \kerning1\expnd0\expndtw0 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 \
If some packages fail installation, try conda installing them and then running the \'93pip install allensdk \'85\'94 command above again. For me, this happens with psycopg2.\
\
If that doesn\'92t work, try just \'93pip install allensdk\'94\
\
2) Download the tutorial notebook\
If you use git:\
git clone https://github.com/AllenInstitute/brain_observatory_examples\
\
If you don\'92t use git:\
Go to \'93https://github.com/AllenInstitute/brain_observatory_examples\'94 in a browser, click the green \'93Clone or download\'94 button, and download a zip file of the folder; extract it to your location of choice.\
\
3) Launch a jupyter notebook server. In the terminal (or windows command prompt), navigate to the brain_observatory_examples folder and then type \'93jupyter notebook\'94. In the notebook webpage, navigate to the folder \'93Cosyne 2019\'94 and open the notebook \'93Cosyne 2019 Tutorial.\'94\
\
4) Download an experiment. From the attached spreadsheet file, select one cell id at random. Then run the first cells of the \'93Cosyne 2019 Tutorial\'94 notebook, until you execute the line \'93data_set = boc.get_ophys_experiment_data(session_id)\'94 - this will download the experiment containing that cell. In Part 1 of that notebook, make sure you set the variable \'93drive_path\'94 to the location where you want to download the dataset.\
}