TopoStats
TopoStats copied to clipboard
Bending Angle Calculations
Incorporate features from JeanDu/BendingAngle-Upgraded along with work under #168 into sub-modules under topostats.measure.
Main things to consider:
- The relevant code is found in
measure_bending_anglein dnatracing.py - The measurement is only performed once per molecule, so the results can be easily intergrated into the existing data output structure
- The site of measurement can be decided in two ways: the midpoint of the molecule, or the point of highest curvature within the central portion of the molecule; in the former case, the bending angle can be measured independently from the curvature, so the only pre-requisite is successful tracing
- User input will be needed for parameters such as the length of the curve segement used on each side of the bending site; this can be added to the config file
- It would also be worth adding the option to choose between the 'inside' and 'outside' angle of a bend (they should add up to 180°)
- Code will need refactoring and working into up-to-date framework which works with single grains rather than every function having a loop to iterate over the grains within an image.
- Calculations should be configurable via
topostats/default_config.yaml(the basis for generating input files)...- whether to make the calculations and whether to calculate
insideoroutside. - length of segment to be used either side of the curved segment.
- choice of method for calculating bending angle (midpoint of molecule v point of highest curvature).
- whether to make the calculations and whether to calculate
- Results should be incorporated into HDF5 file output (is any additional output e.g. column in CSVs required?).