$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
The protocol was used to explore the effect of rearing temperature on abdominal pigmentation. Previous studies have shown that an increase in developmental temperature results in a decrease in the spread of abdominal pigmentation in several species of Drosophila, including D. melanogaster30,32. Specifically, in abdominal tergites 3 and 4, the extent of pigmentation (width of the pigment band) decreases from 17 °C to 25 °C and remains the same from 25 °C to 28 °C24,36. These studies scored the extent of pigmentation on a 1-10 scale (0: no pigment band, tergite completely yellow; 5: pigment band occupies 50% of the tergite; 10: tergite completely dark). To establish whether the quantitative methodology could capture this phenotypic plasticity, the pigmentation was measured in the third and fourth abdominal tergites of an isogenic line of ostensibly wildtype female flies, reared from egg to adult at 17 °C (seven flies), 25 °C (nine flies), and 28 °C (nine flies). To determine the effectiveness of the correction procedure at removing nuisance factors introduced by session effects, the pigmentation of the same flies was re-imaged and re-measured one, two, four, and eight days later. Lighting conditions and exposure between sessions were, however, purposely changed to ensure that there were session effects for the correction procedure to remove. The images have been posted on the Dryad digital repository.
The first question posed was whether there were systematic differences in pigmentation measures across sessions. This was examined using the lme4 package in R48 to fit the mixed models Mijk = Si + Aj+ εijk and Mij = Aj+ εij to both Pmax and Pmin, where M is the pigment measure, S is the session (random effect), A is the abdominal tergite being measured (random effect), and ε is the residual error (subscripts are levels within variables). A log-likelihood ratio test was used to test whether the inclusion of session as a random factor significantly improved the fit; it did (Table 1). As expected, the examination of the variance components (generated through REML48) indicated that variation due to session effects accounted for 67% and 70% of the total variance in Pmax and Pmin, respectively (Table 1).
Fifteen randomly selected control tergites (either third or fourth, from flies reared at 17 °C, 25 °C, or 28 °C) were selected, and changes in their mean Pmax and Pmin were used to correct the pigmentation measures of the remaining tergites across sessions. Repeating the analysis on the corrected pigmentation measures eliminated the session effects (Table 1) and reduced the percentage of total variance due to session effects to zero. The residual error is an estimate, a measurement error after the session effects have been removed, and was 22% and 27% for Pmaxand Pmin, respectively (Table 1)
Next, the corrected data was used to determine whether the effect of temperature on different aspects of pigmentation and size could be detected. The mixed model Mijkm= Ti* Dj+ Xk+ εijkm was fitted to the data, where T is the temperature, D is the tergite (third or fourth), and X is the individual fly (random factor). Because the relationship between pigmentation and temperature is not linear24,36, T was treated as a categorical factor. The maximum and minimum levels of pigmentation (Pmax and Pmin) and the width of the pigment band and of the tergite (Wband and Wtergite) were tested. The effect of temperature on the relative width of the pigment band (Rband =Wband/Wtergite) was also tested. The data showed that the absolute(Wband) and relative (Rband) width of the pigment band decreased from 17 °C to 25 °C (Tukey post-hoc test, P <0.05 for all) and did not significantly change from 25 °C to 28 °C (Tukey post-hoc test, P >0.05 for all) (Table 2, Figure 3A and 3B), which is consistent with previous studies24,36. The same pattern was observed for the maximum and minimum level of pigmentation, Pmax and Pmin (Table 2, Figure 3C). The effect of temperature on the level of pigmentation has not been described before, but it initially appears consistent with other studies that show that the minimum level of pigmentation in the fourth abdominal tergite is positively correlated with the width of the pigment band in wildtype populations39. However, whilst the data from this study indicate a positive relationship between Pmax and Wband, they show a negative relationship between Pmin and Wband (Table 3). This difference between the current and previous studies may reflect differences in how genetic and environmental factors impact the correlation between the level and extent of abdominal pigmentation. Nevertheless, these representative results show that the protocol is capable of not only identifying patterns of pigmentation previously established through qualitative methodologies, but also of revealing new ones that qualitative methodologies are not able to detect.
The effect of temperature on the width of the tergite was more complex. In D. melanogaster, body and organ size decline non-linearly with temperature49. Previous studies suggest that the width of the fifth abdominal tergite decreases by 10% from 16.5 °C to 25 °C, and a further 4% from 25 °C to 29 °C50. While there was a non-significant decrease in the width of the fourth abdominal tergite from 17 °C to 25 °C, both the third and fourth abdominal tergites increased in width from 25 °C to 28 °C (Table 2, Figure 3D). Since the width of the abdominal tergites is essentially defined by the user (steps 5.9-5.10 in the protocol), the disparity between the current and previous studies is unlikely to be due to the way the R script extracts Wtergite from the pigmentation profile. Rather, it may reflect differences in the manner in which the abdominal segment is measured, in the genotypes of the flies, and in the precise aspects of the abdominal tergites being measured.
The next question posed was whether the methodology could generate data comparable to data collected using existing assessments of pigmentation. These methods typically ask the observer to subjectively assign each fly to one of a finite number of phenotypic classes based on the extent of pigmentation15,30,32,33,34 and therefore rely on the observer's ability to assess the width of the pigment band. To test how well this objective method compares to subjective methods, five observers were asked to rank 45 images of female abdomens based on the width of the pigment band of the fourth abdominal tergite. The average ranking across observers was compared with the ranking based on Wband, as measured using this methodology. There was a strong correlation between the subjective and objective rankings (Supplementary Figure 1, in Supplementary Information.pdf), Spearmen's = 0.7342, P <0.0001).
Another question posed was how this method to extract Wband from the pigmentation spline compared to measuring the width of the pigment band by hand (visual method) using the linear measurement tool in ImageJ. Again, a strong correlation was found between data collected using the two methodologies (Supplementary Figure 2, in Supplementary Information.pdf, OLS, r2 = 0.49, P <0.0001). Although the computational method consistently measured the pigment band as being narrower than in the "visual" method, the regression coefficient was not significantly different than 1 (P >0.05).
The final question posed was whether this methodology could be used to measure abdominal pigmentation in other contexts. The methodology could extract the Pmax, Pmin, Wband, and Wtergite for the fifth and sixth abdominal tergites in females and the third and fourth abdominal tergites in males (Figure 4). Furthermore, the methodology could be used to quantify the increase in Pmaxand Pmin in flies mutant for ebony (e1), which show an increase in cuticular pigmentation across the body and a specific increase in pigmentation of the cuticle anterior to the pigment band28 (Figure 4).

Figure 1: Abdominal pigmentation in D. melanogaster. (A-F) Variation in abdominal pigmentation in females of two genotypes reared at three temperatures (17 °C, 25 °C, and 28 °C). A3 and A4 are the third and fourth abdominal tergites, respectively. (G) The dorsal abdominal tergite includes an anterior and posterior compartment, only parts of which are reliably visible in un-stretched abdomens. The compartments are further subdivided into distinct cuticle types: a1: un-pigmented, no hairs; a2: lightly pigmented and hairs; a3: lightly pigmented, hairs, and moderate bristle; a4: darkly pigmented, hairs, and moderate bristle; a5: darkly pigmented, hairs, and large bristle; a6: un-pigmented and hairs; p3: un-pigmented and hairs; p2: un-pigmented and no hairs; and p1: un-pigmented and tessellated. The pigment band is made up of cuticles a4 and a5. Only pigmented cuticles (a2-a5, green box) are used in the analysis. Scale bars = 200 µm in (A-F). The contrast of all images has been adjusted to highlight the pigmentation pattern, and the images are illustrative. Unadjusted images used to generate the representative results are deposited on the Dryad digital repository. Please click here to view a larger version of this figure.

Figure 2: Image and data analysis for quantifying abdominal pigmentation. (A-F) and (A-F) are for different specimens and show how the analysis deals with images of different quality. (A) The user first defines the midline of the abdomen (yellow line), the anterior edge of the tergite (cyan line), and a line slightly posterior to the posterior edge of the pigment band (magenta line). The ImageJ macro then draws a line from the midpoint of the anterior and posterior lines (white dashed line), which it widens to form an ROI (black box), magnified in (B). (C) The ImageJ macro then extracts the average pixel value along the anterior-posterior axis of the ROI. Note that at this stage, the profile is read from posterior to anterior. (D-E) The R macro converts the average pixel values to a pigmentation value, reverses the direction of the pigmentation profile, fits it with a cubic spline (S(x)) (D), and calculates the first (S(x)) (E) and second (S(x)) derivative of the spline (F). The script then identifies: T3, the position of maximum pigmentation, where S(x) transitions from <0 to >0, moving anteriorly from the posterior of the spline; T2, the position where the decline in pigmentation is the greatest and S(x) is maximum; and T1, the position where the tergite pigmentation is at its minimum and S(x) transitions from >0 to <0, moving anteriorly from T2,. The anterior of the reliably visible tergite (anterior of cuticle a2) is defined by the user. (A-F) In cases where the first derivative cannot be used to find T1, typically because S(x) does not cross 0 anteriorly to the pigment band, the script will define T1 as the position where S(x) transitions from >0 to <0 when moving anteriorly from T2. Please click here to view a larger version of this figure.

Figure 3: The effect of temperature on different aspects of abdominal pigmentation in female D. melanogaster. (A) Width of the pigment band (Wband, Figure 1). (B) Pigment band as a proportion of tergite (Rband). (C) Maximum (Pmax, upper lines) and minimum (Pmin, lower lines) pigmentation. (D) Width of tergite (Wtergite). The points are least square means from linear mixed-effect models (Table 2). The error bars represent the standard error and may be obscured by the markers. The black line is third abdominal tergite. The gray line is the fourth abdominal tergite. Please click here to view a larger version of this figure.

Figure 4: Differences in pigmentation between the third and fourth abdominal tergites. This is shown in (A) ebony1 females, (B) wildtype females, (C) wildtype males, and the fifth and sixth abdominal tergites in wildtype females. (D) Maximum pigmentation, Pmax. (E) Minimum pigmentation, Pmin. (F) Width of the pigment band, Wband. (G) Relative width of the pigment band, Rband. Bars with different letters are significantly different (Tukey HSD post-hoc test, P <0.05). N = 6 for all except ebony1, where N = 4. Scale bars = 200 µm in (A-C). The error bars represent the standard error. The contrast of all images has been adjusted to highlight the pigmentation pattern, and the images are illustrative. Please click here to view a larger version of this figure.
| Model Comparison | Variance Components (% of total) |
| Pigmentation Trait | Model | df | Log-likelihood | X² | (%) | (%) | (%) |
| Pmax Uncorrected | Mij = Ai + εij | 3 | -678.28 | | 1.94 (14%) | | 11.86 (86%) |
| Mijk = Si + Aj + εijk | 4 | -457.95 | 440.66*** | 4.08 (26%) | 10.71 (67%) | 1.14 (7%) |
| Pmin Uncorrected | Mij = Ai + εij | 3 | -875.03 | | 6.05 (9%) | | 59.39 (91%) |
| Mijk = Si + Aj + εijk | 4 | -664.58 | 420.91*** | 16.67 (22%) | 53.08 (70%) | 6.31 (8%) |
| Pmax Corrected | Mij = Ai + εij | 3 | -445.05 | | 4.08 (78%) | | 1.15 (22%) |
| Mijk = Si + Aj + εijk | 4 | -444.88 | 0.3378 | 4.08 (78%) | 0.01 (<1%) | 1.14 (22%) |
| Pmin Corrected | Mij = Ai + εij | 3 | -649.9 | | 16.67 (73%) | | 6.24 (27%) |
| Mijk = Si + Aj + εijk | 4 | -649.9 | 0 | 16.67 (73%) | 0 | 6.31 (27%) |
Table 1: Linear mixed-effect models of the effect of tergite and session. Linear mixed-effect models of the effect of tergite and session on abdominal pigmentation (Pmax and Pmin) of 50 tergites re-measured across five sessions, with variance components estimated through REML. Models were linear mixed-effect models. M: Pigmentation measure; A: Individual tergite measured; S: Session; ε: Residual error. Significant X² are shown in bold. * p <0.05. ** p <0.01. *** p <0.001.
| Trait | | Temperature | Tergite | Temperature
x Tergite |
| Pmax | F-ratio | 8.14 | 55.59 | 6.6 |
| P | 0.002 | <0.001 | 0.002 |
| Pmin | F-ratio | 4.41 | 66.11 | 6.36 |
| P | 0.026 | <0.001 | 0.002 |
| Wband | F-ratio | 113.93 | 0.01 | 0.64 |
| P | <0.001 | 0.931 | 0.531 |
| Wtergite | F-ratio | 1.79 | 0.92 | 5.11 |
| P | 0.191 | 0.338 | 0.007 |
| Rband | F-ratio | 27.66 | 0.08 | 1.46 |
| P | <0.001 | 0.782 | 0.23 |
Table 2: Effect of temperature and tergite identity. The effect of temperature and tergite identity on different aspects of abdominal pigmentation in 50 tergites re-measured across five sessions. Models were linear mixed-effect models, with individual fly included as a random factor. Pmax: Maximum pigmentation (corrected); Pmin: Minimum pigmentation (corrected); Wband: Width of pigment band; Wtergite: Width of tergite; Rband: Relative width of pigment band. Significant fixed factors are shown in bold (P <0.05).
| | Intercept | Wband | Temperature | Tergite |
| | | | 17˚C | 25˚C | Third |
| Pmax | β | 234.35 | 0.069 | 0.063 | -1.178 | -0.588 |
| F | | 29.93 | 5.97 | 54.82 |
| P | | <0.001 | 0.008 | <0.001 |
| Pmin | β | 223.96 | -0.137 | 3.931 | -3.024 | -1.54 |
| F | | 19.33 | 9.66 | 62.02 |
| P | | <0.001 | 0.001 | <0.001 |
Table 3: Effect of pigment band width, temperature, and tergite identity on the level of pigmentation. Effect of pigment band width, temperature, and tergite identity on the level of pigmentation in 50 tergites re-measured across five sessions. Models were linear mixed-effect models, with individual fly included as a random factor. Pmax: Maximum pigmentation (corrected); Pmin: Minimum pigmentation (corrected); Wband: Width of pigment band; Rband: Relative width of pigment band.
Supplemental File 1. Supplementaly Information. Please click here to download this file.
Supplemental File 2. Analysis of Pigmentation.R script. Please click here to download this file.
Supplemental File 3. Measurement of Pigmentation.ijm Please click here to download this file.
Simulation R Script. Please click here to download this file.