morphio 2.6.0__tar.gz → 2.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. {MorphIO-2.6.0 → MorphIO-2.6.2}/MorphIO.egg-info/PKG-INFO +59 -14
  2. {MorphIO-2.6.0 → MorphIO-2.6.2}/MorphIO.egg-info/SOURCES.txt +1 -0
  3. {MorphIO-2.6.0 → MorphIO-2.6.2}/PKG-INFO +59 -14
  4. {MorphIO-2.6.0 → MorphIO-2.6.2}/README.md +58 -13
  5. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/lex.cpp +34 -11
  6. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/morphologyASC.cpp +19 -9
  7. MorphIO-2.6.2/tests/data/marker-with-string.asc +12 -0
  8. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_2_neurolucida.py +42 -4
  9. {MorphIO-2.6.0 → MorphIO-2.6.2}/.clang-format +0 -0
  10. {MorphIO-2.6.0 → MorphIO-2.6.2}/.github/workflows/clang_format_check.yaml +0 -0
  11. {MorphIO-2.6.0 → MorphIO-2.6.2}/.github/workflows/publish-sdist-wheels.yml +0 -0
  12. {MorphIO-2.6.0 → MorphIO-2.6.2}/.github/workflows/run-tests.yml +0 -0
  13. {MorphIO-2.6.0 → MorphIO-2.6.2}/.gitignore +0 -0
  14. {MorphIO-2.6.0 → MorphIO-2.6.2}/.gitmodules +0 -0
  15. {MorphIO-2.6.0 → MorphIO-2.6.2}/.travis.yml +0 -0
  16. {MorphIO-2.6.0 → MorphIO-2.6.2}/3rdparty/CMakeLists.txt +0 -0
  17. {MorphIO-2.6.0 → MorphIO-2.6.2}/CHANGLOG.md +0 -0
  18. {MorphIO-2.6.0 → MorphIO-2.6.2}/CMake/CompilerFlags.cmake +0 -0
  19. {MorphIO-2.6.0 → MorphIO-2.6.2}/CMake/MorphIOConfig.cmake +0 -0
  20. {MorphIO-2.6.0 → MorphIO-2.6.2}/CMakeLists.txt +0 -0
  21. {MorphIO-2.6.0 → MorphIO-2.6.2}/CONTRIBUTING.md +0 -0
  22. {MorphIO-2.6.0 → MorphIO-2.6.2}/COPYING +0 -0
  23. {MorphIO-2.6.0 → MorphIO-2.6.2}/COPYING.LESSER +0 -0
  24. {MorphIO-2.6.0 → MorphIO-2.6.2}/MANIFEST.in +0 -0
  25. {MorphIO-2.6.0 → MorphIO-2.6.2}/MorphIO.egg-info/dependency_links.txt +0 -0
  26. {MorphIO-2.6.0 → MorphIO-2.6.2}/MorphIO.egg-info/not-zip-safe +0 -0
  27. {MorphIO-2.6.0 → MorphIO-2.6.2}/MorphIO.egg-info/requires.txt +0 -0
  28. {MorphIO-2.6.0 → MorphIO-2.6.2}/MorphIO.egg-info/top_level.txt +0 -0
  29. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/CMakeLists.txt +0 -0
  30. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_enums.h +0 -0
  31. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_immutable.cpp +0 -0
  32. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_immutable.h +0 -0
  33. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_misc.cpp +0 -0
  34. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_misc.h +0 -0
  35. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_mutable.cpp +0 -0
  36. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_mutable.h +0 -0
  37. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_vasculature.cpp +0 -0
  38. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bind_vasculature.h +0 -0
  39. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bindings_utils.cpp +0 -0
  40. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/bindings_utils.h +0 -0
  41. {MorphIO-2.6.0 → MorphIO-2.6.2}/binds/python/morphio.cpp +0 -0
  42. {MorphIO-2.6.0 → MorphIO-2.6.2}/ci/check_clang_format.sh +0 -0
  43. {MorphIO-2.6.0 → MorphIO-2.6.2}/ci/cpp_test.sh +0 -0
  44. {MorphIO-2.6.0 → MorphIO-2.6.2}/ci/python_test.sh +0 -0
  45. {MorphIO-2.6.0 → MorphIO-2.6.2}/doc/BBPLOGO350.jpg +0 -0
  46. {MorphIO-2.6.0 → MorphIO-2.6.2}/doc/specification.md +0 -0
  47. {MorphIO-2.6.0 → MorphIO-2.6.2}/doc/specification_neurolucida.md +0 -0
  48. {MorphIO-2.6.0 → MorphIO-2.6.2}/examples/getting_started.ipynb +0 -0
  49. {MorphIO-2.6.0 → MorphIO-2.6.2}/examples/getting_started_mutable.ipynb +0 -0
  50. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/endoplasmic_reticulum.h +0 -0
  51. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/enums.h +0 -0
  52. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/errorMessages.h +0 -0
  53. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/exceptions.h +0 -0
  54. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/glial_cell.h +0 -0
  55. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mito_section.h +0 -0
  56. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mitochondria.h +0 -0
  57. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/morphology.h +0 -0
  58. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/endoplasmic_reticulum.h +0 -0
  59. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/glial_cell.h +0 -0
  60. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/mito_section.h +0 -0
  61. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/mitochondria.h +0 -0
  62. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/modifiers.h +0 -0
  63. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/morphology.h +0 -0
  64. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/section.h +0 -0
  65. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/soma.h +0 -0
  66. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/mut/writers.h +0 -0
  67. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/properties.h +0 -0
  68. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/section.h +0 -0
  69. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/section_base.h +0 -0
  70. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/section_base.tpp +0 -0
  71. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/section_iterators.hpp +0 -0
  72. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/shared_utils.tpp +0 -0
  73. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/soma.h +0 -0
  74. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/tools.h +0 -0
  75. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/types.h +0 -0
  76. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/vasc/iterators.hpp +0 -0
  77. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/vasc/properties.h +0 -0
  78. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/vasc/section.h +0 -0
  79. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/vasc/vasculature.h +0 -0
  80. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/vector_types.h +0 -0
  81. {MorphIO-2.6.0 → MorphIO-2.6.2}/include/morphio/version.h +0 -0
  82. {MorphIO-2.6.0 → MorphIO-2.6.2}/morphio/__init__.py +0 -0
  83. {MorphIO-2.6.0 → MorphIO-2.6.2}/morphio/mut/__init__.py +0 -0
  84. {MorphIO-2.6.0 → MorphIO-2.6.2}/morphio/vasculature/__init__.py +0 -0
  85. {MorphIO-2.6.0 → MorphIO-2.6.2}/scripts/check-clang-format-all +0 -0
  86. {MorphIO-2.6.0 → MorphIO-2.6.2}/setup.cfg +0 -0
  87. {MorphIO-2.6.0 → MorphIO-2.6.2}/setup.py +0 -0
  88. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/CMakeLists.txt +0 -0
  89. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/endoplasmic_reticulum.cpp +0 -0
  90. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/enums.cpp +0 -0
  91. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/errorMessages.cpp +0 -0
  92. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/glial_cell.cpp +0 -0
  93. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mito_section.cpp +0 -0
  94. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mitochondria.cpp +0 -0
  95. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/morphology.cpp +0 -0
  96. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/endoplasmic_reticulum.cpp +0 -0
  97. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/glial_cell.cpp +0 -0
  98. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/mito_section.cpp +0 -0
  99. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/mitochondria.cpp +0 -0
  100. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/modifiers.cpp +0 -0
  101. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/morphology.cpp +0 -0
  102. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/section.cpp +0 -0
  103. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/soma.cpp +0 -0
  104. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/mut/writers.cpp +0 -0
  105. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/properties.cpp +0 -0
  106. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/morphologyASC.h +0 -0
  107. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/morphologyHDF5.cpp +0 -0
  108. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/morphologyHDF5.h +0 -0
  109. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/morphologySWC.cpp +0 -0
  110. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/morphologySWC.h +0 -0
  111. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/utilsHDF5.h +0 -0
  112. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/vasculatureHDF5.cpp +0 -0
  113. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/readers/vasculatureHDF5.h +0 -0
  114. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/section.cpp +0 -0
  115. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/soma.cpp +0 -0
  116. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/vasc/properties.cpp +0 -0
  117. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/vasc/section.cpp +0 -0
  118. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/vasc/vasculature.cpp +0 -0
  119. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/vector_utils.cpp +0 -0
  120. {MorphIO-2.6.0 → MorphIO-2.6.2}/src/version.cpp.in +0 -0
  121. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/CMakeLists.txt +0 -0
  122. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/__init__.py +0 -0
  123. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/contrib/catch.hpp +0 -0
  124. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/astrocyte.h5 +0 -0
  125. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/circle_contour.asc +0 -0
  126. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/complexe.swc +0 -0
  127. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/disconnected_neurite.swc +0 -0
  128. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/merged.h5 +0 -0
  129. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/Neuron.h5 +0 -0
  130. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/endoplasmic-reticulum.h5 +0 -0
  131. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/mitochondria.h5 +0 -0
  132. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/monodim.h5 +0 -0
  133. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/simple-broken-section-type.h5 +0 -0
  134. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/simple-negative-section-type.h5 +0 -0
  135. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/simple.h5 +0 -0
  136. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/soma_no_neurites.h5 +0 -0
  137. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v1/two_child_unmerged.h5 +0 -0
  138. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/v2/Neuron.h5 +0 -0
  139. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/vasculature-broken-section-type.h5 +0 -0
  140. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/vasculature1.h5 +0 -0
  141. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/h5/vasculature2.h5 +0 -0
  142. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/iterators.asc +0 -0
  143. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/mono-type.asc +0 -0
  144. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/multiple_point_section.asc +0 -0
  145. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/multiple_soma.swc +0 -0
  146. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/nested_single_children.asc +0 -0
  147. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/neurite_wrong_root_point.swc +0 -0
  148. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/nrn-order-already-sorted.h5 +0 -0
  149. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/nrn_ordering.swc +0 -0
  150. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/pia.asc +0 -0
  151. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/reversed_NRN_neurite_order.swc +0 -0
  152. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/sections-block.asc +0 -0
  153. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/simple-with-font.asc +0 -0
  154. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/simple-with-image-coord.asc +0 -0
  155. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/simple.asc +0 -0
  156. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/simple.swc +0 -0
  157. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/simple2.asc +0 -0
  158. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/soma_cylinders.swc +0 -0
  159. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/soma_multiple_frustums.swc +0 -0
  160. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/soma_single_frustum.swc +0 -0
  161. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/soma_three_points_cylinder.swc +0 -0
  162. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/spine.asc +0 -0
  163. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/data/three_point_soma.swc +0 -0
  164. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/main.cpp +0 -0
  165. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/requirement_tests.txt +0 -0
  166. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_0_API.py +0 -0
  167. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_10_vasculature.py +0 -0
  168. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_1_swc.py +0 -0
  169. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_3_h5.py +0 -0
  170. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_4_immut.py +0 -0
  171. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_5_mut.py +0 -0
  172. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_6_writers.py +0 -0
  173. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_7_modifiers.py +0 -0
  174. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_8_all_morphologies.py +0 -0
  175. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_9_surfaces.py +0 -0
  176. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/test_morphology.cpp +0 -0
  177. {MorphIO-2.6.0 → MorphIO-2.6.2}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MorphIO
3
- Version: 2.6.0
3
+ Version: 2.6.2
4
4
  Summary: A neuron morphology IO library
5
5
  Home-page: https://github.com/BlueBrain/MorphIO/
6
6
  Author: Blue Brain Project, EPFL
@@ -356,7 +356,7 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
356
356
 
357
357
  <details>
358
358
  <summary>Click to expand!</summary>
359
-
359
+
360
360
  MorphIO also support reading and writing glia (such as astrocytes) from/to disk according to the H5 specification
361
361
  https://bbpteam.epfl.ch/documentation/projects/Morphology%20Documentation/latest/h5v1.html
362
362
 
@@ -501,7 +501,7 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
501
501
 
502
502
  <details>
503
503
  <summary>Click to expand!</summary>
504
-
504
+
505
505
  A marker is an [s-expression](https://fr.wikipedia.org/wiki/S-expression) at the top level of the Neurolucida file that contains additional information about the morphology. For example:
506
506
 
507
507
  ```lisp
@@ -535,17 +535,40 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
535
535
  (9 10 11 6)
536
536
  )
537
537
  ```
538
- - An sexp with one of the following top level s-exp:
539
- * Dot
540
- * FilledCircle
541
- * SnowFlake
542
- * Asterisk
543
- * OpenCircle
544
- * OpenStar
545
- * Flower
546
- * OpenSquare
547
- * FilledStar
548
- * DoubleCircle
538
+ - An sexp with one of the following top level regular expression:
539
+
540
+ - Dot[0-9]*
541
+ - Plus[0-9]*
542
+ - Cross[0-9]*
543
+ - Splat[0-9]*
544
+ - Flower[0-9]*
545
+ - Circle[0-9]*
546
+ - Flower[0-9]*
547
+ - TriStar[0-9]*
548
+ - OpenStar[0-9]*
549
+ - Asterisk[0-9]*
550
+ - SnowFlake[0-9]*
551
+ - OpenCircle[0-9]*
552
+ - ShadedStar[0-9]*
553
+ - FilledStar[0-9]*
554
+ - TexacoStar[0-9]*
555
+ - MoneyGreen[0-9]*
556
+ - DarkYellow[0-9]*
557
+ - OpenSquare[0-9]*
558
+ - OpenDiamond[0-9]*
559
+ - CircleArrow[0-9]*
560
+ - CircleCross[0-9]*
561
+ - OpenQuadStar[0-9]*
562
+ - DoubleCircle[0-9]*
563
+ - FilledSquare[0-9]*
564
+ - MalteseCross[0-9]*
565
+ - FilledCircle[0-9]*
566
+ - FilledDiamond[0-9]*
567
+ - FilledQuadStar[0-9]*
568
+ - OpenUpTriangle[0-9]*
569
+ - FilledUpTriangle[0-9]*
570
+ - OpenDownTriangle[0-9]*
571
+ - FilledDownTriangle[0-9]*
549
572
 
550
573
  Example:
551
574
  ```lisp
@@ -557,6 +580,8 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
557
580
  ) ; End of markers
558
581
  ```
559
582
 
583
+ ℹ️ Markers can may have only `(X Y Z)` specified instead of the more common `(X Y Z D)`. In this case, diameters are set to 0.
584
+
560
585
  ##### Usage
561
586
 
562
587
  ```python
@@ -578,6 +603,26 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
578
603
  assert_array_equal(pia.diameters, [3, 4, 5, 6])
579
604
  ```
580
605
 
606
+ ⚠️ Only top level markers are currently supported. This means the following nested marker won't be available the the MorphIO API.
607
+
608
+ ```python
609
+ ( (Color White) ; [10,1]
610
+ (Dendrite)
611
+ ( -290.87 -113.09 -16.32 2.06) ; Root
612
+ ( -290.87 -113.09 -16.32 2.06) ; R, 1
613
+ (
614
+ ( -277.14 -119.13 -18.02 0.69) ; R-1, 1
615
+ ( -275.54 -119.99 -16.67 0.69) ; R-1, 2
616
+ (Cross ; [3,3]
617
+ (Color Orange)
618
+ (Name "Marker 3")
619
+ ( -271.87 -121.14 -16.27 0.69) ; 1
620
+ ( -269.34 -122.29 -15.48 0.69) ; 2
621
+ ) ; End of markers
622
+ )
623
+ )
624
+ ```
625
+
581
626
  </details>
582
627
 
583
628
  ### Tips
@@ -137,6 +137,7 @@ tests/data/circle_contour.asc
137
137
  tests/data/complexe.swc
138
138
  tests/data/disconnected_neurite.swc
139
139
  tests/data/iterators.asc
140
+ tests/data/marker-with-string.asc
140
141
  tests/data/mono-type.asc
141
142
  tests/data/multiple_point_section.asc
142
143
  tests/data/multiple_soma.swc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MorphIO
3
- Version: 2.6.0
3
+ Version: 2.6.2
4
4
  Summary: A neuron morphology IO library
5
5
  Home-page: https://github.com/BlueBrain/MorphIO/
6
6
  Author: Blue Brain Project, EPFL
@@ -356,7 +356,7 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
356
356
 
357
357
  <details>
358
358
  <summary>Click to expand!</summary>
359
-
359
+
360
360
  MorphIO also support reading and writing glia (such as astrocytes) from/to disk according to the H5 specification
361
361
  https://bbpteam.epfl.ch/documentation/projects/Morphology%20Documentation/latest/h5v1.html
362
362
 
@@ -501,7 +501,7 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
501
501
 
502
502
  <details>
503
503
  <summary>Click to expand!</summary>
504
-
504
+
505
505
  A marker is an [s-expression](https://fr.wikipedia.org/wiki/S-expression) at the top level of the Neurolucida file that contains additional information about the morphology. For example:
506
506
 
507
507
  ```lisp
@@ -535,17 +535,40 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
535
535
  (9 10 11 6)
536
536
  )
537
537
  ```
538
- - An sexp with one of the following top level s-exp:
539
- * Dot
540
- * FilledCircle
541
- * SnowFlake
542
- * Asterisk
543
- * OpenCircle
544
- * OpenStar
545
- * Flower
546
- * OpenSquare
547
- * FilledStar
548
- * DoubleCircle
538
+ - An sexp with one of the following top level regular expression:
539
+
540
+ - Dot[0-9]*
541
+ - Plus[0-9]*
542
+ - Cross[0-9]*
543
+ - Splat[0-9]*
544
+ - Flower[0-9]*
545
+ - Circle[0-9]*
546
+ - Flower[0-9]*
547
+ - TriStar[0-9]*
548
+ - OpenStar[0-9]*
549
+ - Asterisk[0-9]*
550
+ - SnowFlake[0-9]*
551
+ - OpenCircle[0-9]*
552
+ - ShadedStar[0-9]*
553
+ - FilledStar[0-9]*
554
+ - TexacoStar[0-9]*
555
+ - MoneyGreen[0-9]*
556
+ - DarkYellow[0-9]*
557
+ - OpenSquare[0-9]*
558
+ - OpenDiamond[0-9]*
559
+ - CircleArrow[0-9]*
560
+ - CircleCross[0-9]*
561
+ - OpenQuadStar[0-9]*
562
+ - DoubleCircle[0-9]*
563
+ - FilledSquare[0-9]*
564
+ - MalteseCross[0-9]*
565
+ - FilledCircle[0-9]*
566
+ - FilledDiamond[0-9]*
567
+ - FilledQuadStar[0-9]*
568
+ - OpenUpTriangle[0-9]*
569
+ - FilledUpTriangle[0-9]*
570
+ - OpenDownTriangle[0-9]*
571
+ - FilledDownTriangle[0-9]*
549
572
 
550
573
  Example:
551
574
  ```lisp
@@ -557,6 +580,8 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
557
580
  ) ; End of markers
558
581
  ```
559
582
 
583
+ ℹ️ Markers can may have only `(X Y Z)` specified instead of the more common `(X Y Z D)`. In this case, diameters are set to 0.
584
+
560
585
  ##### Usage
561
586
 
562
587
  ```python
@@ -578,6 +603,26 @@ Description: # MorphIO [![Build Status](https://travis-ci.com/BlueBrain/MorphIO.
578
603
  assert_array_equal(pia.diameters, [3, 4, 5, 6])
579
604
  ```
580
605
 
606
+ ⚠️ Only top level markers are currently supported. This means the following nested marker won't be available the the MorphIO API.
607
+
608
+ ```python
609
+ ( (Color White) ; [10,1]
610
+ (Dendrite)
611
+ ( -290.87 -113.09 -16.32 2.06) ; Root
612
+ ( -290.87 -113.09 -16.32 2.06) ; R, 1
613
+ (
614
+ ( -277.14 -119.13 -18.02 0.69) ; R-1, 1
615
+ ( -275.54 -119.99 -16.67 0.69) ; R-1, 2
616
+ (Cross ; [3,3]
617
+ (Color Orange)
618
+ (Name "Marker 3")
619
+ ( -271.87 -121.14 -16.27 0.69) ; 1
620
+ ( -269.34 -122.29 -15.48 0.69) ; 2
621
+ ) ; End of markers
622
+ )
623
+ )
624
+ ```
625
+
581
626
  </details>
582
627
 
583
628
  ### Tips
@@ -349,7 +349,7 @@ Morphology("myfile.asc", options=Option.no_duplicates|Option.nrn_order)
349
349
 
350
350
  <details>
351
351
  <summary>Click to expand!</summary>
352
-
352
+
353
353
  MorphIO also support reading and writing glia (such as astrocytes) from/to disk according to the H5 specification
354
354
  https://bbpteam.epfl.ch/documentation/projects/Morphology%20Documentation/latest/h5v1.html
355
355
 
@@ -494,7 +494,7 @@ neuron.write('/my/out/file.h5') # Has to be written to h5
494
494
 
495
495
  <details>
496
496
  <summary>Click to expand!</summary>
497
-
497
+
498
498
  A marker is an [s-expression](https://fr.wikipedia.org/wiki/S-expression) at the top level of the Neurolucida file that contains additional information about the morphology. For example:
499
499
 
500
500
  ```lisp
@@ -528,17 +528,40 @@ The following s-expressions are parsed:
528
528
  (9 10 11 6)
529
529
  )
530
530
  ```
531
- - An sexp with one of the following top level s-exp:
532
- * Dot
533
- * FilledCircle
534
- * SnowFlake
535
- * Asterisk
536
- * OpenCircle
537
- * OpenStar
538
- * Flower
539
- * OpenSquare
540
- * FilledStar
541
- * DoubleCircle
531
+ - An sexp with one of the following top level regular expression:
532
+
533
+ - Dot[0-9]*
534
+ - Plus[0-9]*
535
+ - Cross[0-9]*
536
+ - Splat[0-9]*
537
+ - Flower[0-9]*
538
+ - Circle[0-9]*
539
+ - Flower[0-9]*
540
+ - TriStar[0-9]*
541
+ - OpenStar[0-9]*
542
+ - Asterisk[0-9]*
543
+ - SnowFlake[0-9]*
544
+ - OpenCircle[0-9]*
545
+ - ShadedStar[0-9]*
546
+ - FilledStar[0-9]*
547
+ - TexacoStar[0-9]*
548
+ - MoneyGreen[0-9]*
549
+ - DarkYellow[0-9]*
550
+ - OpenSquare[0-9]*
551
+ - OpenDiamond[0-9]*
552
+ - CircleArrow[0-9]*
553
+ - CircleCross[0-9]*
554
+ - OpenQuadStar[0-9]*
555
+ - DoubleCircle[0-9]*
556
+ - FilledSquare[0-9]*
557
+ - MalteseCross[0-9]*
558
+ - FilledCircle[0-9]*
559
+ - FilledDiamond[0-9]*
560
+ - FilledQuadStar[0-9]*
561
+ - OpenUpTriangle[0-9]*
562
+ - FilledUpTriangle[0-9]*
563
+ - OpenDownTriangle[0-9]*
564
+ - FilledDownTriangle[0-9]*
542
565
 
543
566
  Example:
544
567
  ```lisp
@@ -550,6 +573,8 @@ The following s-expressions are parsed:
550
573
  ) ; End of markers
551
574
  ```
552
575
 
576
+ ℹ️ Markers can may have only `(X Y Z)` specified instead of the more common `(X Y Z D)`. In this case, diameters are set to 0.
577
+
553
578
  ##### Usage
554
579
 
555
580
  ```python
@@ -571,6 +596,26 @@ assert_array_equal(pia.points,
571
596
  assert_array_equal(pia.diameters, [3, 4, 5, 6])
572
597
  ```
573
598
 
599
+ ⚠️ Only top level markers are currently supported. This means the following nested marker won't be available the the MorphIO API.
600
+
601
+ ```python
602
+ ( (Color White) ; [10,1]
603
+ (Dendrite)
604
+ ( -290.87 -113.09 -16.32 2.06) ; Root
605
+ ( -290.87 -113.09 -16.32 2.06) ; R, 1
606
+ (
607
+ ( -277.14 -119.13 -18.02 0.69) ; R-1, 1
608
+ ( -275.54 -119.99 -16.67 0.69) ; R-1, 2
609
+ (Cross ; [3,3]
610
+ (Color Orange)
611
+ (Name "Marker 3")
612
+ ( -271.87 -121.14 -16.27 0.69) ; 1
613
+ ( -269.34 -122.29 -15.48 0.69) ; 2
614
+ ) ; End of markers
615
+ )
616
+ )
617
+ ```
618
+
574
619
  </details>
575
620
 
576
621
  ### Tips
@@ -162,17 +162,40 @@ class NeurolucidaLexer
162
162
  rules_.push("Dendrite", +Token::DENDRITE);
163
163
  rules_.push("CellBody", +Token::CELLBODY);
164
164
 
165
- rules_.push("Dot", +Token::MARKER);
166
- rules_.push("FilledCircle", +Token::MARKER);
167
- rules_.push("SnowFlake", +Token::MARKER);
168
- rules_.push("Asterisk", +Token::MARKER);
169
- rules_.push("OpenCircle", +Token::MARKER);
170
- rules_.push("OpenStar", +Token::MARKER);
171
- rules_.push("Flower", +Token::MARKER);
172
- rules_.push("OpenSquare", +Token::MARKER);
173
- rules_.push("FilledStar", +Token::MARKER);
174
- rules_.push("DoubleCircle", +Token::MARKER);
175
- rules_.push("Circle[0-9]+", +Token::MARKER);
165
+ // The code snippet used to infer the marker list is available at:
166
+ // https://github.com/BlueBrain/MorphIO/pull/229
167
+ rules_.push("Dot[0-9]*", +Token::MARKER);
168
+ rules_.push("Plus[0-9]*", +Token::MARKER);
169
+ rules_.push("Cross[0-9]*", +Token::MARKER);
170
+ rules_.push("Splat[0-9]*", +Token::MARKER);
171
+ rules_.push("Flower[0-9]*", +Token::MARKER);
172
+ rules_.push("Circle[0-9]*", +Token::MARKER);
173
+ rules_.push("Flower[0-9]*", +Token::MARKER);
174
+ rules_.push("TriStar[0-9]*", +Token::MARKER);
175
+ rules_.push("OpenStar[0-9]*", +Token::MARKER);
176
+ rules_.push("Asterisk[0-9]*", +Token::MARKER);
177
+ rules_.push("SnowFlake[0-9]*", +Token::MARKER);
178
+ rules_.push("OpenCircle[0-9]*", +Token::MARKER);
179
+ rules_.push("ShadedStar[0-9]*", +Token::MARKER);
180
+ rules_.push("FilledStar[0-9]*", +Token::MARKER);
181
+ rules_.push("TexacoStar[0-9]*", +Token::MARKER);
182
+ rules_.push("MoneyGreen[0-9]*", +Token::MARKER);
183
+ rules_.push("DarkYellow[0-9]*", +Token::MARKER);
184
+ rules_.push("OpenSquare[0-9]*", +Token::MARKER);
185
+ rules_.push("OpenDiamond[0-9]*", +Token::MARKER);
186
+ rules_.push("CircleArrow[0-9]*", +Token::MARKER);
187
+ rules_.push("CircleCross[0-9]*", +Token::MARKER);
188
+ rules_.push("OpenQuadStar[0-9]*", +Token::MARKER);
189
+ rules_.push("DoubleCircle[0-9]*", +Token::MARKER);
190
+ rules_.push("FilledSquare[0-9]*", +Token::MARKER);
191
+ rules_.push("MalteseCross[0-9]*", +Token::MARKER);
192
+ rules_.push("FilledCircle[0-9]*", +Token::MARKER);
193
+ rules_.push("FilledDiamond[0-9]*", +Token::MARKER);
194
+ rules_.push("FilledQuadStar[0-9]*", +Token::MARKER);
195
+ rules_.push("OpenUpTriangle[0-9]*", +Token::MARKER);
196
+ rules_.push("FilledUpTriangle[0-9]*", +Token::MARKER);
197
+ rules_.push("OpenDownTriangle[0-9]*", +Token::MARKER);
198
+ rules_.push("FilledDownTriangle[0-9]*", +Token::MARKER);
176
199
 
177
200
  rules_.push("Generated", +Token::GENERATED);
178
201
  rules_.push("High", +Token::HIGH);
@@ -47,7 +47,7 @@ bool is_end_of_section(Token id) {
47
47
  bool skip_sexp(size_t id) {
48
48
  return (id == +Token::WORD || id == +Token::COLOR || id == +Token::GENERATED ||
49
49
  id == +Token::HIGH || id == +Token::INCOMPLETE || id == +Token::LOW ||
50
- id == +Token::NORMAL || id == +Token::FONT);
50
+ id == +Token::NORMAL || id == +Token::FONT || id == +Token::MARKER);
51
51
  }
52
52
  } // namespace
53
53
 
@@ -76,23 +76,30 @@ class NeurolucidaParser
76
76
  }
77
77
 
78
78
  private:
79
- std::tuple<Point, floatType> parse_point(NeurolucidaLexer& lex) {
79
+ std::tuple<Point, floatType> parse_point(NeurolucidaLexer& lex, bool is_marker) {
80
80
  lex.expect(Token::LPAREN, "Point should start in LPAREN");
81
- std::array<morphio::floatType, 4> point{}; // X,Y,Z,R
82
- for (auto& p : point) {
81
+ std::array<morphio::floatType, 4> point{}; // X,Y,Z,D
82
+ for (unsigned int i = 0; i < 4; i++) {
83
83
  try {
84
84
  #ifdef MORPHIO_USE_DOUBLE
85
- p = std::stod(lex.consume()->str());
85
+ point[i] = std::stod(lex.consume()->str());
86
86
  #else
87
- p = std::stof(lex.consume()->str());
87
+ point[i] = std::stof(lex.consume()->str());
88
88
  #endif
89
89
  } catch (const std::invalid_argument&) {
90
90
  throw RawDataError(err_.ERROR_PARSING_POINT(lex.line_num(), lex.current()->str()));
91
91
  }
92
+
93
+ // Markers can have an s-exp (X Y Z) without diameter
94
+ if (is_marker && i == 2 && (lex_.peek()->str() == ")")) {
95
+ point[3] = 0;
96
+ break;
97
+ }
92
98
  }
93
99
 
94
100
  lex.consume();
95
101
 
102
+ // case where the s-exp is (X Y Z R WORD). For example: (1 1 0 1 S1)
96
103
  if (lex.current()->id == +Token::WORD) {
97
104
  lex.consume(Token::WORD);
98
105
  }
@@ -231,13 +238,14 @@ class NeurolucidaParser
231
238
  } else if (id == Token::RPAREN) {
232
239
  return header;
233
240
  } else if (id == Token::LPAREN) {
241
+ const auto next_token = static_cast<Token>(peek_id);
234
242
  if (skip_sexp(peek_id)) {
235
243
  // skip words/strings/markers
236
244
  lex_.consume_until_balanced_paren();
237
245
  if (peek_id == +Token::FONT)
238
246
  lex_.consume_until_balanced_paren();
239
- } else if (is_neurite_type(static_cast<Token>(peek_id))) {
240
- header.token = static_cast<Token>(peek_id);
247
+ } else if (is_neurite_type(next_token)) {
248
+ header.token = next_token;
241
249
  lex_.consume(); // Advance to NeuriteType
242
250
  lex_.consume();
243
251
  lex_.consume(Token::RPAREN, "New Neurite should end in RPAREN");
@@ -286,7 +294,7 @@ class NeurolucidaParser
286
294
  } else if (peek_id == +Token::NUMBER) {
287
295
  Point point;
288
296
  floatType radius;
289
- std::tie(point, radius) = parse_point(lex_);
297
+ std::tie(point, radius) = parse_point(lex_, (header.token == Token::STRING));
290
298
  points.push_back(point);
291
299
  diameters.push_back(radius);
292
300
  } else if (peek_id == +Token::LPAREN) {
@@ -300,6 +308,8 @@ class NeurolucidaParser
300
308
  throw RawDataError(
301
309
  err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.peek()->str()));
302
310
  }
311
+ } else if (id == Token::STRING) {
312
+ lex_.consume();
303
313
  } else {
304
314
  throw RawDataError(err_.ERROR_UNKNOWN_TOKEN(lex_.line_num(), lex_.peek()->str()));
305
315
  }
@@ -0,0 +1,12 @@
1
+ ; The following annotation has been found in C280999A-I4.asc
2
+ ; It is a top-level annotation with a quote inside
3
+ ( (Color Red)
4
+ ( -0.97 -141.17 84.77)
5
+ "<--4 boutons on a PC soma"
6
+ ) ; End of text
7
+
8
+ ("CellBody"
9
+ (Color Red)
10
+ (CellBody)
11
+ (0 0 0 2)
12
+ )
@@ -1,4 +1,5 @@
1
1
  import os
2
+ from itertools import product
2
3
  from pathlib import Path
3
4
 
4
5
  import morphio
@@ -12,9 +13,40 @@ from .utils import _test_asc_exception, assert_substring, captured_output, tmp_a
12
13
 
13
14
  DATA_DIR = Path(__file__).parent / 'data'
14
15
 
15
- NEUROLUCIDA_MARKERS = ['Dot', 'FilledCircle', 'SnowFlake', 'Asterisk', 'OpenCircle',
16
- 'OpenStar', 'Flower', 'OpenSquare', 'FilledStar', 'DoubleCircle', 'Circle1']
17
-
16
+ NEUROLUCIDA_MARKERS = [
17
+ 'Dot',
18
+ 'Plus',
19
+ 'Cross',
20
+ 'Splat',
21
+ 'Flower',
22
+ 'Circle',
23
+ 'Flower',
24
+ 'TriStar',
25
+ 'OpenStar',
26
+ 'Asterisk',
27
+ 'SnowFlake',
28
+ 'OpenCircle',
29
+ 'ShadedStar',
30
+ 'FilledStar',
31
+ 'TexacoStar',
32
+ 'MoneyGreen',
33
+ 'DarkYellow',
34
+ 'OpenSquare',
35
+ 'OpenDiamond',
36
+ 'CircleArrow',
37
+ 'CircleCross',
38
+ 'OpenQuadStar',
39
+ 'DoubleCircle',
40
+ 'FilledSquare',
41
+ 'MalteseCross',
42
+ 'FilledCircle',
43
+ 'FilledDiamond',
44
+ 'FilledQuadStar',
45
+ 'OpenUpTriangle',
46
+ 'FilledUpTriangle',
47
+ 'OpenDownTriangle',
48
+ 'FilledDownTriangle',
49
+ ]
18
50
 
19
51
  def test_soma():
20
52
  with tmp_asc_file('''("CellBody"
@@ -600,7 +632,8 @@ def test_string_markers():
600
632
 
601
633
  def test_neurolucida_markers():
602
634
  SIMPLE = Morphology(DATA_DIR / 'simple.asc')
603
- for marker in NEUROLUCIDA_MARKERS[:1]:
635
+ for marker, suffix in product(NEUROLUCIDA_MARKERS, ['', '7', '123']):
636
+ marker += suffix
604
637
  with tmp_asc_file(f'''
605
638
  ({marker}
606
639
  (Color White)
@@ -667,3 +700,8 @@ def test_skip_imagecoord():
667
700
  def test_Sections_block():
668
701
  assert_array_equal(Morphology(DATA_DIR / 'sections-block.asc').points,
669
702
  Morphology(DATA_DIR / 'simple.asc').points)
703
+
704
+ def test_marker_with_string():
705
+ m = Morphology(DATA_DIR / 'marker-with-string.asc')
706
+ assert_array_equal(m.markers[0].points, np.array([[ -0.97 , -141.169998, 84.769997]],
707
+ dtype=np.float32))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes