analyze_gel =========== .. py:module:: analyze_gel .. autoapi-nested-parse:: Add-on functions for electropherogram generation from an annotated gel image Author: Anja Hess Date: 2025-APR-15 Functions --------- .. autoapisummary:: analyze_gel.range_intersect analyze_gel.resize_img analyze_gel.remove_colors_from_img analyze_gel.analyze_gel Module Contents --------------- .. py:function:: range_intersect(r1, r2) Find intersection of two ranges :param r1: range :param r2: range :return: intersection .. py:function:: resize_img(image) Resize each image (helpful for data storage) :param image_file: image array :return: resized image .. py:function:: remove_colors_from_img(image, max_range=0.3) Remove colors from an image, especially colored arrows or marker annotations :param image: numpy array :param max_range: maximum color range to accept before making this black -> increasing = more tolerance :return: all colors now black. .. py:function:: analyze_gel(image_file, run_id=None, marker_lane=0) Core function to generate a signal table from a DNA gel image. :param image_file: str, path to DNA gel image :return: multiple intermediate images to visualize the gel band detection are generated and saved, finally the signal table is saved to disk and returned along with the save_dir (str) and the error.