Instructions for installation and configuration of Jupyterlab

These instructions form a quick and simple setup to get Jupyterlab running via Anaconda.

Install software

  1. Visit (anaconda.org)[anaconda.org]
  2. Download and install Anaconda
  3. Visit (nodejs.org )[nodejs.org]
  4. Download and install nodejs

Setup environment

  1. Open Anaconda
  2. Click on "Environments" tab on left panel
  3. Click on "Create" at bottom of middle panel to create new environment
  4. Give new environment a name and select python3 (and any additional choices)
  5. Select "Chanels" in the top of the right-hand panel
  6. Select "Add..." in the top right corner
  7. Enter conda-forge and hit enter.
  8. Click "Update channels" and then close the window.
  9. Select "All" from the dropdown menu in the top of the right-hand panel.
  10. Click "Update index"
  11. Enter jupyterlab in the textbox to the right.
  12. Select "jupyterlab" from the options.
  13. Click "Apply" in the bottom right corner.
  14. A window will pop up showing the updates that will be made. Select "Accept" to install jupyterlab.
  15. Repeat from step 11 to add any additional libraries (eg pandas, scipy, scikit-learn)

Install google-drive extension

  1. in terminal, ensure that anaconda/bin is included in your path:

    eg. export PATH="/User/Guest/anaconda/bin:$PATH

  1. activate the environment created above:

    source activate <envt_name>

  1. install (google-drive)[https://github.com/jupyterlab/jupyterlab-google-drive] extension :

    jupyter labextension install @jupyterlab/google-drive

Launch JupyterLab server

  1. In terminal, enter:

    jupyter lab

ipywidgets

jupyter labextension install @jupyter-widgets/jupyterlab-manager

oops. Looks like this is broken in 0.27.0

Jupyterlab renderers

  • plotly
  • json
  • geojson

https://github.com/jupyterlab/jupyter-renderers

A few Jupyter examples


In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
from ipywidgets import interact, interactive
import ipywidgets

In [2]:
import pandas as pd

In [3]:
df = pd.read_csv("DESeq2_pvalues.out", sep=' ')
df["pathway"] = df.baseMean.apply(lambda x: int(x)%7)

In [4]:
df.head()


Out[4]:
baseMean log2FoldChange lfcSE stat pvalue padj pathway
ENSG00000000003.10 1.958923 1.507327 2.280241 5.898438 4.346629e-01 5.167232e-01 1
ENSG00000000005.5 0.000000 NaN NaN NaN NaN NaN 0
ENSG00000000419.8 1245.038399 -0.240458 0.114002 319.074644 6.667458e-66 3.164103e-65 6
ENSG00000000457.8 573.445192 0.114238 0.125212 88.851140 5.248090e-17 1.258779e-16 6
ENSG00000000460.12 790.056229 0.411113 0.119781 1170.842594 9.775789e-250 1.707693e-248 6