Abstract
Premise
Traditional methods to quantify mycelial growth rely on destructive sampling to quantify biomass. Moreover, these approaches limit continuous observation and require a sufficient mass to measure. Recent work examines hyphal network traits by reconstructing the hyphal network from spatial coordinates via images, providing information about branching patterns and spatial growth over time.
Methods and Results
We developed SkelPy, a Python‐based graphical user interface that skeletonizes images of hyphal networks and extracts biologically relevant structural parameters such as fractal dimension, a proxy for the complexity and branching structure of the hyphal network. Using a high‐throughput pipeline, we imaged three isolates of Botrytis cinerea grown in liquid culture for 72 h, generating a dataset of 180 time‐series images.
Conclusions
SkelPy enables efficient, non‐destructive, and scalable quantification of hyphal growth and complexity from time‐resolved image datasets, providing a powerful and user‐friendly tool for studying fungal network dynamics.
Keywords: high‐throughput phenotyping, hyphal network, image analysis, mycology
Fungi are eukaryotic organisms that are essential for nutrient cycling through decomposition and delivery of nutrients to nearly all species via mycorrhizal associations. Fungi range from unicellular organisms, such as yeast, to complex multicellular networks comprising the mycelium. This mycelial mass is composed of individual hyphae, filamentous structures that acquire nutrients via apical extensions and branching to maximize foraging and nutrient acquisition. As the mycelial mass grows, the hyphae often merge to form complex reticulated structures that are fundamental to development and environmental interactions. The patterns of hyphal growth are shaped by the environment in which they are growing. Low‐nutrient environments result in exploratory growth, characterized by the formation of sparse, outwardly directed hyphae, whereas high‐nutrient environments result in invasive growth characterized by compact multi‐directional branching that allows for denser colonization. The plasticity of hyphal networks suggests that quantifying variation among these networks may provide insight into foraging strategies and how these may shift in response to environmental changes. In addition to variation in network density, some fungal pathogens form sclerotia primordia, which are solid‐like, dense, and armored hyphal clusters that form in response to stressful environmental changes (Ordóñez‐Valencia et al., 2015). Thus, variation in the size and pattern of sclerotia primordia may indicate the degree of environmental stress. Consequently, methods to efficiently characterize fungal growth patterns are desired to link observed morphological variation to underlying biological processes.
Current methods rely on manual scoring, in which users visually assess hyphal intersections to estimate network growth. Traditionally, to quantify hyphal length, the gridline method is used, where a grid is placed over an image of hyphae and the intersections of the hyphae are used to calculate hyphal length as described previously (Newman, 1966; Marsh, 1971). However, while these legacy methods can finely characterize individual morphological parameters, they are labor‐intensive and introduce user‐dependent bias. Recent innovations by Vidal‐Diez de Ulzurrun et al. (2015) and Aguilar‐Trigueros et al. (2022) enable the collection of a broad suite of traits that are key descriptors of growth efficiency and branching morphology. However, these methods are limited in their capacity to process large volumes of data and require a paid MATLAB license (MathWorks, Natick, Massachusetts, USA). The MATLAB environment is not widely used in ecology, where free and open‐source tools, such as R and Python, predominate. Additionally, the suggested experimental setup allows only six samples to be imaged simultaneously, limiting the scalability of experiments that might require imaging hundreds of samples (Vidal‐Diez de Ulzurrun et al., 2015).
Here, we describe and demonstrate the use of SkelPy, a free and open‐source tool with a graphical user interface (GUI) built in Python for skeletonizing and annotating images of fungi grown in liquid culture. In this study, we used a high‐throughput method in which three isolates of Botrytis cinerea Pers. were grown in liquid culture in a 96‐well microplate for 72 h and imaged every 4 h using a Cytation Gen5 plate reader (Agilent Technologies, Santa Clara, California, USA), generating a dataset of 180 time‐series images. We further discuss the biological importance of the measured traits, considering the growth strategies of our study organism, and document downstream analysis in R.
METHODS AND RESULTS
SkelPy is an open‐source GUI program written in Python3 using PyQt (Moore et al., 2023). The source repository and user instructions can be found at https://github.com/AaronMoseley/SkelPy.git (see Data Availability Statement). SkelPy is packaged as a standalone executable for both Windows 11 and macOS, allowing users to run the program without installing Python or additional dependencies. After downloading and unzipping the distribution, Windows users launch the program by double‐clicking SkelPy.exe, and macOS users can open SkelPy.
Dataset
Three isolates of B. cinerea (KatieTomato, B05.10, and 1.04.25) that vary in virulence (Caseys et al., 2021) and genetic diversity (Atwell et al., 2018) were cultured for two weeks on oatmeal agar plates. KatieTomato is a highly virulent isolate, characterized by aggressive infection and the formation of large lesions on its host; B05.10 is an intermediate‐virulence isolate that produces moderate‐sized lesions; and 1.04.25 is a slow‐growing, low‐virulence isolate that forms small lesions or limited visible disease (Caseys et al., 2021).
Spores were collected in sterile water and diluted to a final concentration of 10 spores/µL using an automated spore‐counting pipeline in R (R Core Team, 2025), which can be found at https://github.com/melaniemadrigal07/Post.ImageProcessing. Spores were kept on ice from collection to inoculation to prevent spore germination. Spores were then inoculated into a 96‐well microplate with 70 µL of liquid Gamborg B5 media (Research Products International, Mount Prospect, Illinois, USA) (supplemented with 41 g of fructose, 26.65 g of glucose, and 1.03 g of sucrose, with pH adjusted to 6.5), 10 µL of a racemic mixture of 1000 µM linalool (Thermo Fisher Scientific, Waltham, Massachussetts, USA), 10 µL of spore suspension (10 spores/µL), and 10 µL of OZBlue reagent from the OZBlue Cell Viability kit (OZBiosciences, Marseille, France), in triplicate. Linalool was included as part of a larger study of linalool resistance among Botrytis isolates, and a subset of images from that study were used to develop this method.
Image capture
Plates were incubated and imaged every 4 h across 20 timepoints (n = 180) using a Biotek Cytation Gen5 Plate Reader within a BioSpa v1.04 session (Agilent Technologies). Color brightfield images were captured at 4× magnification for each color channel (RGB) and exported as individual Tagged Image File Format (TIFF) files. For each timepoint, the channel‐specific images were stacked into three‐channel composite images using a Python script available in the SkelPyAnalysis repository (https://github.com/melaniemadrigal07/Post.ImageProcessing). To facilitate user familiarity with the workflow, the SkelPy repository includes a subset of images for users to practice with SkelPy. Although hyphae can extend into the third dimension, the Cytation Gen5 plate reader consistently images the focal plane at the bottom of each well, where the mycelium adheres and grows. As a result, captured images are essentially planar two‐dimensional projections of the mycelium, taken from the same focal plane at each timepoint.
User interface
Upon running the program, users are prompted to select an input directory containing grayscale experimental images in TIFF or PNG format, which ensures compatibility with SkelPy. For compatibility, files must follow the pattern: sample name_timestep.png or .tif (e.g., Sample1_001.tif). If the dataset does not include multiple time steps, the timestamp can simply be set to 0 or any other integer. The user must also specify an output directory for saving the processed images (Figure 1). SkelPy does not create new directories automatically; if the directory does not exist, an error will be returned. Users can generate skeletons for (1) all images in the directory, (2) the full time series for a single sample, or (3) a specific individual image. After running SkelPy, images can be viewed with preset thresholds and modified to include pipeline parameters, such as Gaussian blur (Waltz and Miller, 1998) and noise filtering, to optimize skeleton generation for each sample. These parameters are described in Table 1 for sclerotia primordia and hyphal networks.
Figure 1.

The SkelPy workflow. Users input grayscale images of interest, which are skeletonized and processed to extract network traits such as lines in image, average line length, and center line width. The skeletonization parameters can be modified by users, enabling optimization for different image types. Outputs include skeletonized images and CSV files containing coordinates and trait data for downstream analysis.
Table 1.
Pipeline parameters.
| Processing stepa, b | Description | Increasing | Decreasing |
|---|---|---|---|
| Radial thresholding | Creates a threshold mask that circularly interpolates from the center threshold at the center to the edge threshold at the edges. |
Center threshold: Central pixels appear black Edge threshold: Edge pixels appear black |
Center threshold: Central pixels appear white Edge threshold: Edge pixels appear white |
| Remove small white islands |
Counts the number of pixels in each group of 1's. Areas with fewer pixels than the set parameter turn black. |
Removes more white areas; larger areas remain. | Preserves white areas; increases speckles in the image. |
| Remove noisy islands | Counts the average number of black neighbors in each connected group of pixels. If the average is greater than the threshold, the area turns black. | More areas are considered noise; fewer white islands remain. | Fewer areas are noise; more white islands are present. |
| Smooth image | Reduces image noise and detail using a Gaussian blur; helps enhance image structures. | Smoothness increases; reduces fine detail. | Weaker smoothening; keeps more detailed structures but also increases noise. |
| Adjust contrast | Scales pixel values away or toward 0.5. Used to easily identify network lines |
Scales pixels away from 0.5. Enhances network lines; preserves interconnect. |
Scales pixels toward 0.5. Reduces contrast; network lines are less preserved. |
| Edge detection | Uses Canny edge detection to outline the fungal network. | Detects more edges, but can increase noise. | Detects fewer edges. Faint structures may be missed. |
All processing steps are part of the SkelPy pipeline.
Parameters for each processing step: radial thresholding = centerThreshold, edgeThreshold; remove small white islands = minWhiteIslandSize; remove noisy islands = noiseTolerance; smooth image = gaussianBlurSigma; adjust contrast = contrastAdjustment; edge detection = gaussianBlurSigma, maxThreshold.
Image processing
All images were processed in SkelPy using SciPy (Virtanen et al., 2020) and scikit‐image (van der Walt et al., 2014). To run SkelPy, Windows and Mac users can double‐click on the SkelPy.exe to launch the application. SkelPy is made with PyQt (Moore et al., 2023), a commonly used Python library for creating GUIs. In PyQt, widgets and windows are organized in a parent–child hierarchy, where a parent object manages the lifetime and behavior of its child widgets (e.g., a main window is the parent of its buttons and panels). For example, modifying the contrast of the image will send a signal back to the parent object and triggers the corresponding image‐processing function (Figure 2). Default preprocessing and skeletonization parameters were empirically optimized on 180 images to ensure robust performance across isolates, contrasts, and growth patterns.
Figure 2.

Overview of SkelPy image processing and skeletonization. Raw images first undergo a series of preprocessing steps, including radial thresholding to isolate the colony center and edges, and removal of small white or black noise islands. Gaussian blurring is used to reconnect faint hyphae, and optimal contrast adjustment is performed using a slider. The processed images are then passed through Canny edge detection and edge filtering to refine hyphal boundaries. The refined edges are skeletonized using the Zhang–Suen algorithm (Zhang and Suen, 1984), converted into vector networks, and displayed in a preview window for side‐by‐side comparison with the original image.
Skeletons of the images are generated by implementing radial threshold, which creates a threshold mask that interpolates from the center of the image (centerThreshold) to the edges of the image (edgeThreshold) (Figure 2). This returns an input image that is thresholded pixel‐wise with the threshold mask. This thresholding step removes any remaining white blobs in the image below the minWhiteIslandSize pixels threshold set by the user, preventing any black blobs from being included in the output. These blobs generate noise, defined as pixels that are disconnected from the hyphal network or sclerotia primordia. To reduce background noise, pixels with more than four black neighbors were removed, as these are indicative of noise in the image. Neighbors are defined as the eight positions surrounding a pixel within a 3 × 3‐pixel window. The number of neighbors per white pixel ranges from zero (pixel is fully embedded within the white region) to eight (pixel is isolated within the black background). The average value is computed across all pixels in the connected component; lower values indicate contiguous hyphal networks, whereas higher values indicate isolated noise.
The image is then smoothed using Gaussian blurring (Waltz and Miller, 1998; Virtanen et al., 2020), which ensures that connected lines in the hyphal network are represented as connected. To make it easier to spot the network lines, the contrast of the image can be modified by using the slide scale, which moves pixel values away from or toward 0.5. The skeleton for the hyphal network was then finalized using Canny edge detection (Canny, 1986) to identify pixels with strong intensity relative to their neighbors. To reduce noise, a pixel was retained in the skeleton if 50% of the pixels within a two‐pixel radius were marked as edges. This filtering step is necessary because Canny edge detection generates a boundary around the skeleton rather than the centerline of the structure. The preprocessed image is then binarized and skeletonized using the Zhang–Suen algorithm (Zhang and Suen, 1984).
After running the application, the skeleton viewer allows users to view the input image and vectorized skeletonized image side by side. Users can overlay the skeleton on the original image, modify the preprocessing steps as needed, and preview the results. The preview window can be accessed by clicking on the Preview Steps button in the main window. The preview window displays the current skeleton, the input image, the step the user is modifying, all parameters associated with that step, and sliders for those parameters. By clicking the Left and Right buttons, the user can manually step through the skeletonization process for every skeleton. If the parameters are adjusted, they can be refreshed by clicking the Refresh button and previewing the output skeleton. Users can modify the skeletonization pipeline and create their own skeletonization functions in Python for images of interest. SkelPy extracts two skeletons by default: the first skeleton segments the sclerotia primordia and the second segments the hyphal network. All geometric measurements displayed in the viewer are reported in a normalized coordinate system in which the image's width and height are scaled to 1. This ensures the measurements remain consistent across images of different resolutions. A calibration box in the viewer allows users to enter the physical dimensions of their images; measurements are then automatically rescaled to reflect the true physical units.
Trait extraction in the GUI
SkelPy extracts a suite of structural traits, providing complementary views of fungal growth across scales from fine‐scale geometry to colony‐level organization. These traits help characterize how fungi explore space, allocate resources, and establish cohesive networks.
Hyphal segment structure
SkelPy quantifies the properties of individual hyphal segments using trait metrics. Lines in the image (LinesInImage) counts the number of continuous hyphal segments between branch points, providing insight into the linear exploratory component of growth. Lines in clusters (LinesInClusters) measures how many segments compose each connected group, linking segment‐level structure to colony‐level organization. The width of hyphal segments (Width) is calculated by identifying the line's midpoint, determining the orthogonal direction, and counting the white pixels in the orthogonal line. Width serves as a proxy for transport efficacy, as thicker hyphae often support greater internal flow and nutrient movement. SkelPy's trait framework is extensible; users can modify existing Python functions or add entirely new skeletonization pipelines, and custom parameter sets can be saved, edited, and reapplied across datasets.
Network organization and fragmentation
While fractal dimension captures geometric complexity, additional traits characterize hyphal organization as a network of interconnected structures. One of these traits, ClustersInImage, quantifies the number of distinct groups of connected hyphal segments within the network. This trait serves as a proxy for network fragmentation: a higher number of clusters indicates that growth is occurring, as many isolated hyphal patches are indicative of early colonization stages, stress‐induced growth, or environments in which resources occur in patches. In contrast, fewer clusters indicate an interconnected network in which hyphae fuse and share resources.
Geometric complexity
The GUIs include fractal dimension, a previously established metric describing morphological complexity and space‐filling capacity of fungal networks (Vidal‐Diez de Ulzurrun et al., 2015; Aguilar‐Trigueros et al., 2022). In SkelPy, fractal dimension serves as an estimate of how quickly network complexity accumulates during growth, allowing for fungi with different structural traits to be compared on a common scale.
Fractal dimension was computed using a standard box‐counting algorithm applied to the binary skeleton. The skeleton is converted into a Boolean array, with the smallest image dimension determining the maximum grid size. A series of these square grids with box sizes defined as powers of two was overlaid onto the skeleton pixel. For each box size, the algorithm counted the number of boxes that contained at least one skeleton pixel. If no boxes contained pixels at a given scale, the image was assigned a fractal dimension of zero. To estimate the fractal dimension, we fit a linear regression of log(box count) on log(1/box size), and the slope of this relationship is taken as the box‐counting fractal dimension.
To support scalability, traits are exported into sample‐specific folders. As skeletonization generates large intermediate arrays and graph objects, incremental saving prevents their accumulation in memory and keeps RAM usage low during large‐scale runs. Metadata for each network is saved in a sample.json file, a networkmetadata.csv file, or a sclerotiaPrimordiametadata.csv file. If users implement additional skeletonization pipelines, each will get its own CSV and JSON outputs, named according to the pipeline.
R analysis
The outputs generated by SkelPy are processed using the R package SkelPyR, which provides a reproducible pipeline for reconstructing and cleaning the network. The R package removes internal nodes generated from the skeletonization process and returns a cleaned network. During skeletonization, closely spaced pixels or minor curvatures result in redundant internal nodes. SkelPyR cleans the networks so that they consist of true hyphal edges (individual segments), terminal nodes (“tips”), and branching nodes. Edges represent links that connect points, represent individual hyphal segments, and provide a measure of network connectivity. Tips are endpoints of a hyphal segment and serve as a proxy of hyphal extension.
After cleaning, networks are analyzed using metrics implemented in R with the packages sf (Pebesma, 2018), sfnetwork (van der Meer et al., 2024), and tidygraph (Pedersen, 2024). These R packages enable spatial handling of network geometries, extraction of graph metrics, and visualization of cleaned networks for each sample. The SkelPyR package can be installed using install.packages(“devtools”), followed by devtools::install_github(“melaniemadrigal07/SkelPyR”).
The current version of the SkelPyR package includes functions to compute cleaning summaries, node‐level statistics (degree, betweenness, closeness, component identity), edge‐level measurements (segment length distributions), and whole‐network summaries such as total hyphal length, number of edges and nodes, number of tips and branches, tip and branch fractions, and tip density (Table 2).
Table 2.
SkelPyR trait descriptions.
| Metric | Description | Biological description |
|---|---|---|
| Node degree | Number of edges connected to a node |
Degree = 1 (tip), indicates active growth Degree > 3 indicates branching intensity |
| Betweenness centrality | Frequency a node lies on shortest paths | Identifies major transport junctions for nutrient flow |
| Closeness centrality | Inverse of mean distance to all other nodes | Measures efficiency of network‐wide transport; higher closeness reflects integrated coordinated growth |
| Connected components | Number of disconnected subgraphs | Multiple components suggest fragmentation, inhibited germination, or toxin‐induced stress |
| Edge length | Length of each hyphal segment | Long segments indicate directed exploratory growth; short segments indicate dense, local branching or invasion |
| Number of edges | Total hyphal segments | Captures structural complexity and amount of network activity |
| Total hyphal length | Sum of all edge lengths | Proxy for biomass accumulation and overall growth |
| Number of nodes | Total number of branch points and tips | Another measure of overall network complexity |
| Tip fraction | Proportion of nodes that are tips |
High values = aggressive outward extension Low values = dense branching |
| Branch fraction | Proportion of nodes that are branches |
High values = complex networks and high foraging capacity Low values = linear directional growth |
| Tip density | Tips per unit biomass |
High tip density = efficient colonization strategy Low density = slow or inhibited growth |
All statistics and analyses were conducted in R (v.4.3.0), using tidyverse (Wickham et al., 2019) packages for data processing and summary statistics.
Validation of SkelPy
Images of the hyphal network of isolate 1.04.25 were manually traced for a subset of 15 images on an iPad Air 3rd generation (Apple, Cupertino, California, USA) using the Notability app (Ginger Labs, Redwood City, California, USA). Sclerotia primordia were traced using pen size 3, and hyphal networks were traced using pen size 1. These images were then skeletonized in ImageJ (Schneider et al., 2012) by applying a color‐adjust threshold to convert them to binary, followed by the skeletonize function to generate the skeletonized images. These images were input into SkelPy's comparison function to obtain the maximum and average farthest distance to the nearest point.
To evaluate the relative trade‐offs between accuracy and speed between SkelPy and currently implemented methods, we tested accuracy and speed on a set of 180 hyphal network images and timed the program's high‐throughput processing on a larger dataset of 3842 images. With SkelPy, we generated 180 skeletons in 102 minutes on an Apple M4 MacBook Pro (2024) and used 234 MB. The larger dataset ran for 12 h and 30 min.
For comparison, hand tracing the sclerotia primordia and hyphal network was substantially slower: an early‐timepoint image with minimal branching required 23 min and 19 s and a later‐timepoint image with extensive branching took approximately 2.5 h, whereas SkelPy skeletonized both of those images in less than a minute. To validate automated results, we used SkelPy's image overlay feature to compare hand‐traced skeletonized images and the automated skeleton. Distances are reported as dimensionless values representing the fraction of image width. On average, automated and hand‐traced skeletons differed by 0.0046 units (SD = 0.0009), corresponding to 0.46% of the image dimension, whereas the maximum distance to the closest point was 1.95% of the image dimension. For comparison with an alternative software, using ImageJ's smoothing and edge detection functions yielded fragmented, noisy skeletons that did not preserve hyphal connectivity (Figure 3). In contrast, SkelPy provides a more accurate and scalable approach for network reconstruction.
Figure 3.

Comparison of SkelPy and ImageJ skeletonization. The SkelPy skeleton (left) captures the true hyphal centerlines and preserves the branching topology across the entire field of view. ImageJ's output (right) contains widespread noise, duplicated edges, and merged structures that distort or eliminate genuine connections.
Node‐detection validation
To evaluate the accuracy of SkelPy's automated node detection, we performed a node‐level validation on a random subset of 30 images. For each image, the cleaned spatial network produced by the SkelPy preprocessing workflow was used as the ground‐truth reference for biological branch points (“true nodes”). Automated node predictions were extracted from each image's JSON output. We then computed the Euclidean distance between every predicted node and the nearest true node. Predicted nodes were classified as true positives if the distance was <0.01 normalized image units; otherwise, they were classified as false positives. Across the 30 images, 80.8% of predicted nodes were true biological nodes and 19.1% were false positives. All analyses were performed in R.
Presence–absence validation
To evaluate whether SkelPy missed any true biological nodes, we performed presence–absence validation. Each image was divided into a 4 × 4 grid of equal‐sized spatial cells. We randomly sampled 30 cells across the dataset. For each sampled cell, a single user recorded (1) whether a true biological node was present and (2) whether SkelPy predicted a node within the same cell.
A true positive was recorded when a cell contained a true biological node and SkelPy correctly predicted it. A false positive occurred when no true biological node was present but SkelPy predicted a node. These results were used to calculate accuracy, sensitivity, specificity, precision, and F1 score to provide an overall estimate of SkelPy's ability to detect the presence or absence of hyphal nodes in fixed spatial regions. SkelPy achieved an accuracy of 86.2%, sensitivity of 90.5%, specificity of 75.0%, precision of 90.5%, and an F1 score of 0.905.
Trait‐level validation
Quantifying how rapidly a fungal network expands across a substrate provides an important measure of growth strategy and spatial occupation. As fungi can differ in the growth strategy they invest in, network expansion cannot be fully captured by hyphal length or branching metrics. The colonization rate serves as a measure that captures the overall progression of fungal coverage over time. To estimate colonization, we quantified the colonization rate using a modified gridline method (Stahlhut et al., 2021) and hyphal length (Newman, 1966). The modified gridline method involves superimposing 10 equidistantly spaced parallel lines across the image of the hyphal network and scoring each line that intersects a hyphae as a presence (1) and each line that does not intersect a hyphae as an absence (0). Colonization was calculated using the following formula:
To compare SkelPy‐derived traits with traditional measures of growth, we computed Pearson's correlation between (1) colonization rate and fractal dimension and (2) hyphal length density and the LinesInImage metric. Applying both manual methods to the skeletonized image, we found that hyphal length estimated via the Newman method (Newman, 1966) was strongly correlated with the LinesInImage metric (r = 0.99; Figure 4). The colonization rate derived using the gridline method was also strongly correlated with fractal dimension (r = 0.81; Figure 5). These results indicate that SkelPy‐derived traits successfully capture biologically meaningful variation in fungal network growth. Importantly, SkelPy metrics capture more variation than the gridline method. Because the gridline method saturates as soon as all 10 lines contain at least one intersection, the gridline method considers the image fully colonized and cannot detect further increases in network complexity (Figure 5).
Figure 4.

Scatterplot of LinesInImage versus hyphal length estimated according to Newman (1966). Hyphal length is strongly correlated with the LinesInImage metric (Pearson's r = 1.00). represents the slope of the fitted linear model, indicating proportional increase in LinesInImage with increasing hyphal length.
Figure 5.

Scatterplot of colonization rate (%) derived from the gridline method versus hyphal network fractal dimension. A fitted linear regression line summarizes the relationship using only images collected at or after timepoint 4 (tp . The colonization rate derived from the gridline method was also strongly correlated with fractal dimension (r = 0.81).
Using SkelPyR, we extracted the number of tips, edges, and branches for each strain, and we distinguished among isolates that demonstrated different growth strategies (P = 1.23 10−8). Summary statistics for these structural traits were computed across timepoints 5 to 10 in R using the dplyr package (Wickham et al., 2026) (Appendix S1).
The isolates KatieTomato, B05.10, and 1.04.25 displayed distinct network patterns that reflect their differences in virulence. KatieTomato formed the most expansive networks, with a maximum of 2041 active tips, 2553 edges, 755 branching events, a high network size (mean = 1353 edges), and the lowest variability (coefficient of variation [CV] = 0.58). Logistic growth modeling revealed that KatieTomato also exhibited the fastest growth rate (0.334; N unitless fractal dimension). These metrics are consistent with its highly aggressive infection strategy and with the formation of large lesions in hosts. Isolate B05.10 represented an intermediate response, with a maximum of 1271 tips, 1787 edges, 525 branching events, and a mean of ~573 edges. Its network size was also the most variable among the three isolates (CV = 0.92). Although B05.10 did not display aggressive proliferation, its fractal dimension growth rate was the slowest (0.147), suggesting that while the network expands consistently, it does not undergo the sharp acceleration seen in KatieTomato. Isolate 1.04.25, the slowest and least virulent of the studied isolates, had a maximum of 750 tips, 1061 edges, and 321 branching events; it also had the lowest mean network size (~395 edges). Its complexity increased at an intermediate rate (0.166), which is consistent with its phenotype, and its variability was intermediate (CV = 0.85). Together, these patterns reflect the differences in hyphal growth strategies across isolates and showcase SkelPy's ability to reconstruct, clean, and quantify hyphal networks accurately.
CONCLUSIONS
We provide an accessible, user‐friendly Python interface that extracts meaningful data from hyphal network images for studying variation in fungal morphology. This interface allows users to customize skeletonization parameters to maximize the detection of the hyphal network. SkelPy handles large image datasets and is a powerful method for analyzing hyphal growth. The export of hyphal network coordinates enables the extraction of additional traits using network theory, such as edges, nodes, and tips, which have been previously extracted by other hyphal network extraction programs (Vidal‐Diez de Ulzurrun et al., 2015; Aguilar‐Trigueros et al., 2022). This interface saves users time, as a complex network image requires approximately two hours to generate. When scaled to datasets of thousands of images, the time savings become substantial. Although ImageJ is widely used for segmentation, isolating thin or low‐contrast hyphae usually requires manual thresholding and repeated segmentation attempts. Extending ImageJ functionality also typically requires Java scripting, which limits accessibility for users without programming experience. SkelPy removes these barriers and streamlines these processes, making large‐scale analyses feasible, giving researchers more room to focus on the biological interpretation rather than manual image processing.
To support downstream analyses, we developed a companion R package, SkelPyR, that reconstructs hyphal coordinates into clean spatial graph objects and removes artifacts introduced through skeletonization. The SkelPyR R package integrates with tidygraph and allows users to quantify a wide range of higher‐order network properties. Through tidygraph's interface, users can measure connectivity, motif structure, graph diameter and radius, and other descriptors of network organization. This compatibility enables the characterization of hyphal architecture in terms of network robustness, spatial efficiency, branching strategy, and emergent structural patterns, thereby linking morphology directly to ecological or evolutionary hypotheses.
Beyond fungal biology, SkelPy has broader applicability across biological systems that produce branching or filamentous structures. With minor adjustments to preprocessing steps or segmentation thresholds, SkelPy could be adapted toward root phenotyping of seedlings to assess fitness‐related traits such as root system architecture, exploratory growth, or branching intensity. SkelPy is able to distinguish among isolates of B. cinerea with varying levels of virulence and genetic diversity by linking quantitative network traits such as tips, branching events, and fractal growth rates to known pathogenetic strategies. This highlights SkelPy's ability to link structural traits to biological outcomes, providing a foundation for subsequent modeling approaches.
Network topology constrains network function, and network function, in turn, modifies network topology (Fortin et al., 2021); therefore, insights into topology may provide insight into novel physiological interactions and underlying genetics. The use of the extracted traits that explain network topology (Table 3) can be extended to exponential family random graph models (ERGMs), which describe the selection forces that shape the global structure of a network (Hunter et al., 2008). These models could be used to describe structure and pattern, as well as the selection process that guides hyphal architecture in response to different environmental changes. ERGM models have been applied to Escherichia coli to identify operons encoding transcription factors that regulate the second operon (Saul and Filkov, 2007). A similar approach could be used with the hyphal network to identify whether any growth patterns are associated with the tested environments. For example, using the graphed skeletons, we could fit an ERGM model to identify motifs that hint at the growth strategies employed by isolates, based on the overall connectivity of edges. Models could then be compared across treatments to test whether exposure to other compounds alters hyphal architecture toward more exploratory or invasive phenotypes.
Table 3.
Trait descriptions and biological interpretations of image‐derived hyphal network traits.
| Trait extracted | Description | Biological description |
|---|---|---|
| Fractal dimension | Slope of white pixels present in boxes | Complexity of the hyphal network and how much space it occupies |
| Lines in image | Number of polyline segments in the image | Represents individual hyphal segments present in the image |
| Clusters in image | Number of groups of connected lines in the image | Group of connected hyphal segments; reflects local networks |
| Lines in clusters | Number of lines in each group of connected lines | Number of hyphal segments that make up each cluster, indicating network density within clusters |
| Average line length per cluster | Averages the line segment length for each group of connected lines | Average hyphal segment length of hyphae in cluster |
| Sinuosity | Ratio of curved path length to straight line distance for each hyphal segment | Represents if hyphal segment grows continuously or meanders; greater sinuosity suggests exploratory or searching behavior |
| Center line width | Gives the width of a cross section connecting to the tips | Proxy for transport efficacy of hyphae. Narrow hyphae support low‐cost exploratory growth with minimal pressure requirements; wider hyphae transport more but require more energy. |
ERGMs have been used to assess foraging patterns in many organisms, such as songbirds (Lalla et al., 2022), where insights reveal species‐specific differences in foraging capacity, range size, and complexity. A similar approach could be used with hyphal networks collected across a range of genetically distinct isolates/species to determine whether growth patterns across varying experimental conditions are associated with inter‐ and intraspecific variation. For example, using the graphed skeletons, we could fit an ERGM to identify motifs indicative of isolates' growth strategies, based on edge connectivity. Models could be compared across treatments to test whether exposure to other compounds alters hyphal architecture toward more exploratory or invasive phenotypes, and how variation in network response corresponds to genetic variation.
Additionally, the skeletonization function in SkelPy can be customized for diverse experimental designs, allowing users to add or remove skeletonization pipelines as needed. For example, if a fluorescent stain were used in the image, a custom pipeline could be implemented to isolate stained regions before skeletonization to extract structures of interest. SkelPy's modular design makes this process straightforward, enabling researchers with limited experience in image analysis to easily isolate target components for downstream structural analysis. SkelPy also offers opportunities to extend hyphal network analysis into three‐dimensional space. While the current workflow focuses on two‐dimensional projections, it lays the groundwork for incorporating Z‐stack imaging or optical sectioning to reconstruct accurate three‐dimensional images. By enabling users to customize inputs and tailor the frameworks being modeled, SkelPy provides an accessible platform for adapting network‐based approaches to a wide range of biological imaging applications.
AUTHOR CONTRIBUTIONS
M.M. and J.A.D. designed the study; M.M. and J.C.M. collected the data; A.J.M. and M.M. developed SkelPy and its extensions; M.M., J.C.M., and J.A.D. analyzed the data; and M.M. and J.A.D. wrote the manuscript with input from A.J.M. and J.C.M. All authors approved the final version of the manuscript.
CONFLICT OF INTEREST STATEMENT
Jordan A. Dowell is an associate editor of Applications in Plant Sciences, but took no part in the peer review and decision‐making processes for this paper.
Supporting information
Appendix S1. Summary statistics of hyphal network traits extracted using SkelPy across Botrytis cinerea isolates.
ACKNOWLEDGMENTS
J.A.D., M.M., and J.C.M. were funded in part by a U.S. Department of Agriculture grant (2022‐67012‐43019). The Future Scholar fellowship at Louisiana State University funded M.M. This work was further supported by startup funds allocated to J.A.D. by Louisiana State University.
DATA AVAILABILITY STATEMENT
The SkelPy source code and example images used to demonstrate the pipeline are available at https://github.com/AaronMoseley/SkelPy.git. Code for downstream analyses in R, including data preparation and trait extraction, is available at https://github.com/melaniemadrigal07/Post.ImageProcessing.
REFERENCES
- Aguilar‐Trigueros, C. A. , Boddy L., Rillig M. C., and Fricker M. D.. 2022. Network traits predict ecological strategies in fungi. ISME Communications 2: e2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Atwell, S. , Corwin J. A., Soltis N., Zhang W., Copeland D., Feusier J., Eshbaugh R., and Kliebenstein D. J.. 2018. Resequencing and association mapping of the generalist pathogen Botrytis cinerea . biorXiv 489799 [preprint]. Available at 10.1101/489799 [posted 7 December 2018; accessed 4 March 2026]. [DOI]
- Canny, J. 1986. A computational approach to edge detection. IEEE Transactions on Pattern Analysis and Machine Intelligence PAMI‐8: 679–698. [PubMed] [Google Scholar]
- Caseys, C. , Shi G., Soltis N., Gwinner R., Corwin J., Atwell S., and Kliebenstein D. J.. 2021. Quantitative interactions: The disease outcome of Botrytis cinerea across the plant kingdom. G3: Genes|Genomes|Genetics 11: jkab175. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Fortin, M.‐J. , Dale M. R. T., and Brimacombe C.. 2021. Network ecology in dynamic landscapes. Proceedings of the Royal Society B: Biological Sciences 288: e20201889. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hunter, D. R. , Handcock M. S., Butts C. T., Goodreau S. M., and Morris M.. 2008. ergm: A package to fit, simulate and diagnose exponential‐family models for networks. Journal of Statistical Software 24: nihpa54860. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lalla, K. M. , Fraser K. C., Frei B., Fischer J. D., Siegrist J., Ray J. D., Cohn‐Haft M., and Elliott K. H.. 2022. Central‐place foraging poses variable constraints year‐round in a neotropical migrant. Movement Ecology 10: 39. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Marsh, B. A. 1971. Measurement of length in random arrangements of lines. Journal of Applied Ecology 8: 265–267. [Google Scholar]
- Moore, O. , Jessurun N., Chase M., Nemitz N., and Campagnola L.. 2023. PyQtGraph: High performance visualization for all platforms. SciPy 2023: 10.25080/gerudo-f2bc6f59-00e [DOI] [Google Scholar]
- Newman, E. I. 1966. A method of estimating the total length of root in a sample. Journal of Applied Ecology 3: 139–145. [Google Scholar]
- Ordóñez‐Valencia, C. , Ferrera‐Cerrato R., Quintanar‐Zúñiga R. E., Flores‐Ortiz C. M., Guzmán G. J. M., Alarcón A., Larsen J., and García‐Barradas O.. 2015. Morphological development of sclerotia by Sclerotinia sclerotiorum: A view from light and scanning electron microscopy. Annals of Microbiology 65: 765–770. [Google Scholar]
- Pebesma, E. 2018. Simple features for R: Standardized support for spatial vector data. The R Journal 10: 439–446. [Google Scholar]
- Pedersen, T. L. 2024. tidygraph: A Tidy API for graph manipulation. R package version 1.3.1.9000. Website https://github.com/thomasp85/tidygraph [accessed 4 March 2026].
- R Core Team . 2025. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. Website http://www.R-project.org/ [accessed 4 March 2026]. [Google Scholar]
- Saul, Z. M. , and Filkov V.. 2007. Exploring biological network structure using exponential random graph models. Bioinformatics 23: 2604–2611. [DOI] [PubMed] [Google Scholar]
- Schneider, C. A. , Rasband W. S., and Eliceiri K. W.. 2012. NIH Image to ImageJ: 25 years of image analysis. Nature Methods 9(7): 671–675. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Stahlhut, K. N. , Dowell J. A., Temme A. A., Burke J. M., Goolsby E. W., and Mason C. M.. 2021. Genetic control of arbuscular mycorrhizal colonization by Rhizophagus intraradices in Helianthus annuus (L.). Mycorrhiza 31: 723–734. [DOI] [PubMed] [Google Scholar]
- van der Meer, L. , Abad L., Gilardi A., and Lovelace R.. 2024. sfnetworks: Tidy geospatial networks. Website https://github.com/luukvdmeer/sfnetworks [accessed 4 March 2026].
- van der Walt, S. , Schönberger J. L., Nunez‐Iglesias J., Boulogne F., Warner J. D., Yager N., Gouillart E., and Yu T.. 2014. scikit‐image: Image processing in Python. PeerJ 2: e453. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vidal‐Diez de Ulzurrun, G. , Baetens J. M., Van Den Bulcke J., Lopez‐Molina C., De Windt I., and De Baets B.. 2015. Automated image‐based analysis of spatio‐temporal fungal dynamics. Fungal Genetics and Biology 84: 12–25. [DOI] [PubMed] [Google Scholar]
- Virtanen, P. , Gommers R., Oliphant T. E., Haberland M., Reddy T., Cournapeau D., Burovski E., et al. 2020. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nature Methods 17: 261–272. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Waltz, F. M. , and Miller J. W. V.. 1998. An efficient algorithm for Gaussian blur using finite‐state machines. Proceedings of Machine Vision Systems for Inspection and Metrology VII 3521: 10.1117/12.326976 [DOI] [Google Scholar]
- Wickham, H. , Averick M., Bryan J., Chang W., D'Agostino McGowan L., François R., Grolemund G., et al. 2019. Welcome to the Tidyverse. Journal of Open Source Software 4: e1686. [Google Scholar]
- Wickham, H. , François R., Henry L., Müller K., and Vaughan D.. 2026. dplyr: A grammar of data manipulation. R package version 1.2.0. Website https://dplyr.tidyverse.org/ [accessed 4 March 2026].
- Zhang, T. Y. , and Suen C. Y.. 1984. A fast parallel algorithm for thinning digital patterns. Communications of the ACM 27: 236–239. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Appendix S1. Summary statistics of hyphal network traits extracted using SkelPy across Botrytis cinerea isolates.
Data Availability Statement
The SkelPy source code and example images used to demonstrate the pipeline are available at https://github.com/AaronMoseley/SkelPy.git. Code for downstream analyses in R, including data preparation and trait extraction, is available at https://github.com/melaniemadrigal07/Post.ImageProcessing.
