|
13 | 13 | import neuroml |
14 | 14 |
|
15 | 15 | import shutil |
16 | | - |
| 16 | +import re |
17 | 17 | import zipfile |
18 | 18 |
|
19 | 19 | from Biophysics import get_biophysical_properties |
@@ -310,20 +310,33 @@ def process_celldir(inputs): |
310 | 310 | notes = '' |
311 | 311 | notes += \ |
312 | 312 | "\n\nExport of a cell model obtained from the BBP Neocortical" \ |
313 | | - "Microcircuit Collaboration Portal into NeuroML2" \ |
314 | | - "\n\n******************************************************\n*" \ |
315 | | - " This export to NeuroML2 has not yet been fully validated!!" \ |
316 | | - "\n* Use with caution!!\n***********************************" \ |
317 | | - "*******************\n\n" |
| 313 | + "Microcircuit Collaboration Portal into NeuroML2\n\n" |
318 | 314 |
|
319 | 315 | if len(ignore_chans) > 0: |
320 | 316 | notes += "Ignored channels = %s\n\n" % ignore_chans |
| 317 | + |
| 318 | + #### Fix me-type |
| 319 | + cell_name = cell_info['cell name'] |
| 320 | + |
| 321 | + cell_info['me-type'] = cell_info['m-type'] + '_' + re.split('[0-9]',cell_name)[0] |
321 | 322 |
|
322 | 323 | notes += "For more information on this cell model see: " \ |
323 | 324 | "https://bbp.epfl.ch/nmc-portal/microcircuit#/metype/%s/" \ |
324 | 325 | "details\n\n" % cell_info['me-type'] |
| 326 | + |
| 327 | + notes += "******************************************************\n*" \ |
| 328 | + " This export to NeuroML2 has not yet been fully validated!!" \ |
| 329 | + "\n* Use with caution!!\n***********************************" \ |
| 330 | + "*******************\n\n " |
325 | 331 |
|
326 | 332 | cell.notes = notes |
| 333 | + |
| 334 | + for k in cell_info.keys(): |
| 335 | + p = neuroml.Property(tag='BBP:%s'%k, value=cell_info[k]) |
| 336 | + cell.properties.append(p) |
| 337 | + |
| 338 | + |
| 339 | + |
327 | 340 | for channel in incl_chans: |
328 | 341 |
|
329 | 342 | nml_doc.includes.append(neuroml.IncludeType( |
|
0 commit comments