-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEURON compatible morphologies from ArrayMorphology. #151
base: development
Are you sure you want to change the base?
Conversation
Hi @christian-oreilly , thanks for that. Could you rebase that against the development branch please? The master branch is "stable, released code", so all new features/fixes go into development. We then merge development into master when we make a release. The development branch has a number of new cell builder methods and so on which could perhaps make this easier for you too: https://libneuroml.readthedocs.io/en/development/userdocs/coreclasses.html#cell |
Very nice to know, @sanjayankur31. I am used to the master being the "development version" and releases being flagged as such, so I did not think of looking for a bleeding-edge branch. This is very good to know! I'll look at the development code and edit the PR accordingly. |
@sanjayankur31 Sorry for taking so long to get around to do that but this PR is now rebased onto development. |
Well, @sanjayankur31, that is somewhat counterproductive guys (and a failure in communication) if you ask me to rebased this PR and the next day that I rebase, you put a runtime error to deprecate the method that this PR is relying on ( c2f829f ). Anyway, I'll just fork this converter out of libneuroml and provide it as a standalone if you are not interested in maintaining this as part of libneuroml as your doc https://docs.neuroml.org/Userdocs/ImportingMorphologyFiles.html do not point to any viable Python option for import SWC, as far as I can tell. |
Ah, sorry about that @christian-oreilly. I hadn't looked at this PR in a while and I missed that the code was being used here. I'll revert that change to mark it for deprecation in a future release. This rather naive coverter is not really complete/tested. For example, it runs none of the checks listed in our documentation to ensure that the generated NeuroML file is viable for modelling. A user will need to do all of these checks themselves. A full SWC converter is being worked on here: https://github.com/WardDPeeters/Morphologies The plan is to include this in pyneuroml to create an interactive converter, hopefully in the new year. Until then, the suggested method is to use neuroConstruct, which runs all the necessary checks already provides an interactive UI for the user to make tweaks where required. If your files are NEURON files, this is another pythonic way of doing it: |
Error softened to warning: f4415dc |
Thanks for the info, @sanjayankur31. It is much appreciated and useful. I'll look at these different options. Your conversion from NEURON seems interesting. Do you have anything going on about converting mod files? I started a while back to work on that (based on the work of others using the domain-specific language converter textx). At the time, I could not find anything public doing a satisfying job, but I'd be very interested to know if you are working on something for that under the radar. I don't want to lose time on that if there is a more "official" solution to that already being developped. |
There's no completely automated way to convert mod files that I'm aware of, primarily because they can contain equations and so on in them that need a human to go over and convert into a declarative form that NeuroML requires. We have helper tools though. They're noted here: In short:
Then, a human must go over the mod file and fill in the rest. To help with this there are:
So the idea is to complete the neuroml channel file iteratively until the plots from pynml-channelanalysis match the ones that pynml-modchananalysis. I think neuroConstruct does have lots of these utilities built in too, but I haven't used it much so i can't be sure. (I find it easiest to find existing NeuroML channel files and tweak them. The ones in the L5bPyrCellHayetal repo tend to cover quite a few and there should be more on NeuroML-DB. channelpedia also provides NeuroMLv1 exports of channels, and these can be converted to NeuroML using the |
Allows to do something like
and use successfully this morphology in NEURON simulations. Tested with https://neuromorpho.org/neuron_info.jsp?neuron_name=AA0995 . If you like it you can merge it; if you'd prefer not to merge right away, you can wait. I'll continue to use this code with other morphologies for a project of mine so I'll push fixes if this does not work with other morphologies.
I attached the generated morphology, for reference. The biophys is rubbish (they are the same as for the tutorial on the OLM cell), but the morphology seems reasonable to me.
pyr.cell.nml.zip