read.neuron.swc: Read a neuron in swc file format

View source: R/neuron-io.R

read.neuron.swcR Documentation

Read a neuron in swc file format

Description

read.neuron.swc reads an SWC file on disk into a fully parsed neuron representation.

read.ngraph.swc reads an SWC file on disk into the more generic (and forgiving) ngraph representation which provides a bridge to the igraph library.

Usage

read.neuron.swc(f, ...)

read.ngraph.swc(f, weights = FALSE, directed = TRUE, ...)

Arguments

f

path to file

...

Additional arguments. read.neuron.swc passes theseto as.neuron and then on to neuron. read.neuron.swc passes them to ngraph.

weights

Logical value indicating whether edge weights defined by the 3D distance between points should be added to graph (default FALSE) or a numeric vector of weights.

directed

Whether the resultant graph should be directed (default TRUE)

Details

These functions will accept SWC neurons with multiple trees and arbitrary point index order. However only read.ngraph.swc will accept SWC files with cycles.

These functions would normally be called from read.neuron(s) rather than used directly.

SWC Format

According to http://www.neuronland.org/NLMorphologyConverter/MorphologyFormats/SWC/Spec.html SWC file format has a radius not a diameter specification

See Also

is.swc


nat documentation built on Aug. 25, 2023, 5:16 p.m.