There isn't a problem here. You just haven't developed an appropriate workflow.
Morphometric data usually contains artifacts or frank errors that preclude blindly using it in computational models without first subjecting it to some examination and consideration, and possibly manual editing and repair, guided by judgment. Import3D was developed with this in mind. It has many features that are helpful in exploring morphometric data and deciding what needs fixing and how to fix it.
vellamike wrote:I'm trying to import a morphology in swc format using NEURON as a python library. I've searched the documentation for quite a while but so far have failed. Can somebody point me to where in the documentation this is explained or tell me how to do it?
In a word, don't. Take the time to examine the data. Look at the error messages and warnings that Import3D generates, and take them seriously. Beware orphan sections and trees. Examine the imported cell from the side (you know how to rotate a shape plot around the z axis?) to make sure you aren't dealing with a reconstruction that suffers from z axis drift or backlash. Check the diameter measurements to make sure that there aren't bottlenecks; also verify that there is a plausible range of diameter measurements (or are there no values < 1um?).
UPDATE: I should clarify that I *have* been able to get access to my morphology by doing
and then using the Tools->Miscellaneous->Import3D followed by export->instantiate, but this is of course very time consuming
and it should be, because importation of morphometric data requires critical examination of what you're getting. Don't just accept it because it seems to work without spawning error messages.
if I want to load my model hundreds of times
Well, when you've gotten to the stage of having a model, you're well past the morphometry importaton stage, aren't you? Presumably you have scrutinized the imported data, and you're happy with it, or you wouldn't have bothered to assign biophysical parameters and decided on a discretization strategy.
The workflow is:
1. Obtain morphometric data (hopefully somebody else did the reconstruction--this is real "stoop labor").
2. Use Import3D to get it into a CellBuilder--this is the step where you agonize about the quality of the morphometric data, and it's necessarily time consuming. Once you're finished with this step, there's no need to return to it.
3. Save the CellBuilder to a session file so you can retrieve it in the future.
4. Use a copy of the CellBuider to assign biophysical parameters and specify the discretization strategy. Save this to a new session file for future reuse.
5. Use a copy of the CellBuilder created in step 4 in your model, or, if necessary, export a hoc file from that CellBuider, and use that hoc file in your model.