Skip to content
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

How to resolve SomaError #80

Open
riddick-the-furyan opened this issue May 15, 2023 · 0 comments
Open

How to resolve SomaError #80

riddick-the-furyan opened this issue May 15, 2023 · 0 comments

Comments

@riddick-the-furyan
Copy link

riddick-the-furyan commented May 15, 2023

I tried extracting input distributions from the files I have and received a SomaError: A soma is already defined. I was wondering how this error could be resolved. I have other files (.swc) in the same folder but only the .asc files give me this issue.

The source code:

import json
from pathlib import Path

import neurots
from neurots import extract_input


def run(distr_dir, params_dir, neuron_dir, data_dir):
    for i in range(0,50,1):
        """Run the example for extracting inputs for synthesis."""
        # Generate distribution from directory of neurons

        distr_name = "test_distr_{}.json".format(i)
        params_name = "test_params_{}.json".format(i)
        neuron_name = "test_neuron_{}.swc".format(i)

        distr = extract_input.distributions(
            data_dir / "neurons",
            feature="path_distances", 
            diameter_model="default",
        )


if __name__ == "__main__":
    data_dir = Path("C:\\Users\\user\\Documents\\Experiment_01\\Data\\Human\\Neocortex_interneurons")
    params_dir = Path("C:\\Users\\user\\Documents\\Experiment_01\\Parameters\\Neocortex_interneuron")
    distr_dir = Path("C:\\Users\\user\\Documents\\Experiment_01\\Distributions\\Neocortex_interneuron")
    neuron_dir = Path("C:\\Users\\user\\Documents\\Experiment_01\\Synthesized\\Neurons\\Neocortex_interneuron")
    
    #result_dir.mkdir(parents=True, exist_ok=True)

    run(distr_dir, params_dir, neuron_dir, data_dir)
    print("DONE!!!")

Data:
Morphologies.zip

Edit: The error occurs in line 166 of io.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant