Nomads classifier with PyMeda and Boss functionality.
This pipeline will:
- Pull data from BOSS (assuming correct permissions)
- Run Nomads-unsupervised
- Run Nomads-classifier
- Run PyMeda
- Upload results to BOSS (assuming correct permissions to push to channel "collman_nomads" and experiment "nomads_predictions").
- If no synapses were detected by nomads-unsupervised, the program will exit. Check job.log to see if this happened.
- Nomads-classifier requires you to have at least 20 slices in the z-dimension. Anything smaller will cause the program to exit.
Prequisites:
Have Docker installed on machine. Instructions here
-
Open Terminal
-
Pull built image from DockerHub by running:
docker pull nomads/nomads-classifier
- Start image with the following command
docker run -it -p 8888:8888 nomads/nomads-classifier:latest bash
You will ssh into running docker container.
- Start notebook with the command:
jupyter notebook --ip 0.0.0.0 --allow-root --no-browser
- A url that looks like the following should appear in the terminal:
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://<host>:8888/?token=<long token>
- Copy URL into your browser and replace whatever is in
<host>
withlocalhost
http://localhost:8888/?token=....
You should now be able to access the Nomads-Classifier jupyter notebook.
-
In Jupyter Console, click on the file named
Nomads-Classifier.ipynb
. Follow the instructions within the notebook to run the pipeline.- In order to obtain your BOSS token, please refer to Obtaining BOSS Token.
- In order to obtain the parameters for experiments and collection, please refer to Getting Collection and Experiment.
-
To get results after your pipeline is done running, press
Ctr-C
twice in terminal. Type:
cd results
- You are now inside the results directory and can checkout the results. Since the results live in the Docker contain, If you want to move results to your computer follow instructions in this link.
Inside the results directory, you should have NDVis_links.csv which contains links to NDVis, pickled numpy arrays of the predictions, and PyMeda HTML files.
- You can exit container by typing
exit
-
Go into Terminal (can skip step 1 if you already have image)
-
Pull built image from DockerHub by running:
docker pull nomads/nomads-classifier
- Start image with the following command
docker run -it nomads/nomads-classifier:latest bash
You will ssh into running docker container.
3. Run the command
python3 driver.py --host api.boss.neurodata.io --token <insert BOSS API token> --col <insert BOSS collection> --exp <insert BOSS experiment> --z-range <z_start>,<z_end> --y-range <y_start>,<y_end> --x-range <x_start>,<x_end>
- See steps 6 and 7 in Method 1 to retrieve results.
Prequisites: Have python3 and pip3 working on computer.
git clone https://github.com/rguo123/nomads-classifier-pipeline.git
pip3 install -r requirements.txt
- Run the command step 3 in Running with Docker Method 2.
The way that BOSS categorizes data is kind of confusing, and its UI can be unclear at times. The following is a walkthrough of where on boss you need to go to get the information to run Nomads Classifier
.
All of these steps originate from the homepage at https://api.boss.neurodata.io/v1/mgmt/
Green Circles denote information that you will need for the initializer of the class Red Circles show you where to click next.