diff --git a/brion/synapse.cpp b/brion/synapse.cpp index 5549697..d563cd8 100644 --- a/brion/synapse.cpp +++ b/brion/synapse.cpp @@ -71,7 +71,8 @@ class SynapseFile : public boost::noncopyable _numAttributes = dataset.dims[1]; if( _numAttributes != SYNAPSE_ALL && - _numAttributes != SYNAPSE_POSITION_ALL ) + _numAttributes != SYNAPSE_POSITION_ALL && + _numAttributes != 1 /* nrn_extra */) { LBTHROW( std::runtime_error( source + " not a valid synapse file")); } @@ -179,6 +180,9 @@ class SynapseFile : public boost::noncopyable return read< SYNAPSE_ALL >( gid, attributes ); case SYNAPSE_POSITION_ALL: return read< SYNAPSE_POSITION_ALL >( gid, attributes ); + case 1: + // nrn_extra + return read< 1 >( gid, 1 ); default: LBERROR << "Synapse file " << _file.getFileName() << " has unknown number of attributes: " << _numAttributes diff --git a/brion/synapse.h b/brion/synapse.h index 4f26133..7f826ce 100644 --- a/brion/synapse.h +++ b/brion/synapse.h @@ -31,6 +31,22 @@ namespace detail { class Synapse; } /** Read access to a Synapse file. * + * There are three types of synapse files that can be read by this class: + * - nrn[_efferent].h5: These files store the synaptic model parameters, + * connectivity information and morphological location of synapses. They + * are organized as sets of tables with one table per neuron and one row + * per affernt (or efferent) synapse. + * - nrn_positions_[_efferent].h5: These files store precomputed spatial + * locations of synapses on the dendrite/axon longitudinal axes and on the + * cell membranes. + * - nrn_extra.h5: This file stores the index of each synapse in the + * list of afferent synapses of a post-synaptic neuron before any pruning + * or filtering is carried out. This indices together with post-synaptic + * neuron GIDs can be used as synapse GIDs. + * + * There exists a forth file type, nrn_summary.h5, with the aggregated + * connectivity per cell. SynapseSummary is the clase used to parse it. + * * Following RAII, this class is ready to use after the creation and will ensure * release of resources upon destruction. Threadsafety is guaranteed for all * provided methods. diff --git a/doc/Changelog.md b/doc/Changelog.md index d47a1dd..75afb66 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -5,6 +5,8 @@ Changelog {#Changelog} * [38](https://github.com/BlueBrain/Brion/pull/38): Fix crash while reading more than `ulimit -Sn` (1024 default) morphologies +* [37](https://github.com/BlueBrain/Brion/pull/37): + Added support for synapse nrn_extra.h5 files. * [31](https://github.com/BlueBrain/Brion/pull/31): Fix crash while reading more than `ulimit -Sn` (1024 default) NEST gdf files * [30](https://github.com/BlueBrain/Brion/pull/30):