R/neuron-io-neuroml.R
read.morphml.Rd
read.morphml
is designed to expose the full details of
the morphology information in a NeuroML file either as a parsed XML
structure processed by the XML
package or as an extensively
processed R list object. To obtain a neuron
object use
read.neuron.neuroml
.
read.morphml(f, ..., ReturnXML = FALSE)
Either an R list of S3 class containing one morphml_cell
object for every cell in the NeuroML document or an object of class
XMLDocument
when ReturnXML=TRUE
.
NeuroML files consist of an XML tree containing one more or more cells. Each cell contains a tree of segments defining the basic connectivity/position and an optional tree cables defining attributes on groups of segments (e.g. a name, whether they are axon/dendrite/soma etc).
read.morphml
will either provide the parsed XML tree which you can
query using XPath statements or a more heavily processed version which
provides as much information as possible from the segments and cables trees
in two R data.frames. The latter option will inevitably drop some
information, but will probably be more convenient for most purposes.
link[XML]{xmlParse}
, read.neuron.neuroml