topostats.tracing.dnacurvature#

Module for calculating curvature statistics.

Attributes#

Classes#

Curvature

Class for determining the curvature of molecules.

Module Contents#

topostats.tracing.dnacurvature.LOGGER#
class topostats.tracing.dnacurvature.Curvature(molecule_coordinates: numpy.ndarray, circular: bool)#

Class for determining the curvature of molecules.

molecule_coordinates#
circular#
n_points#
first_derivative = None#
second_derivative = None#
local_curvature = None#
calculate_derivatives(edge_order: int = 1) None#

Find the curvature for an individual molecule.

Parameters:
  • molecule_coordinates (np.ndarray) – Coordinates of the simplified splined trace of a molecule. These are returned by dnaTracing.

  • circular (bool) – Whether the molecule has been determined as being circular or not.

  • edge_order (int) – Gradient is passed to numpy.gradient and Gradient is calculated using N-th order accurate differences at boundaries. Also used to expand the array by the necessary number of coordinates at either end to form a loop for the calculations.

_calculate_local_curvature() float#

Calculate the local curvature between points.