Skip to content

Installation instruction

Kyu Hyun Lee edited this page Jan 11, 2021 · 12 revisions

as of Nov 2020; will be cleaned up in the future

Docker

  • Install Docker
    • Enable running docker without sudo (see this; if running on lab server and don't have sudo privilege, ask Loren)
    • test with: docker run --rm hello-world

Database access

  • Ask Loren for mysql access to lmf-db.cin.ucsf.edu
  • If you're looking to practice (recommended if starting out), you can use your own database (see this)

Create a conda environment

  • conda env create --name nwb_datajoint python==3.8

From Anaconda / PyPI:

  • Install nodejs
    • conda install nodejs -c conda-forge --repodata-fn=repodata.json
  • Install jupyterlab
    • conda install -c conda-forge jupyterlab
  • Install hither
    • pip install hither
  • install spikeinterface
    • pip install spikeinterface
  • Install ml_ms4alg
    • pip install ml_ms4alg
  • Install datajoint
    • pip install datajoint

From GitHub:

Configure Datajoint

Notes

  • Add environment variables (e.g. in ~/.bashrc); note that these assume that you're interacting with DJ database from one of the lab's servers (e.g. virgas)
    • export LABBOX_EPHYS_DATA_DIR="/stelmo/nwb/"
    • export NWB_DATAJOINT_BASE_DIR="/stelmo/nwb/"
    • export KACHERY_STORAGE_DIR="/stelmo/nwb/kachery-storage"
    • export KACHERY_P2P_CONFIG_DIR="/your-home-directory/.kachery-p2p"
    • export DJ_SUPPORT_FILEPATH_MANAGEMENT=true
    • export KACHERY_P2P_API_PORT="some-port-number" (this is optional)
  • For curation with the web GUI, you must be running kachery-p2p daemon and labbox-ephys in the background
    • kachery-p2p: kachery-p2p-start-daemon --label franklab --config https://gist.githubusercontent.com/khl02007/b3a092ba3e590946480fb1267964a053/raw/f05eda4789e61980ce630b23ed38a7593f58a7d9/franklab_kachery-p2p_config.yaml
    • labbox: see instruction here
    • if running jupyter widget, see instruction here

Troubleshooting common problems

  • If cannot connect to dj, then downgrade pymysql to 0.9.2
  • If cannot write nwb, then downgrade h5py to 2.10.0
  • If stall during spikesorting, then install ml_ms4alg from our fork and upgrade numpy to 1.19.4
  • If cannot get waveforms, downgrade following packages to these versions:
    spikecomparison 0.3.0
    spikeextractors 0.9.1
    spikefeatures 0.1.1
    spikeinterface 0.10.0
    spikemetrics 0.2.2
    spikesorters 0.4.2
    spiketoolkit 0.7.0
    spikewidgets 0.5.0