Skip to content

Error in Pycurv Step #50

@Kathir-66

Description

@Kathir-66

When I run Pycurv it failed for couple of tomograms the error was the following

Error message

/u/kaezhila/conda-envs/morphometrics/lib/python3.7/site-packages/numpy/core/fromnumeric.py:3441: RuntimeWarning: Mean of empty slice. out=out, **kwargs) /u/kaezhila/conda-envs/morphometrics/lib/python3.7/site-packages/numpy/core/_methods.py:189: RuntimeWarning: invalid value encountered in double_scalars ret = ret.dtype.type(ret / rcount) Traceback (most recent call last): File "run_pycurv.py", line 71, in <module> cores=config["cores"]) File "/viper/u1/kaezhila/surface_morphometrics/curvature.py", line 47, in run_pycurv basename, seg_file, folder, scale, radius_hit, methods=['VV'], min_component=min_component, runtimes=runtimes_file, cores=cores, remove_wrong_borders=remove_wrong_borders) File "/viper/u1/kaezhila/surface_morphometrics/curvature_calculation.py", line 323, in new_workflow cores=cores, runtimes=runtimes) File "/u/kaezhila/conda-envs/morphometrics/lib/python3.7/site-packages/pycurv/vector_voting.py", line 92, in normals_directions_and_curvature_estimation runtimes=runtimes, graph_file=graph_file) File "/u/kaezhila/conda-envs/morphometrics/lib/python3.7/site-packages/pycurv/vector_voting.py", line 315, in normals_estimation sg.graph.vp.avg_normals[v] = avg_normal / np.linalg.norm(avg_normal) File "/u/kaezhila/conda-envs/morphometrics/lib/python3.7/site-packages/graph_tool/__init__.py", line 847, in __setitem__ self._PropertyMap__map[k] = v AttributeError: 'numpy.float64' object has no attribute '__iter__'

I am attaching the config file for reference

Config file

`
data_dir: "/ptmp/kaezhila/morphometrics/inputs/"
work_dir: "/ptmp/kaezhila/morphometrics/results/"
segmentation_values: # The value used to represent each feature, and the name of the feature.
OMM: 1
IMM: 2
ER: 11
surface_generation:
angstroms: false # Default scaling adjusts so surfaces are nm-scaled, if set to true surfaces are not rescaled and remain angstrom-scaled.
ultrafine: false # If true, the surface is generated with a new high quality protocol. This makes calculation much slower but the surface is much better for sampling density.
mesh_sampling: 1 # Approximate mesh sampling rate, for ultrafine mode
simplify: true # Non-simplified surfaces can be VERY slow, but are better for sampling the coulomb potential.
max_triangles: 300000 # If simplifying and more than this number of triangles are generated, the surface is decimated to this number
extrapolation_distance: 1.5 # Distance in nm (or angstroms, if angstrom setting is True) to extrapolate the surface
octree_depth: 9 # Increase if the surface is too smooth, decrease if surface is too jagged - but has a HUGE effect.
point_weight: 0.7 # Larger numbers have stronger weight towards fitting segmented points, smaller numbers have stronger weight towards generating a smooth surface
neighbor_count: 400 # Number of neighbors used for normal estimation. Should not need to adjust this, but I am exposing it as a tuning variable. Values over 50 seem to all be equivalently good...
smoothing_iterations: 1 # Number of smoothing iterations to perform for estimating normals. You should usually leave this at 1.
curvature_measurements:
radius_hit: 9 # This corresponds to the radius of the smallest feature of interest, roughly, for neighborhood determination. 8-15 seems to be a good range for mitochondria
min_component: 30 # The minimum number of triangles for a component to be considered for curvature measurement.
exclude_borders: 1 # Values greater than zero exclude the border from the curvature calculation by n nm/angstroms.
distance_and_orientation_measurements:
mindist: 3 # Minimum distance between two points for them to be considered for distance measurement.
maxdist: 400 # Maximum distance between two points for them to be considered for distance measurement.
tolerance: 0.1 # Tolerance for determining if a triangle is contacted by a line.
verticality: true # Measure verticality (angle relative to growth plane).
intra: # Intra-surface distance/orientation (verticality) measurements
- IMM
- OMM
- ER
relative_orientation: true # Measure relative orientation (angle relative to nearest neighbor surface).
inter: # Intersurface distance/orientation measurements. Writes out symmetrically so you do not need to give symmetric options.
OMM:
- IMM
- ER
IMM:
- ER

cores: 20 # Number of cores to use for parallel processing.

`

I am attaching couple of the $.surface.vtp files it failed for

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions