Skip to content

Instantly share code, notes, and snippets.

@deroneriksson
Last active August 12, 2016 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deroneriksson/9c7dcbd51a11d1f2e81e24702a778423 to your computer and use it in GitHub Desktop.
Save deroneriksson/9c7dcbd51a11d1f2e81e24702a778423 to your computer and use it in GitHub Desktop.

Jupyter Notes for SystemML Cancer Project

Install Python 3

brew update
brew install python3

Install Python Packages including Jupyter

pip3 install -U matplotlib numpy pandas scipy jupyter scikit-learn scikit-image flask

Install OpenSlide

brew install openslide
pip3 install openslide-python

Install OpenCV3

brew install opencv3 --without-numpy --with-python3
echo /usr/local/opt/opencv3/lib/python3.5/site-packages >> /usr/local/lib/python3.5/site-packages/opencv3.pth

Folder Setup

- Create a new folder and work from there
- download tissue slides #1 & #2
- Create a `data` folder within this folder and place the slides in there

Start Jupyter Notebook

PYSPARK_PYTHON=python3 PYSPARK_DRIVER_PYTHON=jupyter PYSPARK_DRIVER_PYTHON_OPTS="notebook" pyspark --master local[*] --driver-class-path /Users/deroneriksson/Documents/workspace/incubator-systemml/target/SystemML.jar

OpenSlide deepzoom

From the same folder, here is how to set up a histopath slide "lab" to view the slides (separate terminal) 
 - git clone https://github.com/openslide/openslide-python.git
 - cd openslide-python/examples/deepzoom
 - python3 deepzoom_multiserver.py ../../../data/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment