IntroductionExamplesModelsDocumentationDownloadLinksContact
 

Importing various morphology formats into neuroConstruct

Outlined here are the various morphology file importation options available in neuroConstruct.

Note: it is essential to examine the imported cell carefully before using it in any simulation. Two potential problems which should be checked are:

  • Point of connection of dendritic branches to the soma, e.g. in Neurolucida, there is no explicit soma, but usually an outline. There will normally be a root segment added and this can serve as a basis on which to manually build the soma
  • Zero length sections, NEURON is fine with consecutive pt3d points being equal (i.e. segment length zero) but the standard mapping of this will result in an error in GENESIS. A check on the Cell Validity will reveal any problem segments. (Note that only the first soma segment should be spherical, which is specified by making start point = end point)

To reiterate, just because a morphology file is successfully imported doesn't mean it is immediately suitable for use in a neuronal model. Bear in mind that whoever created the file may have had different goals from creation of a single cell model (as with Neurolucida files), or may have created it specifically for a particular simulator, with the eccentricities of that platform in mind.

To import a morphology file: Open a new or existing project, go to tab Cell Types, click on Add New Cell Type... and select one of the format specific readers, e.g. GENESISMorphReader.

GENESIS

GENESIS morphology files can be imported. These are *.p readcell compatible files. The proper format for these files is specified here.

This is a well described format and there exists a number of models containing cells specified in this way. However, the whole specification is not supported in neuroConstruct, an inexhaustive compliance list follows:

  • Each line is included in the target cell as a Segment with it's own Section, i.e. no cables are automatically built
  • Relative or absolute coords are supported, but only cartesian, not polar coords
  • RM, RA, ELEAK, etc are ignored as they usually refer to variables set outside the file
  • When a *compt statement is encountered, a Section group is created for all subsequent segments, until another *compt is encountered
  • *spherical will result in a zero length segment
  • Channel densities after the coords in segment lines are not imported (however, as Section Groups are created from the *compt statements, these should be easy to add later)

Note that cells specified in this way assume the target platform is GENESIS and compartmental modelling, as opposed to cable modelling, will be used. Therefore the compartmentalisation will not be ideal for platforms such as NEURON. This issue has been addressed with the introduction of Compartmentalisations

NEURON

A subset of NEURON files can be imported. In contrast to GENESIS, there is no fixed format in NEURON for specifying morphologies (note however, MorphML export is being implemented in a new vesion of NEURON, see here) However, a number of models exist with the cellular morphology in separate files, many of which were created by the ntscable program. These files are usually characterised by a large number of lines of coordinates (lines of 4 floats) containing information accessed previously in the file by the fscan() command.

The following is a summary of what can be imported from a given NEURON morphology file:

  • create statements, followed by section (array) names, e.g.: create soma, dendrite_1[31]
  • connect statements, e.g. soma connect dendrite_1[0] (0), 0.5
  • simple for loops
  • pt3dclear() and pt3dadd()
  • fscan() will attempt to retrieve the next float on a line not recognised as one of the previous commands
  • Comments are ignored, forward slashes, used to spread single commands over a number of lines, are recognised as such

This functionality has been tested for a handful of files, but if there are examples of files which you feel are in a format which could easily be imported please get in touch

Cvapp (SWC files)

The file format used by Cvapp (extension SWC) is also supported. It was developed to cover most of the information common between in Neurolucida, NEURON and GENESIS formats. This format is pretty straightforward, but as mentioned, care must be taken with the first soma segment. Check the morphology when imported and ensure the root segment is as intended. Note that as of v1.0.4, there was a change in the import of SWC format files, to automatically create Sections from the 3D points between splits in the dendritic morphologies, resulting in a lower number of Sections but the same number of Segments. See the note on Electrotonic length before using those morphologies in simulations.

MorphML

Files can be imported and exported in MorphML format.

Normally the most recent version of the MorphML specifications will be used by neuroConstruct, but to check compliance, this web service should be used.

There is a close relation between the internal model of a cell in neuroConstruct and the information present in a MorphML file, so exporting and importing a cell in this format should lead to identical cells (though the names need to be different if they are in the same project).

Neurolucida

The Neurolucida file format is used by MicroBrightField products to store information on neuronal reconstructions. Both binary and ASCII format files can be generated by these products, and at this time neuroConstruct can import ASCII (*.asc) format V3 files (a heirarchical file structure with "CellBody", "Dendrite", etc). The format allows recording of various anatomical features, not only neuronal processes such as dendrites and cell bodies, but can record other microanatomical features of potential interest to anatomists. Not all of these features will be relevant when constructing a single cell computational model. Go to Cell Types -> Add New Cell Type and select NeurolucidaReader in the first drop down box. Specify the location of the morphology file and choose a name for the Cell Type. A dialog box will be presented with some options as mentioned below.

The main points to note when importing Neurolucida files are:

  • The soma is normally specified in ASC files as an outline in 2D. An import option is presented for whether to include this information in the neuroConstruct cell, to give a visual guideline of where the real soma should be placed. Obviously this will not represent a sensible construct to be simulated, and so should be removed before using the morphology (View the cell in 3D with solid Segments, select the first Segment in the outline and click on the Edit... button. The whole Section can now be deleted).
  • Another import option concerns how to handle the radii of daughter sections.This is important for example when a small dendrite branches off from a thick main dendrite. The first point on the small dendrite will have a smaller radius than the thick dendrite, and there are two ways to deal with the segment which connects them. The first is to have a truncated cone starting with the larger radius tapering to the radius of the first point on the small dendrite. This probably will lead to more surface area on the small dendrite than intended. The second option is to have the start radius equal to the end radius on this connecting segment. The choice of which approach to take is presented at import of a new Neurolucida file and cannot be changed later.
  • A root Segment is added to form the basis of the real soma. This can be edited to produce a spherical segment filling the soma outline or can be the start of a multi Segment Section representing a soma with complex shape.
  • Trees will normally be considered dendrites (and so added to the group dendrite_group), unless the property (Axon) is found at the start of the tree.
  • As the tree is descended, each line of coordinates will be added as a new Segment. The same Section will be used until a branch point is encountered. At this point a child Section will be created. All new Sections will be specified as connected at point 1 along parent. If the first point on a new Section is equal to the parent endpoint, this point will be used as the start point of a new Section and the next line will specify the end point of the first Segment. If the first point on the new Section is different from the parent endpoint, a Segment will be added connecting the endpoint to this first point.
  • Statements such as (Color Red) will cause the following segments to be added to the group colour_red, etc.
  • All (FilledCircle) type statements highlighting boutons, etc. are ignored.
  • If more than one cell is present in a single ASC file, all info on the dendrites of each cell will be imported, along with each soma outline, and a single root Segment will be created. Select which of the cells to save and based on proximity to the soma outline, and possibly the colouring, remove all dendritic trees not associated with the chosen cell. In the future, a more automated way of separating the cells can be added, if required.

This functionality uses the bulk of the information in Neurolucida files which might be needed for neuronal modelling. Please get in contact if there you have example files, some of the information in which you feel could be useful in other modelling scenarios.