Giter Site home page Giter Site logo

nathantspencer / webknossos_toolkit Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 3.0 2.72 MB

A set of tools for manipulation of the .nml, .swc, .zip, and .hoc files generated from webKnossos and related software. Used for processing of segmentation and skeletonization data.

License: MIT License

Python 65.11% MATLAB 34.89%
swc nml hoc knossos webknossos skeletonization segmentation

webknossos_toolkit's People

Contributors

codacy-badger avatar mmorehea avatar nathantspencer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webknossos_toolkit's Issues

nml2swc Indentation Error

There was an Tab Error in the else statement of line 94 of nml2swc.py which caused it to run incorrectly. I believe I have fixed the error, since after making the spacing adjustments, the code ran fine. Here is the corrected version:

nml2swc2.py.zip

nml_merger: knossos compatability

nml_merger, as it stands, can only merge WebKnossos files. The old Knossos format is slightly different and won't merge, instead triggering a warning and skipping the file.

The same information is (maybe?) found in the old Knossos files, it just needs to be parsed differently before it can be merged.

reinstate & refactor swc_corrector

swc_corrector.py was removed but should be reinstated and refactored to meet the level of polish that other scripts in this toolkit deliver. My thinking at the time was that integrating it into nml2swc.py would make it unneccessary, but it would still be useful to have as a standalone.

add help dialogue to scripts

There's no help dialogue to help steer a user in the right direction if they misunderstand the intended arguments of a script.

That being said, there probably should be!

swc2hoc comment function should support branching from soma

If multiple branches descend directly from the soma, chaos ensues. The soma is currently treated as a special case but should be treated in the same way as the other branchpoints, except that its branch numbers should have a "d" prepended to them.

Comment fails when child section comes before parent in hoc code

In swc2hoc.py, sometimes the hoc code will be generated in such a way that a child section is written before its parent. Attempting to use the comment prefix from the parent leads to issues. Perhaps the best solution is to "sort" the sections in a way that this is forbidden before calling comment.

restructuring of toolkit

A few things that should be done here to clean things up a bit:

  • standardize the input/output format of python scripts
  • separate nml and swc tools
  • add swc_corrector to the end of nml2swc to combine the two
  • reformat documentation

swc2hoc should take axon skeleton

Given the importance of the axon sections in HOC, it seems like that portion of the code should be generated similarly to the soma and dendrite sections.

How to use nml2swc correctly?

I can't get the swc file when using the nml2swc script. I ran it from Spyder (Python version 3.8.5), replacing the first argument of the first function with the path where my .nml file is located. No errors are thrown, yet nothing happens with the nml file.

swc2hoc should support directory as argument

Passing a directory to hoc_commenter.py should search the directory for .hoc files and comment each of them as a batch. This is already done by some other tools and should be very easy to implement.

swc2hoc sometimes results in jumpy .hoc

Sometime the HocCode produced by swc2hoc.py has giant jumps in it. It looks to me like this is caused by a failure of the TREES Toolbox to find a branchpoint, but more investigation is needed. Debug comment has been added to help remedy this problem manually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.