Rhythmidia: A modern tool for circadian period analysis of filamentous fungi

Circadian rhythms are ubiquitous across the kingdoms of life and serve important roles in regulating physiology and behavior at many levels. These rhythms occur in ~24-hour cycles and are driven by a core molecular oscillator. Circadian timekeeping enables organisms to anticipate daily changes by timing their growth and internal processes. Neurospora crassa is a model organism with a long history in circadian biology, having conserved eukaryotic clock properties and observable circadian phenotypes. A core approach for measuring circadian function in Neurospora is to follow daily oscillations in the direction of growth and spore formation along a thin glass tube (race tube). While leveraging robust phenotypic readouts is useful, interpreting the outputs of large-scale race tube experiments by hand can be time-consuming and prone to human error. To provide the field with an efficient tool for analyzing race tubes, we present Rhythmidia, a graphical user interface (GUI) tool written in Python for calculating circadian periods and growth rates of Neurospora. Rhythmidia is open source, has been benchmarked against the current state-of-the-art, and is easily accessible on GitHub.


Introduction
From unicellular bacteria to multicellular eukaryotes, circadian rhythms are important regulators of organismal processes across the tree of life [1][2][3].Circadian rhythms are biological processes that occur in a ~24-hour oscillation.These rhythms allow organisms to accurately keep time and anticipate, rather than react to, daily environmental changes.This anticipatory behavior and physiological coordination can facilitate biological processes like growth, metabolism, and sleep at appropriate times of day [1,4].In fungi, circadian rhythms time processes like spore development and release, allowing organisms to compensate against rhythmic damaging environmental effects [5].For example, it may be advantageous to release thinnerwalled, less UV-resistant spores at night for their protection, while more hydrophobic spores might be released during the drier daytime [5].In the filamentous fungi Neurospora crassa, asexual spore production, termed conidiation, occurs predawn during high humidity and low temperatures, which are ideal conditions for spore dispersal [6].
Neurospora is a longstanding model organism for studying circadian biology, genetics, and cell biology due to its rich history and tractability for study.The Neurospora research community employs a plethora of well-established molecular biology and biochemical tools for investigation, including a fully sequenced genome and complete knock-out collection [7][8][9][10][11].Eukaryotic circadian clock properties are also strongly conserved in Neurospora at both the micro-and macroscopic levels [11][12][13].Using Neurospora, researchers first identified the central tenet of eukaryotic timekeeping, the negative feedback loop, which was subsequently identified as the primary timekeeping mechanism in animals [11,14].Furthermore, the nature of light and temperature entrainment of the clock and the mechanism of clock output through control of gene expression was first studied and conceptualized in Neurospora [11,15,16].
Circadian rhythms are subject to entrainment, the process by which an organism's biological clock is synchronized with external environmental cues such as light, temperature, or nutrients to align to the proper phase of the oscillating stimuli [1,17].However, without entrainment cues, an organism's internal circadian oscillator will continue to cycle under constant conditions (e.g.continuous darkness).In constant conditions, the length of the endogenously generated period by the central oscillator is known as the "free-running" period, which for Neurospora is about 22.5 hrs [18].With this in mind, if the circadian period could be accurately and reliably measured, one could decode the molecular basis for clock function by assessing how genetic or environmental changes alter the free-running period when Neurospora is grown in continuous darkness.
To better understand the mechanics of the circadian oscillator and its regulation of physiology, it is essential to measure and observe circadian phenotypes.One aspect of Neurospora growth that is under control of the circadian clock is spore production.Specifically, the clock times the production of conidia, asexual spores.Conidiation is achieved when vegetative mycelia differentiate into aerial hyphae that produce macroconidia (Fig 1a) [10,19].A standard tool to examine Neurospora phenotypic rhythms of conidiation is the race tube assay (Fig 1a).The assay involves using race tubes, which are ~40 cm long glass tubes bent upward at the ends and filled with a layer of agar growth media (Fig 1a).Neurospora conidia are inoculated at one end of the race tube (Fig 1a).After inoculation, race tubes are typically grown in constant light (LL) for ~24 hours to allow for germination of the conidia and light-induced expression of circadian clock elements [20].Next, the tubes are transferred to constant darkness (DD) to synchronize the rhythms.The absence of light allows for growth under constant conditions and calculation of the free-running circadian period of the strain.Every day, the growth front is marked on each tube to provide a temporal reference frame for analysis.After circadian culturing is complete, the tubes are then photographed from the bottom using a flatbed scanner or similar instrument to capture and convert growth into digital information (Fig 1b).
The daily marking of the tubes establishes a linear relationship between time and distance within the race tube, assuming a sufficiently constant growth rate throughout the experiment (Fig 1a).By measuring the distances between sites of conidial banding, it is possible to calculate the average circadian period of a strain.Implementing this manual method of period calculation from race tubes has several drawbacks: performing dozens of measurements and calculations by hand for multiple packs of six tubes per experiment is time-consuming and prone to human errors.Moreover, it is important to note that the growth rate is not completely linear [21,22].Non-linearity of the growth rate can lead to both over-and under-estimation of the period depending on the strain and the point of reference for calculation [22].
Additionally, manual measurements can yield inconsistencies in determining at what point in a conidial band to conduct the measurements.Furthermore, areas of increased conidiation are broad, and the exact locations of peaks of conidial density are only sometimes apparent to the human eye.While digitization and computational solutions mitigate many of these complications, no recent advances have been made since 2008 [23].The first image analysis software for race tube analysis, Chrono II, was developed in Pascal starting in 1990, by Roenneberg and Taylor [23].This software's successor, ChronOSX, is the current standard and state-of-the-art for analysis of race tube experiment images.
While ChronOSX has been the workhorse for race tube analysis since its initial release in 2000, it has some limitations.First, ChronOSX is closed-source software, impeding customization and contributions from the broader Neurospora community should additional functionality be desired.Second, ChronOSX is not freely available online.Third, ChronOSX only runs on older Macintosh operating systems.The most recent operating system ChronOSX will function on is macOS Sierra, originally released in 2016.Finally, ChronOSX has not been updated since 2008, despite major advances in computational image processing since that time.Considering these factors, we feel the field is overdue for advancement.
Here, we introduce Rhythmidia, a graphical user interface (GUI) for Python version 3.11 and above, which facilitates the calculation of circadian periods from race tube assays.Rhythmidia guides the user through programmatic upload and orientation of scanned race tube images and user-mediated algorithmic identification of individual race tubes, time marks, and A schematic of a race tube assay.Race tubes are filled with ~15mL of agar medium and inoculated with conidia at one end.The tubes are then incubated in constant light (LL) for 24 hrs, followed by a transition to constant darkness (DD).The Neurospora continues to grow with the clock controlling development and morphology at the growth front.For a specific portion of the relative circadian day, the mycelia differentiate into aerial hyphae and produce asexual spores (conidia, orange meshwork, referred to as banding).The peak-to-peak distance of conidial banding corresponds to one relative circadian cycle (highlighted in blue, ~22.5 hrs) and the free-running period of the strain.To establish a relationship between growth and time, it is necessary to mark the tubes once every ~24 hrs (vertical gray lines) at the growth front.Time marks serve as representative time frames for circadian period calculation.Adapted from Kramer 2007 [61] b.High-level workflow of race tube assays.Neurospora is grown as described above in packs of six race tubes over approximately a week.Once growth reaches the ends of the tubes, packs are scanned from the bottom using a high-resolution flatbed document scanner.From this point, race tube images can be cropped or otherwise preprocessed before being uploaded to Rhythmidia for programmatic analysis.The scanner and laptop images were adapted from Pixabay content.https://doi.org/10.1371/journal.pcbi.1012167.g001conidial banding present in the image.Furthermore, Rhythmidia allows users to save and revisit analysis data and perform four different methods of calculating circadian periods from analyzed images.Rhythmidia can be installed and run as a freely available Python package, with the code and documentation hosted on GitHub.Running in Python means that Rhythmidia will continue functioning on any modern computer running a compatible version, requiring minimal time and effort to install and run.

Design and implementation
Rhythmidia is a GUI-based Python package for analyzing circadian periods and growth rates in Neurospora race tube assays.Given the user base Rhythmidia is aimed at and the visual process of race tube image analysis, a GUI-based implementation is essential.The general experimental and analytical workflow starts with inoculating and growing one or multiple packs of six race tubes (Fig 1b).After culturing, these packs are scanned to generate race tube images.These images are then uploaded to the Rhythmidia user interface (Fig 2a), and the software facilitates user-mediated identification of image features before saving and analyzing the data.Users can view data for each uploaded race tube image in an experiment file, including the periods calculated by four different methods.Furthermore, Rhythmidia performs basic statistical analysis of any combination of saved data on a by-pack or by-tube basis.The experimental data tab also allows users to visualize densitometry and periodogram plots and export any experimental or analytical data (Figs 2b and 3).
Rhythmidia accepts images in various image formats (S1 Table ), and can analyze images asis in terms of color and contrast.Once imported, all images are automatically internally converted to greyscale and resized to 1160x400 pixels upon upload using bicubic interpolation rescaling (S1b Fig) .In a greyscale image format, each pixel of an image is designated a single number between 0 and 255, conveying the color, or "brightness," of the pixel numerically from black (0) to white (255).Handling images in such a format allows Rhythmidia to normalize the colors of different race tube images to a single data dimension per pixel.An image size of 1160x400 pixels reflects the aspect ratio typical to the straight portion of a pack of six race tubes, and any stretching that may occur in a particular image does not impact downstream calculations more than the error of the measurement (S2 Fig) .Furthermore, 1160x400 pixels is the maximum optimal size for GUI display on modern 13-inch screens and larger within the context of the Rhythmidia analysis interface.

Canny edge detection and probabilistic Hough transforms for tube boundary identification
After the image is successfully uploaded, resized, and converted to greyscale, Rhythmidia begins image feature detection (S1a-S1e Fig) .The first algorithm Rhythmidia uses to identify image features involves the detection of Canny edges in uploaded images.Canny edge detection is a computer vision algorithm for identifying edges within images [24].The algorithm relies on a Gaussian filter to smooth out noise in an image before identifying the intensity gradient of the image.Thresholds are then applied to the magnitudes of the gradient to identify edges in the image.Using edges identified by Canny or similar algorithms, a progressive probabilistic Hough transform can be used to identify straight lines of a minimum length in an image [25].
In the case of Rhythmidia, this minimum length threshold is set such that any sufficiently long lines would have to correspond to boundaries between race tubes.In order to identify the likely margins demarcating the boundaries between individual race tubes in uploaded images, Rhythmidia first uses the scikit-image package's module for Canny edge detection [26], with Rhythmidia image analysis interface of the home tab with programmatically identified features of a race tube image highlighting tube boundary demarcations (green), time marks (red), and conidial banding peaks (blue) overlaid on an uploaded image.An entry field for tube mark times is located to the left of the image (grey), and preliminary linear regression periods are displayed below the image (image analysis info, purple).The top of the screen holds "tabs" for switching between the image analysis (home tab) and the experimental data analysis interfaces.b.Rhythmidia experiment and data analysis interface, displaying data from a single six-pack of race tubes.Includes per-tube calculated periods and growth rate, options for statistical analysis of multiple tubes' and packs' periods, and options for plotting densitometry and period analysis data of individual tubes, all by multiple period analysis methods.The interface also includes options to export plots, data, and statistical analysis output.
https://doi.org/10.1371/journal.pcbi.1012167.g002low and high thresholds set to 1 and 25, respectively.Rhythmidia then performs a progressive probabilistic Hough transform of these edges using the scikit-image implementation to identify a likely set of sufficiently long horizontal lines of sufficiently low slope present in the image (S1c Fig).

Vertical densitometry for tube boundary demarcation
Depending on the image, noise from scan quality or growth of the organism may cause the Canny edge method of horizontal line detection to be insufficient.To circumvent this issue, Rhythmidia employs a second method to improve edge detection involving vertical density profiles of the image (S1d  Edge detection using Canny edges and the Hough transform to identify lines separating race tubes in the image is effective in cases where areas of low conidial density in images are distinct from the image's background.Rhythmidia uses the vertical density profile model to identify horizontal lines for cases where this distinction is unclear.In every case, the software performs both the Canny edges method and the vertical density method of horizontal line detection and selects the larger set of acceptable lines to present.This gives the highest chance of correctly identifying the actual boundaries between race tubes present in the image.These lines demarcating the boundaries between individual race tubes are extended to the image's width and subject to user review (Fig 2a, green lines).

Noise filtering and feature detection via densitometry
Before Rhythmidia can perform circadian analysis, it must identify and discriminate between both time marks and conidial banding patterns in the race tube images (Figs 1a and 2a).Rhythmidia achieves this by creating a two-dimensional densitometry plot of the brightness of each identified race tube, referred to as the raw densitometry plot (S3a and S3b Fig) .Rhythmidia then performs a filtering process on these densitometry data to more efficiently identify features within each race tube to reduce noise (S3a and S3b Fig) .Rhythmidia employs the SciPy Savitzky-Golay filter to successively fit polynomial functions to the raw densitometry data of each tube using the linear least squares method [27].To improve the capacity for conidial band identification, a fourth-order polynomial is used to smooth the raw densitometry data (S3a Fig) [27,28].Next, to help identify time pen marks in the raw densitometry plot, Rhythmidia uses the Savitzky-Golay filter with a window size of 30 pixels by fitting an eighthorder polynomial (S3b Fig) .In each case, the lowest possible order polynomial is applied to preserve the characteristics of peaks in the densitometry plot.
After smoothing the noise, Rhythmidia determines the time marks in each race tube in the image by identifying extreme local minima in the densitometry plot, corresponding with the dark lines created by the pen marks used to keep experimental time (S4a Fig) .Time mark minima are broadly identified by the SciPy peak finding algorithm using two criteria.The first criterion for selection is whether the minimum is of sufficient prominence from the base of the peak, and the second is if the minimum has a minimally steep flanking slope; if these two criteria are met, the respective location is selected as a likely time mark (S4a Fig, black arrows) [27].The time marks manifest as technical artifacts that appear in the densitometry plot as extreme local minima.Time mark artifacts are problematic as they would be interpreted as low levels of conidial density; thus, correcting for these extreme local minima before performing period calculations is essential.
Rhythmidia corrects for time mark artifacts by modifying the densitometry plot by excluding the identified pen marks from the data by interpolating density near these pen marks' positions (S4a Fig) .The interpolation is accomplished by generating data between the density values flanking the excluded regions.Simply stated, it connects the "minima gap" in the data, an artifact of the time mark, with a straight line between the data points on either side of this gap (S4a Fig) .Next, Rhythmidia identifies likely positions of conidial banding within each race tube by using the filtered and interpolated densitometry data to identify local maxima with sufficient width and prominence.These maxima are likely locations of maximal conidial banding (S4b Fig, blue arrows).Any falsely identified time marks or improper identification of conidial peaks can be immediately rectified by the subsequent user-mediated quality control step, in which users can simply click to add or remove presumptive time marks before any calculations occur (Fig 2a, red and blue lines).The interpolated densitometry data is used to identify conidial banding sites and for densitometry analysis for circadian period calculation.

Circadian period analysis
Once race tube boundaries, time marks, and conidial band peaks are identified within the uploaded image, information is saved to a file (termed the experiment file) for each race tube identified in the image.This includes a user-specified name for the pack of tubes in the image, the identification number of the tube in the image (numerically from the top down), the name of the original image file, and the greyscale version of the original image.It also includes tubespecific information: the y boundaries of the tube within the image, the x positions of the pen marks and conidial banding sites within the tube and corresponding times, the calculated mean growth rate of the tube, and the raw densitometry data of the tube.
The data from the analyzed image are then used to calculate the circadian periods of the strains in each tube and pack.The associated statistics are displayed in the "Experiments" tab (Fig 2b).Rhythmidia employs four different methods for circadian rhythm analysis: linear regression period calculation, the Sokolove-Bushell periodogram, the Lomb-Scargle periodogram, and the continuous wavelet transform [29][30][31][32][33][34][35][36].A pair of dropdown selection menus in the experiment interface allows users to perform these analyses on a region of the experiment between any two marked time points.
Linear regression period calculations.The linear regression method of calculating circadian periods involves multiplying the distance between conidial banding sites by the inverse of the growth rate per hour for the given tube.These values are calculated by measuring the distances between pen marks and dividing these distances by the differences between the corresponding times of marking during the race tube experiment (Fig 1a).Rhythmidia achieves this by calculating a mean rate of growth in pixels per hour using the positions of time marks within a tube and user-provided time data and a mean distance in pixels between conidial banding sites within the same tube.
Sokolove-Bushell periodogram calculation.In addition to linear regression period calculations, Rhythmidia uses the Sokolove-Bushell periodogram to calculate circadian periods of race tube images.The Sokolove-Bushell periodogram is a valuable tool for investigating circadian rhythms within biological systems.The method, rooted in statistical principles, involves the application of the chi-square statistic to assess periodicities in time-series data, which adapts the chi-square test for non-uniformly sampled data and is particularly well-suited for studying biological phenomena characterized by irregular temporal sampling [30,37,38].Since its introduction in 1978, the Sokolove-Bushell periodogram has been widely used in circadian rhythm analysis and cited in over 1,000 publications, including in human, mammalian, ichthyic, bacterial, and fungal systems [23,[39][40][41].The approach involves binning the data into time intervals and calculating the chi-square statistic for each frequency, thus providing a robust measure of rhythmicity [30,37].This method enables researchers to identify and quantify circadian patterns in biological processes, contributing to a nuanced understanding of temporal organization.The Sokolove-Bushell chi-squared periodogram for a given period p is equal to Q p ; where � X h is the mean of a set K values of length P under each time unit of the length of period p, and � X is the mean of all N values of the data set over the time series [30].
In order to calculate circadian periods using the Sokolove-Bushell periodogram, Rhythmidia uses the corresponding function provided by the SciPy package for Python to generate a periodogram based on the densitometry data of a given race tube [27].Rhythmidia then converts the output, provided in frequencies, to periods in pixels and then to hours using the mean conversion rate of pixels to hours calculated from the pen mark locations in the given race tube image and the user-provided time data.This periodogram then contains the power spectrum of each potential period of the densitometry data, with a peak corresponding to the period of best fit (Fig 3b).
Lomb-Scargle periodogram calculation.The Lomb-Scargle periodogram, rooted in the foundational works of Lomb (1976) and Scargle (1982), is an invaluable analytical tool in biology for unraveling temporal patterns within unevenly sampled time-series data, overcoming limitations associated with traditional Fourier-based techniques [31].This method involves fitting sinusoidal functions at different frequencies to the observed data.By employing a leastsquares optimization process, the periodogram quantifies the strength of periodic components across various frequencies, enabling the identification of rhythmic patterns in biological processes [31,32].In brief, for a time course of N t measurements X j at t j , shifted so the mean is 0, the Lomb-Scargle periodogram at frequency f is equal to P n (f); S j X j cos oðt j À tÞ where ω � 2πf [31,32,42].
In order to calculate circadian periods using the Lomb-Scargle periodogram, Rhythmidia uses the corresponding function provided by SciPy to generate a periodogram based on the interpolated densitometry data of a given race tube [27].Rhythmidia then converts the output to periods in pixels from the original image.These can then be converted from pixels to hours using the pen mark locations in the given race tube image and the user-provided time data.This periodogram then contains the power spectrum of each potential period of the densitometry data, with a peak corresponding to the period of best fit (Fig 3c).
Wavelet analysis.The final period analysis method Rhythmidia employs is the continuous wavelet transform.The linear regression method and Fourier-based periodograms operate under the assumption of a single period throughout a time series and can thus miscalculate a single period for a series with a changing period or identify a series as aperiodic [43].The continuous wavelet transform (CWT), on the other hand, computes a convolution of a time series that correlates each data point with a chosen wavelet function to determine the period at each point in time [33,35].Wavelet functions can be stretched and translated to deconvolve even transient, high-frequency periodic signals [44,45].Moreover, the continuous wavelet transform has a history of being used to identify changing or transient periods in circadian data [43,46,47].
Rhythmidia uses the PyWavelets package for Python developed by Lee et al. to apply the continuous wavelet transform to smoothed and interpolated race tube densitometry data and calculate periods over the time series in uploaded images [48].PyWavelets takes in time series data and outputs a three-dimensional matrix for which the axes are time, frequency, and the amplitude of the wavelet transform.Rhythmidia takes this output and converts the frequency values to periods in hours, enabling the creation of a heatmap and the identification of the period of maximal amplitude and, thus, best fit at each time point of the experiment (Fig 3d).In order to do this, Rhythmidia identifies maximal amplitudes for each time point and accepts any greater than 75% of the maximum amplitude of the plot.The period for the tube is calculated as the mean of all accepted maximal amplitudes, and the continuous wavelet transform slope is calculated from the line of best-fit passing through all accepted maximal amplitudes.

Statistical analysis of calculated periods
Rhythmidia provides the user with an interface to perform statistical analysis of a subset of any periods calculated by any of the four listed methods for any race tubes saved to the same experiment file (Fig 2b).For any subset of periods selected, the mean, standard deviation, and standard error are computed using NumPy's corresponding modules [49].

Growth rate calculation from image features
Analysis of fungal growth rate is a phenotypic screening method that connects to several biological processes, including the circadian clock.Tracking fungal growth rates using the glass tube method has been implemented since 1925 and popularized in Neurospora research by Beadle and Tatum in the 1940s [50,51].It was one of the critical techniques that led them to their one gene-one enzyme hypothesis, garnering Beadle and Tatum the Nobel Prize in Physiology in 1958 [52,53].
Rhythmidia can calculate growth rates via the user-provided measurement between the first and last time marks in a race tube, establishing a relationship between real distance and pixels.It uses the measured distance between the race tube's initial and final time marks to establish a relationship between millimeters and pixels.Then, the mean growth rate of each tube is calculated using the elapsed times and distances between time marks.This involves the same linear regression method used for period calculation, resulting in race tube growth rates in millimeters per hour.Although not required, if the user inputs the measurement in the home tab, the calculated growth rate will appear in the experiment tab in the field that lists entries, packs, tubes, etc.If no measurement is provided, the experiment tab will read not applicable ("N/A") for the growth rate column.

Evaluating Rhythmidia performance
To evaluate Rhythmidia in its methods of circadian period calculation, we benchmarked against the only comparable analysis tool available, ChronOSX [23].To benchmark and compare Rhythmidia and ChronOSX, we analyzed the periods of six race tubes using the two overlapping methods present in both programs (linear regression (LR) and Sokolove-Bushell (SB) periodograms (Fig 4a).We grew a six-pack of a strain with the genotype: ras-1 band , mat A, a classical banding control, and analyzed the same race tube image with Rhythmidia and Chron-OSX [21].We found agreement in the mean calculated periods for Rhythmidia and Chron-OSX of calculated periods between 22.2 and 22.7 hours, respectively (Fig 4b).

Rhythmidia can handle longer data collection windows
ChronOSX can only analyze a maximum of seven days of data from race tubes.Depending on the growth rate of the strain and the precise length of the race tube, an experiment can yield 10-12 days of data or more; therefore, some data is subsequently excluded from ChronOSX analysis.To circumvent this issue, we built Rhythmidia with no limit to the number of possible days of analysis.To test the practical experimental limits of the Rhythmidia analysis window, we employed a strategy to slow the growth rate while preserving circadian function and capturing more bands and days of data.
Sorbose slows and restricts Neurospora growth [54][55][56].Sorbose-containing media has been extensively used to restrict or slow the growth of Neurospora in various applications.It is most commonly used during electroporation for the genetic transformation of Neurospora and is referred to as Fructose-Glucose-Sorbose (FGS) or Sorbose-Fructose-Glucose media.The F:G:S ratio is typically 40:1:1, and is typically used at 0.1M sorbose for growth restriction to the colony size.To increase the number of banding days by slowing the rate of growth, we replaced the sugar content of our race tube media with FGS.We prepared race tube media containing FGS at 5.55 mM and inoculated with strain 328-4.This concentration yielded 9 days of banding, and using Rhythmidia's extended data calculation capacity yielded a period of 22.95 hrs (Fig 4a).

Discussion and conclusion
While banding race tube experiments have been conducted since William Brandt first published the presence of the Neurospora banding phenotype in 1953, circadian period calculation came later with the work of Pittendrigh and colleagues in 1959 [18,57].Modern analysis of circadian rhythms in Neurospora with race tube assays calls for an accurate, efficient, and repeatable approach for large-scale experiments.Current technological and experimental standards can leverage powerful computing and image analysis techniques to build upon decades of proven analyses.Furthermore, software that is easy to use for all computational skill levels while accurately employing field-standard analytical methods for circadian data is critically missing in the field.Therefore, we sought to equip the research community with the ability to perform efficient, accurate analysis of race tube assays with an accessible open-source option: Rhythmidia.
We developed Rhythmidia to improve the current state of the art in all of these regards, and did so with accessibility in mind.Rhythmidia has an easy-to-navigate user interface (Fig 2 ), allowing users to re-open files containing previous experimental data and analysis ex post facto.Rhythmidia also accommodates color accessibility, allowing users to select colors for image analysis and data plotting by hex code or color wheel.Moreover, Rhythmidia is more efficient than the current state of the art in allowing for efficient data export and plotting, enabling users to collate with their preferences (Fig 3).The benchmarks we applied to Rhythmidia demonstrated periods consistent with field literature for classical banding control strains, with results and errors comparable to the existing state-of-the-art, ChronOSX (Fig 4a) [18,58,59].Furthermore, we developed Rhythmidia to analyze larger sets of data and tested this ability using growth-restricting reagent FGS (Fig 4).

Availability and future directions
Rhythmidia is an open-source Python package.Its fully accessible and installable code is available on GitHub at https://github.com/Pelham-Lab/rhythmidia,complete with clear documentation and installation instructions.Installation instructions and a tutorial can be found in the S1 Text.Rhythmidia is free to use under the MIT license.Moreover, as an open-source package written in Python 3.11 we anticipate extending new functionality and/or accommodating contributions from the broader Neurospora community through code contributions, bug reports, and feature requests.In particular, we plan to include methods for analyzing luciferase time course experiments as well as other experimental modalities.

Fig 1 .
Fig 1. Race tube anatomy and experimental workflow.a.A schematic of a race tube assay.Race tubes are filled with ~15mL of agar medium and inoculated with conidia at one end.The tubes are then incubated in constant light (LL) for 24 hrs, followed by a transition to constant darkness (DD).The Neurospora continues to grow with the clock controlling development and morphology at the growth front.For a specific portion of the relative circadian day, the mycelia differentiate into aerial hyphae and produce asexual spores (conidia, orange meshwork, referred to as banding).The peak-to-peak distance of conidial banding corresponds to one relative circadian cycle (highlighted in blue, ~22.5 hrs) and the free-running period of the strain.To establish a relationship between growth and time, it is necessary to mark the tubes once every ~24 hrs (vertical gray lines) at the growth front.Time marks serve as representative time frames for circadian period calculation.Adapted fromKramer 2007 [61]  b.High-level workflow of race tube assays.Neurospora is grown as described above in packs of six race tubes over approximately a week.Once growth reaches the ends of the tubes, packs are scanned from the bottom using a high-resolution flatbed document scanner.From this point, race tube images can be cropped or otherwise preprocessed before being uploaded to Rhythmidia for programmatic analysis.The scanner and laptop images were adapted from Pixabay content.

Fig 2 .
Fig 2. Rhythmidia interface.a.Rhythmidia image analysis interface of the home tab with programmatically identified features of a race tube image highlighting tube boundary demarcations (green), time marks (red), and conidial banding peaks (blue) overlaid on an uploaded image.An entry field for tube mark times is located to the left of the image (grey), and preliminary linear regression periods are displayed below the image (image analysis info, purple).The top of the screen holds "tabs" for switching between the image analysis (home tab) and the experimental data analysis interfaces.b.Rhythmidia experiment and data analysis interface, displaying data from a single six-pack of race tubes.Includes per-tube calculated periods and growth rate, options for statistical analysis of multiple tubes' and packs' periods, and options for plotting densitometry and period analysis data of individual tubes, all by multiple period analysis methods.The interface also includes options to export plots, data, and statistical analysis output.
Fig).Averages of pixel brightness are taken along horizontal line segments at each vertical pixel of the image, both at the left edge of the image and in the center (S1d Fig, red traces).Rhythmidia then identifies places where local minima exist in each density profile with sufficiently close y values corresponding to a line of low slope passing through both points.Here, it draws lines of demarcation between race tubes that pass through the centers of the pair of sampling regions (S1d Fig, blue lines).

Fig 4 .
Fig 4. Rhythmidia performance.a. Example FGS race tube (at 5.55mM Sorbose) demonstrating 9 days of banding and subsequent densitometry profile.The period was calculated using the linear regression method.b.Comparison of periods calculated for the same pack of race tubes by Rhythmidia and ChronOSX, using linear regression (LR) and the Sokolove-Bushell (SB) periodogram.The bar plot reports the average period (τ) calculated by the reported method (n = 6 and ± indicates the standard error of the means (SEM).The image used for analysis is in S1a Fig. https://doi.org/10.1371/journal.pcbi.1012167.g004