Skip to content

A plugin for ilastik to detect synapses possibly related to skeletons annotated in CATMAID

Notifications You must be signed in to change notification settings

k-dominik/skeleton_synapses

 
 

Repository files navigation

Build Status Coverage Status

WORK IN PROGRESS

skeleton_synapses

A utility for automatically detecting synapses, compatible with CATMAID and synapsesuggestor.

INSTALLATION:

N.B. conda must be version <= 4.3 to work with pyenv

  • Use conda to install ilastik, and then pip to install the requirements in ./requirements/.
  • cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $CONDA_PREFIX/lib/
  • Use pip install -r requirements/prod.txt for production installations, add -r requirements/test.txt to run unit tests, and add -r requirements/travis.txt for continuous integration and coverage with travis and coveralls.

USAGE:

usage: skeleton_synapses [-h] [-o OUTPUT_DIR] [-r ROI_RADIUS_PX] [-f FORCE]
               credentials-path stack-id input-file-dir skeleton-ids
               [skeleton-ids ...]

positional arguments:
  credentials-path      Path to a JSON file containing CATMAID credentials
                        (see credentials/example.json)
  stack-id              ID or name of image stack in CATMAID
  input-file-dir        A directory containing project files.
  skeleton-ids          Skeleton IDs in CATMAID

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        A directory containing output files
  -r ROI_RADIUS_PX, --roi-radius-px ROI_RADIUS_PX
                        The radius (in pixels) around each skeleton node to
                        search for synapses
  -f FORCE, --force FORCE
                        Whether to delete all prior results for a given
                        skeleton: pass 1 for true or 0

Example:

bash bin/skeleton_synapses \
    credentials/my_creds.json \
    1 \
    ~/my_project_files/ \
    123456 \
    654321 \
    789012 \
    -o ~/my_output_dir/ \
    -r 150 \
    -f 0

TESTING:

Unit tests

pytest

A running CATMAID instance is not required; nor is a functioning installation of ilastik. Tests only cover the python code surrounding those two interfaces.

Integration tests

pytest tests/integration_tests --input_dir path/to/input/ --credentials_path path/to/credentials.json

This requires ilastik, valid project files, and a running instance of CATMAID.

CATMAID CREDENTIALS:

See ./credentials/example.json for the credentials file required by skeleton_synapses.

ENVIRONMENT VARIABLES:

Environment variables control skeleton_synapses' utilisation of compute resources. Store different environment variable configurations in ./env_vars/ (see example). Source these environment variables with ./bin/set_env_vars <file_name>

About

A plugin for ilastik to detect synapses possibly related to skeletons annotated in CATMAID

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Other 0.2%