scidash / neuronunit

A package for data-driven validation of neuron and ion channel models using SciUnit
http://neuronunit.scidash.org
38 stars 24 forks source link

Including L-Measure for morphology tests #199

Closed JustasB closed 5 years ago

JustasB commented 5 years ago

@rgerkin For the OB model, I plan to compare cell model morphologies to reconstructed experimental morphologies. Many of the properties I need can be computed using L-Measure.

I was thinking of writing NU tests that wrap L-measure and return the property value in the NU format.

One issue is that L-measure is distributed in the form of a binary (they have linux, mac, and win versions). There is no installation, just the binary file is required, which can be executed with params to compute a desired property.

Could I include the L-measure binaries as part of NU? Alternatively, we could require the user of those tests to set some env var to the location of the binaries and let them go through the process of downloading them. The first appraoch seems to be less hassle for the user. Thoughts?

rgerkin commented 5 years ago

Packages can have optional dependencies, specifiable in the setup.py so that: pip install neuronunit wouldn't install it but pip install neuronunit[morphology] would. Can you set it up that way for now? We are probably going to do something similar with optimization (which can rely on a lot of complex dependencies that we don't want to break core functionality). Also, I saw this which doesn't seem to do much beyond wrap the L-measure binary in Python, but maybe it will save you some time.

JustasB commented 5 years ago

Ok I can do that. Yes that python wrapper might save some time.

JustasB commented 5 years ago

@rgerkin I turned that library you noticed into a pip install'able package and added a few other things to it: notebook with usage examples, travis tests, coverage. Check it out: https://pypi.org/project/pylmeasure/

The pip install does everything to compute the measures. No need to dl the lmeasure executables -- the package includes them.

I plan to build the NU morphology tests using this library and will work on those next.

JustasB commented 5 years ago

The tests are implemented here: https://github.com/scidash/neuronunit/blob/dev/neuronunit/tests/morphology.py

They use the pylmeasure package.