Skip to content

Provides methods for batch validating data in SWC neuron morphology files

License

Notifications You must be signed in to change notification settings

dohalloran/SWC_BATCH_CHECK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SWC_BATCH_CHECK v.1.0

GitHub license GitHub issues

  • Batch validation of directory containing SWC files
  • Ensures structures are correctly connected
  • Fix structures with zero size diameter
  • Corrects index sequence
  • Reports on missing data
  • Ensures file starts with soma
  • Returns basic statistics for each file

Installation

  1. Download and extract the SWC_BATCH_CHECK.zip file
    tar -xzvf SWC_BATCH_CHECK.zip or
    git clone https://github.com/dohalloran/SWC_BATCH_CHECK.git

  2. cd SWC_BATCH_CHECK

  3. chmod +x install.sh

  4. ./install.sh or sudo ./install.sh

    • if dependency fails you can try using --force
    • on MacOS Majave you will need Xcode, CommandLineTools, and headers
    • Install Xcode and then the CommandLineTools from Xcode
    • For headers: xcode-select --install
    • and then: open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
perl Makefile.PL  
make  
make test  
make install  
  • might need to sudo make install depending on permissions

Usage

To run, add the following into a driver script:

use SWC_BATCH_CHECK;
use Modern::Perl;

my $app = SWC_BATCH_CHECK->new_with_options();
$app->run_SWC_BATCH_CHECK(); 

from the command-line:

perl driver.pl --d ./my_SWC_directory
#see command flags below

Command Line Arguments

Flags

#path to input directory containing SWC files (required)
       --d ./my_SWC_directory/
#provide corrections to soma that are not connected to other soma       
       --soma
#checks that axons are properly connected to more axon or soma       
       --axon
#ensures apical dendrites are connected to apical dendrite or soma
       --apic
#same as --apic flag except for basal dendrite
       --basal
#converts radius = 0 entries to that of its parent's radius
       --rad
#compression of output SWC directory
       --zip
#print flag options to stdout
       --help 

References

  1. SWC Format Specification

  2. SWC+ Plus Format Specification

  3. Stockley, E. W., Cole, H. M., Brown, A. D. and Wheal, H. V. (1993) A system for quantitative morphological measurement and electronic modelling of neurons: three-dimensional reconstruction. Journal of Neuroscience Methods, 47, 39-51

Testing

SWC_BATCH_CHECK was successfully tested on:

  • Microsoft Windows 7 Enterprise ver.6.1
  • MacOSX Mojave ver.10.14.5
  • Linux Mint ver.19 Tara

Contributing

All contributions are welcome.

Support

If you have any problem or suggestion please open an issue here.

License

GNU GENERAL PUBLIC LICENSE

About

Provides methods for batch validating data in SWC neuron morphology files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published