structure#
- class cryocat.analysis.structure.MAK#
Bases:
object- get_centre_from_mean_subunit_location(output_path)#
- class cryocat.analysis.structure.NPC#
Bases:
object- cluster_subunits_to_rings(mask_size, entry_mask_coord, exit_mask_coord, npc_radius, max_trace_distance, min_trace_distance=0)#
- static compute_diameter(input_motl, pixel_size=1.0, su_id='geom2')#
Compute the average diameter of specific subunit pairs within NPCs.
- Parameters:
- input_motlstr
Path to the input motl file containing molecular data.
- pixel_sizefloat, optional
The size of each pixel in the data, used to scale the computed distances. Default is 1.0.
- su_idstr, optional
The identifier used to select subunits within the data. Default is ‘geom2’.
- Returns:
- numpy.ndarray
An array of average diameters for each unique (tomo_id, object_id) group in the data.
Notes
The function loads molecular data from a specified file, identifies specific subunit pairs, computes the pairwise distances between these pairs, and then calculates the average diameter for each group identified by ‘tomo_id’ and ‘object_id’. Distances are scaled by the pixel size.
- static get_center_and_radius(object_motl, include_singles=False)#
- static get_center_with_radius(object_motl, radius)#
- static get_centers_as_motl(tomo_motl, tomo_id, radius)#
- static get_new_subunit_idx(object_motl, npc_radius, symmetry=8)#
- static merge_rings(input_motls, npc_radius, distance_threshold=40)#
- static merge_subunits(input_motl, npc_radius=55)#
Merge subunits within a given radius in input_motl.
- Parameters:
- input_motlstr or pd.DataFrame
If a string is provided, it is assumed to be a path to the motl file. If a DataFrame is provided, it is used directly.
- npc_radiusint, optional
The radius within which to search for subunits to merge. Default is 55 pixels.
- Returns:
- input_motlpd.DataFrame
The input motl data with merged subunits. The dataframe is modified in-place.
Notes
The function calculates the centers of each objects in the motl and merges objects with a center that’s closer than the npc_radius. All subunits were renumbered and assign back to the input_motl. The number of subunits per object was kept under geom1 in updated motl.
- static unify_nn_orientations(input_motl, dist_threshold=10000)#
- class cryocat.analysis.structure.PleomorphicSurface#
Bases:
object- static assign_affiliation_distance_based(input_motl, parametric_surface, surface_type='ellipsoid', feature_id='object_id', output_file=None, unassigned_value=None)#
- static assign_affiliation_intersection_based(input_motl, parametric_surface, feature_id='object_id', output_file=None, keep_unassigned=True)#
- static assign_affiliation_mask_based(input_motl, object_motl, tomo_dim, shell_size, feature_id='object_id', output_file=None, radius_offset=0.0, motl_radius_id='geom5')#
- static clean_by_normals(input_motl, feature_id='object_id', compute_normals=True, surface_params=None, normals_id='geom4', threshold=None, output_file=None)#
- static clean_by_radius(input_motl, feature_id='object_id', threshold=None, output_file=None)#
- static compute_intersection(input_motl, parametric_surface, feature_id='object_id')#
- static compute_normals(input_motl, surface_params, feature_id='object_id', store_id='geom4', output_file=None)#
- static compute_point_surface_distance(input_motl, parametric_surface, surface_type='ellipsoid', feature_id='object_id', output_file=None, store_id='geom4')#
- static create_spherical_oversampling(input_motl, motl_radius_id, sampling_distance, sampling_angle=360, output_path=None)#
- static get_parametric_description(input_motl, feature_id='object_id', output_file=None)#
- static load_parametric_surface(parametric_surface=None, feature_id='object_id')#