|
| 1 | +[](https://travis-ci.org/MetaCell/nwb-explorer) |
| 2 | +[](https://codecov.io/gh/MetaCell/nwb-explorer) |
| 3 | +[](https://twitter.com/metacell) |
| 4 | + |
1 | 5 | # NWB Explorer |
2 | 6 |
|
3 | | -NWB Explorer is an application that can be used by scientists to read, visualize and explore |
4 | | -the content of NWB 2 files. |
| 7 | +NWB Explorer is a web application that can be used by scientists to read, visualize and explore |
| 8 | +the content of NWB:N 2 files. |
| 9 | + |
| 10 | +Learn more about the [Neurodata Without Borders](https://www.nwb.org/). |
5 | 11 |
|
6 | 12 | ## Getting Started |
7 | 13 |
|
8 | | -These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. |
| 14 | +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. |
| 15 | + |
| 16 | +### Prerequisites |
| 17 | + |
| 18 | +Below you will find the software you need to install to use nwb explorer (and the versions we used): |
9 | 19 |
|
10 | | -### Prerequisites |
11 | | -Below you will find the software you need to install to use nwb explorer (and the versions we used) |
12 | 20 | * Git (2.17.0). |
13 | 21 | * Node (9.11.1) and npm (6.0.0). |
14 | | -* Redis-Server (4.0.9). |
15 | | -* Python 3 (3.6.5), pip (10.0.1) and Python3-tk. |
| 22 | +* Python 3 (3.6+), pip (10.0.1) |
| 23 | + |
16 | 24 | #### Python Dependencies |
17 | | - `pip install -r requirements.txt` |
18 | 25 |
|
19 | | -or |
| 26 | +We recommend the use of a new python 3 virtual environment: |
20 | 27 |
|
21 | | -* Django (1.11.7). `pip install django` |
22 | | -* Pygeppeto_server. ```git clone https://github.com/MetaCell/pygeppetto-django.git && cd pygeppetto-django && git checkout development && pip install -e . ``` |
23 | | -* Pygeppeto_model.```git clone https://github.com/openworm/pygeppetto.git && cd pygeppetto && git checkout manager && pip install -e . ``` |
24 | | -* Pyecore (0.8.1). `pip install pyecore` |
25 | | -* Pynwb. ```git clone https://github.com/NeurodataWithoutBorders/pynwb.git && cd pynwb && git checkout dev && pip install -e . ``` |
26 | | -* Seaborn (0.8.1). `pip install seaborn` |
27 | | - |
28 | | -### Installing |
| 28 | +```bash |
| 29 | +python3 -m venv nwb-explorer |
| 30 | +source nwb-explorer/bin/activate |
| 31 | +``` |
29 | 32 |
|
30 | | -A step by step instructions to get a development env running |
| 33 | +Or, with conda |
31 | 34 |
|
| 35 | +```bash |
| 36 | +conda create -n nwb-explorer python=3.7 |
| 37 | +conda activate nwb-explorer |
32 | 38 | ``` |
33 | | -git clone https://github.com/tarelli/nwb-explorer |
| 39 | + |
| 40 | +### Local installation |
| 41 | + |
| 42 | +Instructions to get a development environment running. |
| 43 | + |
| 44 | +```bash |
| 45 | +git clone -b development https://github.com/MetaCell/nwb-explorer |
34 | 46 | cd nwb-explorer |
35 | | -mkdir static |
36 | | -cd static |
37 | | -git clone https://github.com/openworm/org.geppetto.frontend |
38 | | -cd org.geppetto.frontend/src/main/webapp/extensions |
39 | | -git clone https://github.com/tarelli/geppetto-nwbexplorer |
40 | | -cd .. |
41 | | -/bin/cp -rf ../../../../../GeppettoConfiguration.json . |
42 | | -npm install |
43 | | -npm run build-dev-noTest |
| 47 | +python utilities/install.py |
44 | 48 | ``` |
45 | | -## Deployment |
46 | 49 |
|
47 | | -Run the redis-server manually: |
| 50 | +## How to run NWB Explorer |
48 | 51 |
|
49 | | -OSX |
50 | | -``` |
51 | | -nohup redis-server & |
52 | | -``` |
53 | | -Linux |
54 | | -``` |
55 | | -redis-server & |
56 | | -``` |
57 | | -Then, on the nwb-explorer folder, run : |
58 | | -``` |
59 | | -python manage.py runserver |
| 52 | +After the installation is complete, run the script: |
| 53 | + |
| 54 | +```bash |
| 55 | +cd nwb-explorer |
| 56 | +./NWBE |
60 | 57 | ``` |
61 | 58 |
|
62 | | -## How to use |
| 59 | +If everything worked, the default browser will open on `http://localhost:8888/geppetto` |
63 | 60 |
|
64 | | - |
65 | | -## How to develop |
| 61 | +## Getting started with NWB Explorer |
66 | 62 |
|
67 | | -Any change you make in the python code will be automatically redeployed by the Django server. |
| 63 | +When the application is started, no file will be loaded. |
68 | 64 |
|
69 | | -JS/HTML code can be found inside `static/org.geppetto.frontend/src/main/webapp/`. The code needs to be rebuilt with webpack everytime there is a change. The recommended way is to run in `/static/org.geppetto.frontend/src/main/webapp/` this command: |
| 65 | +1. Use the interface to load the file from a public url or just load a sample |
| 66 | +1. Specify the parameter nwbfile in your browser. Example: `http://localhost:8888/geppetto?nwbfile=https://github.com/OpenSourceBrain/NWBShowcase/raw/master/NWB/time_series_data.nwb` |
| 67 | + |
| 68 | +After the file is loaded, a Jupyter notebook will be available. |
| 69 | +From the notebook the current loaded file can be accessed through the variable `nwbfile`. |
| 70 | +For further information about the Python API, see the [PyNWB docs](https://pynwb.readthedocs.io/en/stable/) |
| 71 | + |
| 72 | +### Python code from sources |
| 73 | + |
| 74 | +In order to have all the Python files NWB:N 2 ed from sources, the application and the dependencies must be installed in development mode, i.e. with the command |
| 75 | + |
| 76 | +```bash |
| 77 | +pip install -e . |
70 | 78 | ``` |
| 79 | + |
| 80 | +### Javascript code from sources |
| 81 | + |
| 82 | +JS/HTML code can be found inside `static/org.geppetto.frontend/src/main/webapp/`. The code needs to be rebuilt with webpack everytime there is a change. To avoid having to do so you can use the Webpack development server running in `/static/org.geppetto.frontend/src/main/webapp/` this command: |
| 83 | + |
| 84 | +```bash |
71 | 85 | npm run build-dev-noTest:watch |
72 | 86 | ``` |
73 | 87 |
|
74 | | -## Running the tests |
| 88 | +This will spawn a process that while left running will watch for any changes on the `webapp` folder and automatically deploy them each time a file is saved. |
75 | 89 |
|
| 90 | +To check if a dependency is installed in development mode, run `pip list`. |
| 91 | + |
| 92 | +### Run via Docker |
| 93 | + |
| 94 | +There is a dockerfile ready to build a container for NWB-Explorer: |
| 95 | + |
| 96 | +```bash |
| 97 | +cd nwb-explorer/k8s |
| 98 | +docker build -t nwb-explorer . |
| 99 | +docker run -it -p8888:8888 nwb-explorer |
76 | 100 | ``` |
77 | | -python manage.py test |
78 | | -``` |
| 101 | +Then, after the docker contained has started, the application is ready http://localhost:8888/geppetto |
| 102 | + |
79 | 103 | ## Built With |
80 | 104 |
|
81 | | -* [Django](https://www.djangoproject.com/) - The web framework used |
82 | | -* [Geppetto](http://www.geppetto.org/) - Used to build a web-based application to visualize and simulate the NWB 2.0 files. |
| 105 | +* [Geppetto](http://www.geppetto.org/) - Used to build a web-based application to interpret and visualize the NWB:N 2 files. |
| 106 | +* [PyNWB](https://github.com/NeurodataWithoutBorders/pynwb) - Used to read and manipulate NWB:N 2 files |
| 107 | +* [Jupyter notebook](https://jupyter.org/) - Jupyter notebook is used as a backend. |
83 | 108 |
|
84 | 109 |
|
| 110 | +## Background |
| 111 | + |
| 112 | +The NWB Explorer was initially created by MetaCell to showcase the features of the Geppetto platform to share |
| 113 | +neurophysiological data in Neurodata Without Borders format. It was further developed as part of a |
| 114 | +Google Summer of Code project with the OpenWorm project. It is currently being extended as part of the Open Source Brain |
| 115 | +project to provide both a standalone and online application for visualising and analysing the contents of NWB:N 2 files. |
| 116 | +This work is currently funded by the Wellcome Trust. |
| 117 | + |
85 | 118 | ## Authors |
86 | 119 |
|
87 | 120 | * Matteo Cantarelli ([MetaCell](http://metacell.us)) |
88 | 121 | * Giovanni Idili ([MetaCell](http://metacell.us)) |
89 | | -* Afonso Pinto |
90 | | - |
91 | | -See also the list of [contributors](https://github.com/tarelli/nwb-explorer/contributors) who participated in this project. |
92 | | - |
| 122 | +* Filippo Ledda ([MetaCell](http://metacell.us)) |
| 123 | +* Rodriguez Facundo ([MetaCell](http://metacell.us)) |
| 124 | +* Afonso Pinto ([MetaCell](http://metacell.us)) |
93 | 125 |
|
94 | 126 |
|
| 127 | +See also the list of [contributors](https://github.com/Metacell/nwb-explorer/contributors) who participated in this project. |
0 commit comments