Keywords
Feeding-fasting rhythm, FLIC, Shiny, Drosophila, Circadian clock, chrononutrition, time-restricted eating
This article is included in the Bioinformatics gateway.
This article is included in the Circadian Clocks in Health and Disease collection.
Feeding-fasting rhythm, FLIC, Shiny, Drosophila, Circadian clock, chrononutrition, time-restricted eating
In the new version of the article, we have updated the text to address the reviewers' suggestions. New references were added to include newly developed tools for the analysis of DAMS data. Additionally, we expanded our explanation regarding the use of the baselining method Asymmetric Least Squares (ALS) as an alternative to Running Median (RM), as the latter requires the users’ input. To support this point, we added new results comparing the use of the two methods on sample data (Figure 1C-D). This dataset is available to download as part of the software’s source code.
We provided clarifications on the limitations of the current version of CRUMB in analyzing LD and DD data separately while providing practical options to analyze larger datasets by data trimming. Importantly, and promoted by the suggestions of the reviewers, we demonstrated the utility of this approach by comparing the day and night differences in feeding events under LD and DD conditions between control and clock mutant flies. Our analysis uncovered differences that correlate to previous data on locomotor activity rhythm in these same mutants.
See the authors' detailed response to the review by Daniel J. Cavanaugh
See the authors' detailed response to the review by Abhilash Lakshman
The fly Drosophila melanogaster has been used for several decades to understand the molecular and neuronal basis of behavior.1,2 This animal has been instrumental in the description of the circadian clock,3–10 the machinery that allows animals to maintain daily rhythms in physiology and behavior. A common behavioral output used to assess circadian rhythmicity is locomotor activity, which is considered by many as a gold standard. Commercial options such as the Trikinetics Drosophila Activity Monitoring System (DAMS) have made it possible to conduct high throughput screening of clock mutants11–13 and functional experiments to dissect molecular and cellular mechanisms regulating circadian rhythms.14,15 Nonetheless, this behavior is only one example of circadian clock behavioral output. Feeding-fasting rhythm is also strongly regulated by the clock, although mechanisms required for maintaining food intake rhythm differ from those used in the regulation of circadian locomotion.16–20
In contrast to locomotor activity rhythms, technical advances to assay feeding rhythms have lagged. A popular option is the Capillary Feeder (CAFE) assay, which allows for the quantification of the amount of feeding by means of measuring the movement of a meniscus along a capillary tube.21 This assay has proven useful in capturing the feeding rhythms of groups of flies; however, the distance of the meniscus is only evident when a significant amount of liquid food has been consumed and thus its temporal resolution is limited. In 2014, Scott Pletcher’s lab developed FLIC (Fly Liquid-Food Interaction Counter), a new system to assess feeding which allows for continuous monitoring (millisecond scale) and scalability, promising high throughput recordings.22 Since then, several other groups have adopted the system and used it to address different biological questions including rhythmic feeding and metabolic homeostasis.18,23–32
Available options of software to analyze locomotor activity from DAMS have multiplied over the years, offering different user interphases and developed in different coding languages33–42 (summarized in Cai et al.15). In contrast, due to its recent implementation, user-friendly tools to analyze FLIC data are still scarce,23 and available scripts require the user to understand and use R coding syntax. Here we present CRUMB (Circadian Rhythm Using Mealtime Behavior), a shiny app based on the popular DAMS Shiny app Shiny-R DAM combined with the core FLIC code master scripts provided with the equipment (GitHub FLIC R code). CRUMB leverages features from several packages including ‘plotly’43 and ‘DT’,44 to generate easily manipulable graphs and data tables. CRUMB also uses some of the versatile tools offered by the ‘zeitgebr’ package35,45 to enable easy and comprehensive circadian analysis—all of this wrapped in a simple Graphical user interface (GUI) provided by the ‘shiny’46 package.
Initialization
Initialization of the app must be conducted from the ‘app.R’ script. On the first usage, if ‘shiny’ or any other package is not installed, running this script will prompt a message indicating the list of missing packages and asking for installation. Following this process, CRUMB will be started and ready to run. The tabs on this app are organized in the required order of use, meaning that processes in the tab ‘File loading & QC’ are required for the subsequent tab ‘Initial Survey’, which then is required for subsequent tabs and so forth.
Input files
The current version of CRUMB supports the original, unedited CSV files from the FLIC-MCU-2 system (Sable Systems International, NV). Further testing is needed to determine its suitability for other versions of the FLIC-MCU system. Given that the time resolution provided by FLIC monitors is in the scale of milliseconds, file sizes are correlated to the length of the recordings. For a full day of recordings, the file size is 44.4 MB. Although CRUMB is designed to analyze the data of several consecutive days, shorter recordings/files can be used as input but some functionalities (i.e., circadian analysis) will not be available.
To load the files, use the ‘Browse’ button. Select the file or files, from one or several different monitors. After loading, use ‘Cache data & Populate dates’ to engage the files and populate the dates of the experiments and monitor numbers (Figure 1A).
(A) Raw data files and dates of the experiment are loaded in step 1. In step 2, the user can select parameters to baseline the raw data by choosing (i) a baseline function and time duration window for the Running Median option. Additional parameters including (ii) a binning interval and (iii) a binning function can be indicated for visualization purposes. (B) Baselined data are visualized using ‘plotly’ interactive graphs, allowing individual inspection of data. Data can be downloaded as CSV files. (C) Average feeding activity of w1118 flies over three days obtained by using Asymmetric Least Square (ALS; red line) or Running Median (RM; black line; 5 min moving window) baselining. Data output is not compromised. (D) Correlation between the data obtained by using RM or ALS as baselining method.
Baseline data & QC
Feeding events are calculated from the baselined data obtained from FLIC monitors. If desired, data can be trimmed by choosing the start and end date. This trimming is made to the raw data, preventing unnecessary processing, and therefore reducing computation time. For visualization purposes, a binning interval and a binning function are needed. By default, these values are set to ‘1 hour’ and ‘Sum’, respectively (Figure 1A). Note that if recordings are shorter than this interval, the data will be represented as a unique point. The binning used in this tab is for graphing purposes only and the calculation of feeding events in subsequent tabs is carried out from the full, non-binned data. Once these parameters are set, press ‘Baseline data!’. Graphs are compiled using the ‘plotly’ package, an interactive interface that permits easy inspection of the graphs, allowing the selection of individual points and areas within the plots (Figure 1B). The isolation of tracks in ‘plotly’ graphs can thus be used to visualize individual flies to look for anomalies or drifting in the baseline due to liquid food overfill.
In CRUMB, baselined can be calculated using one of two functions: running median (RM) or asymmetric least squares (ALS).47 The running median is the original method used in the FLIC master code, adopted by CRUMB, and requires a moving window in minutes to calculate the median for subtraction. In contrast, ALS does not require user input, thus automatizing the baselining process and promoting reproducibility in data analysis. Using ALS does not appear to compromise the downstream processing. As an example, we used data from w1118 under 12 hours light and 12 hours dark cycles. The events obtained by using RM and ALS are comparable (Figure 1C), evidenced by the high correlation between data obtained with RM and ALS (Figure 1D). It is important to notice that one major downside of the use of ALS is the computing time, as this method requires almost twice the time compared to RM, which can be a problem considering the size of the dataset we deal with in these analyses. Thus, we suggest ALS to be considered in a case-to-case basis.
Initial survey
The tab in Figure 2A (‘Initial Survey’) allows assigning names and colors to the different conditions present in the experiment. Given that CRUMB allows input from several FLIC monitors, an option to choose the monitor is available. This is populated with the monitor number extracted from the filenames. We recommend that the users use two or more conditions per monitor to account for variability between monitors. Because of this, CRUMB allows assigning wells from the same monitor to different conditions. Use the boxes on the right to check or uncheck the wells. If the same condition is repeated in different monitors (i.e., flies from the same genotype in two or three monitors), adding another condition with the same name will allow the pooling of the data in subsequent analyses (Figure 2A). If no names are assigned, fields will be populated automatically with the default name “Condition”.
(A) In step 1, users can define conditions per monitor and/or wells. Step 2 allows the selection of the parameters required to calculate feeding events based on the baseline data. The ‘Parameter Description’ image (modified from FLIC code master) provides definitions for these factors. (B) After the calculation, the summary section displays the processed data as individual events per fly/well (top left), average events per group (top right and bottom left), and the number of events across days for each fly (bottom right). The feeding activity of each well can be scaled to the highest value of that well throughout the duration of the experiment by using the normalization switch. This selection is inheritable, meaning that the rest of the analysis will be conducted with the normalized data. Additionally, users can select outliers from the ‘Individual Stats’ table to exclude them from the rest of the analysis.
The FLIC system is designed so events that meet certain criteria can be considered feeding events (Figure 2A). These parameters correspond to the feeding minimum (minimum value of the baselined signal to consider an interaction), feeding threshold (threshold value that consecutive interactions need to pass to consider the event as feeding), number of consecutive licks (minimum number of interactions required to define a feeding event) and gap (time between events to consider consecutive events as one single event). The setting of these parameters can be tuned and tailored to each monitor and need to be determined empirically.
Once parameters are defined, clicking ‘Get Events!’ will initiate the calculations. This process is the most machine-demanding of the entire analysis, and the time spent on it correlates with the length of the input files. Additionally, permissive parameters will result in more events being considered, increasing the processing time.
The output summary is composed of four main elements that allow the inspection of the data (Figure 2B). First, an ‘Individual Stats’ table and a ‘Group Stats’ table are displayed to show the total number of events per fly and the average, standard deviation (SD), and standard error of the mean (SEM) for the groups indicated in the previous step, respectively. Second, two graphs are displayed, a boxplot of the total events per condition showing individual points and a graph of events per day throughout the duration of the experiment. Given the variability of the data, it is possible to enable or disable normalization, which divides the binned events of each fly by the sum of all the events per fly. This will impact the display of the feeding events and average event profiles in the next tab, ‘Feeding Analysis’, and the calculations in the ‘Circadian Analysis’ tab.
The function of this summary is two-fold: 1) it allows for inspection of the data for each individual fly and pooled data and 2) allows for the exclusion of dead flies. The criterion to consider dead individuals may vary but data from this section can provide guidance. For example, from the ‘Individual Stats’ table, flies that fail to show any events above a threshold defined by the experimenter can be excluded. Also, the boxplot of total events facilitates the determination of outliers as they will be marked by a black dot next to the data point. Finally, flies that do not survive for the entire experiment can be excluded. This information can be extracted from the ‘Events per day’ graph. To exclude individuals from the rest of the analyses, simply select them in the ‘Individual Stats’ table by clicking them.
Feeding analysis
The ‘Feeding Analysis’ tab (Figure 3) displays binned events across several days of recordings and average daily events (feeding profile). To access these, the user must indicate a binning interval (1 min, 30 min, or 1 hour), binning function (Sum or Mean), and descriptive statistic represented by the error bars (SEM, SD, or None) (Figure 3). The generated graphs are also interactive and allow the resizing of the axis and zoom of particular windows within the graph.
Users can access and visualize the feeding events across the duration of the experiment (top graph) with the time resolution defined by (i) a binning interval and (ii) a binning function. As the binning interval functions as a lowpass filter, the definition of these parameters needs to be carefully selected. Summing or averaging the data in shorter bins increases noise, which impacts the calculation of rhythmicity statistics. On the other hand, the use of longer bins might result in the loss of the shape of feeding activity rhythm. Thus, 30-min to 1-hour bins are recommended. CRUMB also provides the option of 1 min bins, but this is designed for short-term (< 1 day) recordings. The daily feeding events are averaged and displayed as an activity profile graph (middle graph) with gray backgrounds indicating when the lights are off. The duration of day and night can be selected under ‘Light Transition’ from the left panel where the region between the two sliders is when the light is on (red line). This selection also serves to calculate the daytime feeding events (bottom left graph and table) and nighttime feeding events (bottom right graph and table) per well. Error bars for the top two graphs can be defined by the user as Standard Error of the Mean (SEM), Standard Deviation (SD), or can be omitted if desired, by selecting ‘None’. Additionally, data are available as CSV files for download using the download buttons below each graph. Note that average daily events, day, and nighttime events are calculated on the complete dataset. The current version of CRUMB does not differentiate between light-dark cycles (LD) and constant darkness (DD). If you need investigate the difference between these conditions, we suggest trimming the data in the baselining step to get only the LD or the DD days. We applied this approach in the ‘Use Cases’ section below.
The user can indicate the time of lights on and off using the light transition feature. This information is used to determine which events occurred during the day and which events occurred during the night. This information is summarized in data tables and in boxplots (Figure 3).
Circadian analysis
The circadian analysis is carried out in the ‘Circadian Analysis’ tab, and the current version of CRUMB allows the setting of the start and end date of the constant darkness (DD) period and a slider to choose the range of periods (in hours) that are included in the circadian analysis (Figure 4). CRUMB uses the autocorrelation function estimation to get the period and power for rhythmicity from the ‘stats’ package wrapped in the periodogram function from the ‘zeitgebr’ package.
In this tab, users can calculate the rhythmicity of feeding events from data collected under constant darkness using autocorrelation analysis. A range of possible period lengths can be specified for this calculation. An average periodogram (top left) and a graph of the maximum power values per well (top right) are displayed. Dotted lines indicate the threshold for the significance of periods and error bars are displayed as SEM. A summary table with this information is also provided (bottom) and can be downloaded as a CSV file.
The output of this analysis is a periodogram graph, showing the period over the power from the autocorrelation function and a boxplot of the highest power for each condition. Finally, a table (exportable as CSV) is obtained with the period, the highest power for each fly, and the p-value for that period estimation. The significant threshold (signif_threshold) is also shown in the table and is displayed as dotted lines in the periodogram and the power graphs (Figure 4).
Operation (minimal system requirements needed to run the software)
CRUMB was developed with R version 4.0.3 using the FLIC master code version 4.0 from the Pletcher lab as a backbone, modified and wrapped in a shiny app to manage the GUI using Shiny version 1.7.4. No internet connection is required to run the app but if any required package is missing, the user will be prompted with the option to download and install them from CRAN, and the completion of these actions requires internet access. Output graphs can be obtained from ‘plotly’ features as PNG files.
Output tables are in CSV format and can be opened using any compatible spreadsheet application including Microsoft Excel, Apple Numbers, or any other spreadsheet application.
Default: determining rhythmicity
CRUMB can be used to determine differences in the number of feeding events as a means to understand the motivation and innate status of flies or survey rhythmic feeding behavior to understand circadian control of feeding. Here we show one example of CRUMB used to determine feeding rhythmicity in a control strain (w1118) compared with mutant flies with a defective circadian clock (w1118; clkout; annotated as clkout).48 In this example, CSV files collected from FLIC Monitor 1 across 7 full days were used as input (2021-07-01 to 2021-07-07). Wells from 1 to 6 correspond to clkout flies while wells 7 to 12 correspond to w1118 flies. Further, the following parameters were used; a threshold of 5 was set as the minimum and 15 was chosen as the top limit, the number of consecutive licks was set to 2, and the link was set to 5. Flies were kept in 12 hours light:12 hours dark (12:12 LD) cycles for three days (2021-07-01 to 2021-07-03), with lights on at 09:00 am and lights off at 09:00 pm, and then changed to constant darkness for four days (2021-07-04 to 2021-07-07) (Figure 5A). As expected, feeding events for w1118 flies peak close to the light transition, both at dawn and dusk under LD conditions (Figure 5B; blue arrows). Although this is different from reports showing only a single peak at dawn using the CAFE assay,20,49,50 this result is consistent with other articles using the FLIC assay.18,22,32 This discrepancy highlights the advantage of using an assay with high time resolution such as FLIC. Interestingly, while no differences in the daytime feeding events are observed, a significant increase in the nighttime events was found in clkout mutants (Figure 5C and 5D, respectively). This is consistent with previous studies showing that the nighttime locomotor activity is increased in these flies.51,52 Under DD, w1118 retained both morning and evening peaks of feeding as observed in the average feeding profile, while no observable peaks are observed in mutant flies (Figure 5E). Additionally, no differences were found in the daytime (Figure 5F) or nighttime feeding (Figure 5G). Consistent with previous studies,49 w1118 flies show a circa 24 period in feeding behavior (Figure 5H; black line, blue arrow) while clkout mutants display arrhythmic feeding behavior (Figure 5H; red line). Interestingly, at first sight, the maximum power of rhythmicity is not different between genotypes (Figure 5I; p = 0.093). Close inspection of the graph shows an outlier identified by CRUMB and flagged with an overlapping black dot (Figure 5I; red dotted circle). If removed, the comparison now achieves statistical significance (Figure 5J; p = 0.017). It is important to notice, however, that using four days on DD might not be sufficient to get robust rhythmicity statistics. We recommend using > 5 days, as routinely used for DAM assays. Even considering this and that the number of animals used is small (n = 6 per genotype), the differences observed are consistent with previous data and highlight the utility of CRUMB.
(A) Feeding activity was recorded for 3 days under 12:12 light-dark cycles followed by 4 days in constant darkness (DD) for a circadian mutant (clkout, red) and control flies (w1118, black). (B) Average feeding activity across LD days for control flies shows increased feeding activity anticipating lights on (09:00, blue arrow) and lights off (21:00, blue arrow), which is absent in mutant flies. The dark period is represented as a grey area on the graph. While no changes in the average number of (C) daytime feeding events were observed, there is an increase in the (D) nighttime feeding events under LD. (E) Average feeding activity under DD shows the persistence of peaks (blue arrows) in w1118 flies, close to the subjective lights-on and lights-off transitions. The subjective day is represented as a light grey area between 09:00 to 21:00. No changes are observed in average (F) daytime or (G) nighttime feeding events between genotypes. (H) Control flies show a 24 h period of feeding activity as seen in the periodogram (black lines, blue arrow), a feature that is not observed for the mutant flies (red line). The dotted line represents the threshold for significance in the autocorrelation analysis. (I) The average maximum power from the autocorrelation analysis is compared as a mean of rhythmicity strength. No significant differences (p = 0.093) are observed when comparing genotypes. CRUMB detects an outlier (red dotted circle), marked as a black dot overlapping with the datapoint. (J) Removal of the outlier observed in (I) renders significant differences between genotypes (p = 0.017). Error bars in A, B, E, and H are displayed as SEM.
The development of FLIC offers a new, high throughput option for continuous measurement of feeding events.22 In contrast to DAMS for locomotor activity, FLIC system lacks easy-to-use options for data analysis. Here, we addressed this gap by developing CRUMB, a Shiny-based app for FLIC data analysis. Our platform offers a pipeline to analyze feeding events over several days and extract key rhythmic data such as day and night feeding events and feeding rhythmicity.
CRUMB uses the FLIC master code backbone, which offers compatibility with previous analysis. Also, we increased calculation speed by dropping some collected data, such as the number of licks or time of feeding events. We believe that this trade-off is crucial when analyzing long recordings necessary for circadian rhythm analysis, which require longer computing time. Although these parameters have been used in other studies,31,32 obtaining the number of events allows for the extraction of key circadian features of the feeding behavior, such as period and rhythmicity. Future versions could include these data points as selectable options, to adjust to the experimenters’ needs.
Although our app offers in-site statistical analysis, output files can be obtained from all the analysis, allowing the export of processed data to other statistical software such as GraphPad Prism or Matlab. This could be particularly useful if in-depth statistical analysis is required, a feat that CRUMB is unable to achieve.
Finally, CRUMB is open-access, and the code is freely available, which hopefully will promote the use of this tool as a backbone for other functions required for the community. Although CRUMB was initially conceived with circadian analysis of feeding in mind, the app can be expanded to include analysis of food choices, also available in the FLIC system.
Example data used in this paper are available as part of the CRUMB app on GitHub (CRUMB GitHub).
Zenodo: ClockLabX/CRUMB: Version 1.0 (v1.0.0), https://doi.org/10.5281/zenodo.7738298. 53
Data are available under the terms of the Creative Commons Attribution 4.0 International License (CC-BY-04).
Source code available from: https://github.com/ClockLabX/CRUMB.git
Archived source code at time of publication: https://doi.org/10.5281/zenodo.7738298. 53
License: MIT license.
We thank members of the Chiu Lab for their valuable comments on the development of this work, especially Christine Tabuloc and Kyle Lewald.
Views | Downloads | |
---|---|---|
F1000Research | - | - |
PubMed Central
Data from PMC are received and updated monthly.
|
- | - |
Competing Interests: No competing interests were disclosed.
Reviewer Expertise: organismal biology, chronobiology, animal behavior, neuroscience, computational biology
Is the rationale for developing the new software tool clearly explained?
Yes
Is the description of the software tool technically sound?
Yes
Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?
Yes
Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool?
Yes
Are the conclusions about the tool and its performance adequately supported by the findings presented in the article?
Yes
Competing Interests: No competing interests were disclosed.
Reviewer Expertise: Circadian neurobiology
Is the rationale for developing the new software tool clearly explained?
Yes
Is the description of the software tool technically sound?
Partly
Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?
Partly
Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool?
Partly
Are the conclusions about the tool and its performance adequately supported by the findings presented in the article?
Yes
Competing Interests: No competing interests were disclosed.
Reviewer Expertise: organismal biology, chronobiology, animal behavior, neuroscience, computational biology
Alongside their report, reviewers assign a status to the article:
Invited Reviewers | ||
---|---|---|
1 | 2 | |
Version 2 (revision) 19 Jun 23 |
read | |
Version 1 06 Apr 23 |
read | read |
Provide sufficient details of any financial or non-financial competing interests to enable users to assess whether your comments might lead a reasonable person to question your impartiality. Consider the following examples, but note that this is not an exhaustive list:
Sign up for content alerts and receive a weekly or monthly email with all newly published articles
Already registered? Sign in
The email address should be the one you originally registered with F1000.
You registered with F1000 via Google, so we cannot reset your password.
To sign in, please click here.
If you still need help with your Google account password, please click here.
You registered with F1000 via Facebook, so we cannot reset your password.
To sign in, please click here.
If you still need help with your Facebook account password, please click here.
If your email address is registered with us, we will email you instructions to reset your password.
If you think you should have received this email but it has not arrived, please check your spam filters and/or contact for further assistance.
Comments on this article Comments (0)