ABSTRACT
Organismal phenotypes emerge from a complex set of genotypic interactions. While technological advances in sequencing provide a quantitative description of an organism’s genotype, characterization of an organism’s physical phenotype lags far behind. Here, we relate genotype to the complex and multi-dimensional phenotype of an anatomical structure using the Drosophila wing as a model system. We develop a mathematical approach that enables a robust description of biologically salient phenotypic variation. Analysing natural phenotypic variation, and variation generated by weak perturbations in genetic and environmental conditions during development, we observe a highly constrained set of wing phenotypes. In a striking example of dimensionality reduction, the nature of varieties produced by the Drosophila developmental program is constrained to a single integrated mode of variation in the wing. Our strategy demonstrates the emergent simplicity manifest in the genotype-to-phenotype map in the Drosophila wing and may represent a general approach for interrogating a variety of genotype-phenotype relationships.
Introduction
Discovering the properties of an organism’s genotype-to-phenotype (G2P) map is fundamental to our understanding of development and evolution. As such, the physical phenotypes of an organism emerge from a complex set of genotypic interactions, precluding a straightforward path to relating the two since variation in genotype can potentiate unpredictable cellular behaviours and traits1. Intuiting an emergent property of an organism’s G2P map, C.H. Waddington conjectured that “developmental reactions, as they occur in organisms submitted to natural selection…are adjusted so as to bring about one definite end-result regardless of minor variations in conditions during the course of the reaction”2,3. Such robustness criteria suggest that only a small portion of phenotypic space is made accessible by the developmental program. In particular, the natural variation in a population, as well as small-effect genetic and environmental perturbations, are predicted to have congruent effects on adult phenotype4,5. If true, Waddington’s conjecture would embody a striking example of dimensionality reduction in an organism’s G2P map1,6, meaning that high-dimensional genome-wide and environmental variation is mapped onto lowdimensional variation in body form through the process of development. This would provide insight into a class of general design principles and call for an investigation into its evolutionary origins and consequences7,8.
State-of-the-art techniques to quantitatively relate genotype to phenotype are limited by current assays of physical traits. These are primarily based on an arbitrary fragmentation of a body structure into a handful of composite measurable traits, referred to as landmarks9–11. Based on a landmark-free mathematical approach that enables a robust description of biologically salient phenotypic variation, we develop a framework for relating genotype to the complex and multi-dimensional phenotype of a major anatomical structure. We chose the wing of Drosophila melanogaster as the prototype sub-system to analyse for several reasons. First, the developmental processes to form the wing are comprehensively understood, with many genes implicated in wing development12–15. Second, the wing has a complex form and function (Figure 1a), with a clear fitness impact for the organism16–18. Lastly, wing phenotype has been extensively studied using landmark-based morphometrics (Figures 1a and S1)19–23. Leveraging our approach, we demonstrate that the spectrum of phenotypes generated by the wing’s developmental program is highly constrained, as Waddington anticipated, aligning with each other to define a single direction of congruent effects. Strikingly, phenotypic variation along this direction is not limited to isolated discrete landmarks of the wing. Instead, it makes itself manifest as an integrated mode across the entire wing, highlighting the complex and collective nature of its G2P map. Given the ease with which genomic variation can be measured, the strategy described here may represent a general approach for interrogating a variety of genotype-phenotype relationships.
Results
Landmark-free morphometrics
Current approaches to phenotyping are particularly problematic for body structures with complex form and pattern, where spatial information is discretized into landmarks - anatomical loci that are homologous in all individuals being analysed (Figure 1a-c)24,25. Analysis of phenotypic variation has additional challenges owing to the inability to perform precision alignment of complex two- and three-dimensional shapes, which cannot be achieved through simple schemes that account for rotation, scaling, and shear transformations 9–11.
To overcome these problems, we have developed an alignment tool that admits a landmark-free method to measure the physical totality of all traits in a body sub-system. Choosing the wing of Drosophila melanogaster as the prototype sub-system, the landmark-free method is comprised of four steps (Figure 1d-f). First, each wing is imaged by transmitted light microscopy at high resolution (Figure S3b). Second, the boundary of the wing image is accurately detected (Figure S2)26. Third, the boundary of the wing image is computationally mapped to the interior of a fixed-sized disc. The mapping of the boundary to the disc relies on an efficient numerical implementation of the Riemann Mapping Theorem27–30. In particular, the map is conformal, preserving the shape of the image, locally, by preserving angles, while manifestly distorting areas (Figure S4). This feature of the approach is both a strength and a limitation, down-weighting the effects of variation in boundary shape, and up-weighting the effects of the pattern of hairs and veins in the interior of the wing (Figure S4j,k). Fourth, mapped images are globally registered to one another (Figures 1e-f and S4l), since disc-mapped wings vary in their orientation and region of focus (the central point in the disc). These misalignments are spanned by the space of conformal maps of the disc onto itself, which can be optimized to produce a global registration of the images, as shown in Figure 1f (further details can be found in Methods). We can thus generate boundary and bulk registered ensembles of wing images, whose variation we can study at single-pixel resolution in a landmark-free manner.
We imaged wings from a highly outbred population of wildtype Drosophila. This population was founded from 35 inbred strains collected worldwide, which were then blended together for two years to ensure substantial genetic variation. We visualized the quantitative variation in the ensemble of images at the single-pixel resolution, measured as per-pixel information entropy (Figure 1g)31. Entropy is a measure of the uncertainty, which here is based on variations in image intensity determined on a per-pixel basis32. Regions of higher entropy straddle the longitudinal veins, indicating that the positions of these veins along the anterior-posterior (AP) axis vary slightly between individuals; less than a single vein width across the ensemble of wings. However, the proximal region of the L1 vein shows considerable variation, as do some other regions near the hinge. In addition, the cross-veins substantially vary between individuals along the proximal-distal (PD) axis. The intervein region between L1 and L2 veins and the intervein regions near the distal tip also show variation owing to variation in wing hair location. A Procrustes analysis of the same wing ensemble is limited to the variation in landmarks alone, with the intersection of L1 and L2 veins being the most variable (Figure 1h and S1c). An anatomical description of the Drosophila wing can be found in Figure S3c-d.
The wings of male and female Drosophila differ in their size, shape, and pattern (Figure S5a-b), providing a setting to compare the landmark-based and landmark-free approaches to distinguishing two populations. By Procrustes landmark analysis, the intersection of L1 and L2 veins shows the greatest sexual dimorphism, with substantial non-overlap between male and female (Figure 2a). The intersection of L1 and L5 veins also shows sexual dimorphism. A very different perspective is revealed using our landmark-free method (Figure 2b). The relative entropy of pixel intensities across the two ensembles demonstrates that sexual dimorphism is not restricted to the landmarks. In particular, the proximal and distal regions of the L1 vein are variable between male and female. The L3 vein proximal to the cross-vein also shows considerable variation. Strikingly, the regions showing sexual dimorphism do not spatially overlap with the regions showing variation within each wildtype population. In summary, this comparative analysis demonstrates the remarkable sensitivity of our landmark-free method to make precise measurements of the variational properties of wing form, as well as demonstrating the incomplete picture of variation provided by landmarks alone.
A Dominant Mode of Natural Phenotypic Variation
We note that the space in which phenotypes are parameterized via our landmark-free approach is vast. The intensity of each pixel in the space of disc-mapped images is identified with a unique dimension (Figure 2c). Therefore, an individual image is a single point in this phenotype space of ~30,000 dimensions (pixels). By contrast, the standard landmark-based parameterization of the wing defines phenotype in 24 dimensions - the x and y locations of 12 landmarks. By way of illustration, we portray an ensemble of wildtype wings populating a three-dimensional slice of this vast phenotypic space (Figure 2c). The dominant mode of variation in the population is indicated as the “long-axis” of the cloud of points. To find the major axes of variation within the 30,000-dimensional space, we performed principal components analysis (PCA) on male and female wings from the outbred stock raised under standard environmental conditions. PC1 and PC2 axes account for 68% of the total variation, with 66% of the variation aligned along PC1 (Figure 2d). Strikingly, male and female wings are separated along PC2, suggesting that the dominant mode of variability is not sex-specific. This dominant mode of variability is also not congruent with left-right patterning (Figure S5d), variation in wing size (Figure S5e), or variation in imaging conditions across the ensemble (Figure S5f). We mapped pixels whose variation is most aligned with PC1 and found vein positions are most prominent, particularly in the proximal region (Figure 2e). We also performed PCA on the Procrustes landmark data from the wildtype ensemble and observed that sexual dimorphism is the dominant source of detected variation (Figure 2f). Strikingly, the dominant mode made manifest in our landmark-free analysis is undetected by a landmark-based method (Figure S5c), demonstrating that novel, even dominant, modes of variation are rendered detectable by our more holistic analysis.
Genetic and Environmental Variation
To investigate the origins of this dominant mode of variation, we performed landmark-free analysis on a published dataset of wing images from a wildtype Samarkand strain and from animals heterozygous for weak mutations in signal transduction genes33. Specifically, these genes act in the Notch, BMP, and EGF Receptor (EGFR) pathways, which are required for proper growth and patterning of the developing Drosophila wing15. Note that all of the mutations are considered to be recessive to wildtype for wing phenotype, and thus the heterozygous animals do not exhibit easily discernible differences in wing form from wildtype. Since stronger effect mutations produce phenotypes rarely seen in a natural population, the weak nature of these genetic perturbations is crucial to our investigations into the origins of natural variation.
Mutant wing images were subjected to our landmark-free analysis. The high-dimensional phenotype space occupied by each mutant population was compared to the reference wildtype population. This was done by finding the centroid (centre of mass) for each population’s cloud of points, which constitutes its average phenotype. We then considered the line joining each mutant centroid and the reference wildtype centroid, which represents the difference between the average mutant and wildtype phenotypes. For illustration, a simplified three-dimensional example is shown in Figure 3a. The spatial maps of the mutant-wildtype differences in pixel intensities are revealing (Figure 3b-e), and they show how our method can detect even subtle effects (see Methods). Mutation of the Egfr gene causes L3 and L4 veins to be slightly more distant from one another, whereas mutation of Star, which also acts in the EGFR pathway, has the opposite effect. The posterior cross-vein is also affected by these mutants. Both mastermind (mam), a component in the Notch pathway, and thick veins (tkv), a component in the BMP pathway, have common effects in that L2 - L4 slightly shift anterior. However, tkv shows evidence of subtle vein thickening, which is an attribute of the homozygous mutant phenotype. We conclude that the landmark-free method is sensitive enough to robustly detect phenotypic differences in mutant alleles that are historically considered to be completely recessive to wildtype.
How does the phenotypic variation in the mutants compare with the phenotypic variation in the outbred population? We measured the alignment between the top four vectors of variation in the outbred population (PC1-PC4), and the vectors connecting Samarkand and mutant centroids (Figure 3a). The cosine of the angle θ between each PC vector and each centroid-centroid vector is reported in Figure 3f. There is a high degree of alignment between the dominant mode of variation (PC1) in the outbred population and almost all of the mutants (cos(θ) → 1 as θ → 0). With the exception of the male population of Star heterozygotes, the degrees of alignment are far above those expected by chance due to sample size effects or artefacts in the imaging and analysis pipeline (Figure 3g). As such, the mutant phenotypes statistically align with a single direction, which is identified as the direction of dominant variation in an outbred wildtype population. We note that the mutants affect distinct signalling pathways, which play significant and separate roles in wing development, thus highlighting the nontrivial nature of the statistical alignment we observe. Taken together, these small-effect genetic perturbations – both the recessive mutations and the variants in the outbred populations – have a congruent effect on phenotype.
As suggested by Waddington, other types of perturbation might have similar effects. To test this, we raised the outbred wildtype population at different temperatures from the standard 25°C. As previously observed, increasing temperature causes a decrease in wing size (Figure S5g,h). The differences between the average wing phenotypes at different temperatures were spatially mapped (Figure 4a-b). We also raised the outbred population on nutritionally limited food, which decreases wing size (Figure S5i,j)34. The average wing phenotype due to nutrient limitation also reveals robust spatial variation (Figure 4c). Remarkably, there is a strong statistical alignment of the temperature and dietary phenotypes with the dominant mode of variation within the outbred population raised under standard environmental conditions (Figure 4d-e). Thus, small-effect environmental perturbations are also constrained in their impact on wing phenotype, aligning with the previously identified direction of congruent effects.
Geometric Analysis of Phenotypic Variation
Why are some perturbation phenotypes, for example, Star mutant male wings, less aligned to the primary mode of natural phenotypic variation than others (Figures 3f and 4d)? Either phenotype is less constrained for some perturbations or some underlying feature of the data was not being considered. Here, we demonstrate that a geometric feature of the data alone explains the observed variations in alignment. In particular, variation in the distance in phenotype space separating two wing populations accounts for the variation in the observed degree of alignment.
We consider a situation where wing phenotypes of a population lie a small distance, σ, away from the axis of primary variation (PC1) of a reference group (Figure 5a). We define R to be the centroid-centroid distance between the two groups, the strength of the phenotypic difference, and θ to be the angle between the axis of primary variation of the reference group and the vector connecting the centroids of the two groups, a measure of alignment. The three quantities are related through a simple trigonometric relation, , which mathematically embodies the intuitive fact that if small-effect perturbations can only access a small region of phenotype space perpendicular to the axis of primary variation, then the measure of alignment must increase with the strength of the perturbation. This would mean that σ/R → 0 as R increases (Figure 5a). Strikingly, this relation is observed for all of the environmental and mutant perturbations, analysing bootstrapped subsamples of the data (Figure 5b-c). The results suggest that for all of the genetic and environmental perturbations tested, they generate minor phenotypic deviation orthogonal to the primary mode of natural phenotypic variation. Most variation manifested by the perturbations align with the primary mode of natural variation. For example, the departure of Star mutant male wings from alignment with the primary mode of variation (Figure 3f) can be explained by the weak phenotypic difference they have, as demonstrated by the short distance between Star and wildtype centroids (Figure 5b). In summary, the phenotypic variation caused by weak genetic and environmental perturbations is constrained along a single linear manifold that aligns with the phenotypic variation seen within every population. Together, this indicates the presence of powerful dimensionality-reduction in the developmental program of the Drosophila wing.
Discussion
We observe that phenotypic variation in the Drosophila wing, generated by genetic and environmental variation, populates a single one-dimensional structure in phenotype space, evidence of the strong dimensionality reducing properties encoded in its developmental program. This direction emerges as an integrated and spatially-extended feature across the wing that is not encoded in the spatial fluctuations of a small number of human-specified landmarks. This single mode of variation primarily affects the position of wing veins along the AP or PD axes, particularly the position of the L1 – L4 veins close to the hinge. Final vein position can be affected by two possible developmental processes. One, thick proveins are refined into narrow veins during pupal development, allowing for some wiggle as to where the veins reside15. Two, the number, size and shapes of intervein epidermal cells might vary, and after expansion, separate neighbouring veins by different distances35–38. These effects could be exacerbated in the proximal wing during hinge contraction39–41. Notably, vein thickness and shape are not variable within the manifold of phenotypic variation.
We postulate that it is the continuous, landmark-free, representation of phenotype that permitted the detection of this novel structure. Our landmark-free method can be applied to a two-dimensional image of any sub-system of a body, no matter how complex. We chose the Drosophila wing because its flattened nature makes two-dimensional imaging quite straightforward. However, our method will work for any closed body sub-system subjected to 3D surface imaging via laser scanning or computer tomography. This will allow quantitative landmark-free phenotyping of skeletal structures, teeth, and soft organs such as the brain in living and dead specimens.
More generally, our results highlight the complex and integrated nature of the G2P map in the Drosophila wing. While its origins remain unclear, the compactification of the accessible portions of phenotype space, generated through the dimensionality-reducing properties of development, generate a near-continuous spectrum of phenotypes, which nature can select from and evolve.
Author contributions
Vasyl Alba: Conceptualization, Experimental design, Methodology, Data acquisition, Analysis, Writing
James Carthew: Experimental design, Data acquisition, Analysis
Richard Carthew: Conceptualization, Supervision, Funding acquisition, Methodology, Writing, Project administration
Madhav Mani: Conceptualization, Supervision, Funding acquisition, Methodology, Writing, Project administration
Competing Interest Statement
The authors have declared no competing interest.
Methods
Fly Husbandry
Cornmeal-molasses food was used for standard husbandry. Inbred lines were kept in bottles or vials. The outbred population was kept at 25° C in an 8.8 litre population cage. The size of the cage and food availability limited the population size to 1,000 - 2,000 adults per generation. Populations were raised in Percival incubators. The temperature of incubators was monitored daily. Fly bottles or vials were monitored for moisture levels. Any condensed moisture on the inside of the container walls was absorbed using Kimwipes. Incubators were monitored for mite infestations using mite traps checked daily.
Construction of the Outbred Wildtype Population
A collection of 35 wildtype Drosophila melanogaster stocks were obtained from the Bloomington Drosophila Stock Center (BDSC). These inbred stocks originated from founder individuals isolated from around the world (Excel File 1). Fourteen stocks were established in the 20th century from four continents plus the island of Bermuda: 1 from Africa, 3 from Asia, 1 from Bermuda, 4 from Europe and 5 from North America. The other 21 stocks were established in 2003 as isogenic lines from the Drosophila Genetics Resource Panel (DGRP). Founders of the lines were isolated in the area of Raleigh, North Carolina, USA.
Six of the DGRP isogenic stocks were randomly paired with one another, and 20 males from one stock were mated with 20 females from the other stock (Excel file 2). The offspring from these 3 crosses were then used in addition to the remaining 29 inbred stocks for a new round of pairwise mating - 16 F0 crosses in total (Excel file 2). The assignment of stocks to pair was made randomly, as were the assigned sexes used in each paired mating. Again, 20 males from one were mated with 20 females from the other. The offspring from these 16 crosses were used for another round of pairwise mating - 8 F1 crosses in total (Excel file 2). The assignment of stocks to pair was made randomly, as were the sexes used in each mating. For these crosses, 50 males from one were mated with 50 females from the other. The offspring from these 8 crosses were used for an F2 round of pairwise mating - 4 crosses in total (Excel file 2). The assignment of stocks to pair was made randomly, as were the sexes used in each mating. For these crosses, 100 males from one were mated with 100 females from the other. The offspring from these 4 crosses were used for an F3 round of pairwise mating - 2 crosses in total (Excel file 2). The assignment of stocks to pair was made randomly, as were the sexes used in each mating. For these crosses, 300 males from one were mated with 300 females from the other. The offspring from these 2 crosses were used for a final round of mating. For this cross, 800 males from one were mated with 800 females from the other. Mating was performed in a population cage. The population cage was 8.8 litres in volume. Offspring from this final cross constituted the outbred stock, the net result of the systematic mixing of 35 distinct populations. The outbred stock was then propagated in population cages for another 50 generations. The purpose of this was for the population to approach equilibrium in allele frequencies.
Temperature and Diet Perturbations
Twenty-five mating pairs of outbred adults were mated for two days in a bottle, and offspring were raised at a uniform temperature of 18°C, 25°C, or 29°C in Percival incubators. Standard cornmeal-molasses food was used. To compare the effects of rich versus limited diet, 25 mating pairs of the outbred population were mated for two days in a bottle, and offspring were raised on food with low yeast content. We used the food recipe described in34. The low-yeast food recipe is: 1 L food contains 20 g dried bakers’ yeast (Bakemark), 100 g sucrose (Sigma), 27 g Bacto Agar (Difco), 3 mL propionic acid (Sigma), and 30 mL 10%(w/v) Tegosept in ethanol (Sigma).
Wing Mounting
Young adults were sorted by sex and stored in 70% (v/v) ethanol for a minimum of 24 hours. Flies were discarded if they had a torn or wrinkled wing. A single fly was dissected in a few drops of 70% ethanol solution on a microscope slide. Wings were removed by clasping the wing joint with a pair of forceps and pulling the wing from the body, using a different pair of forceps to hold the body in place. Both left and right wings were dissected, and the carcass was discarded. Both wings were then placed in a small volume of 70% ethanol solution on the microscope slide ventral side down. A few drops of 70% (v/v) glycerol were added to the wings/ethanol on the slide. If the alula was folded onto the dorsal side of a wing it was unfolded or removed. A coverslip was placed over the two wings, and any bubbles under the wings were removed by gently pressing down on the coverslip with a pair of blunt forceps. Only the left and right wings from one adult were mounted per slide.
Microscopic Imaging
Imaging was performed using a Zeiss Axioplan microscope. A 4x 0.1NA Plan Apochromatic objective was used and the Optivar was set to 1.25x magnification. The camera adaptor magnification was 0.5x. This gave a total magnification of 2.5x. The condenser was focused and centred on a wing specimen, and then the stage was moved in order to define shading correction at a neutral point with no slide or wing in the image. Specific shading correction was defined before any images were taken in an imaging session. Each wing had two images taken; one with unfiltered light from the microscope’s halogen lamp at 100% power, and one with the green filter in place between the lamp and specimen. The slide remained in the exact same position for each of the two images. After one wing was imaged, its partner wing was then imaged. Wing images were taken so that the anterior side of the wing faced downwards in the image so as to eliminate confusion between right and left wing labelling. If either wing appeared damaged or if dust or debris marked either wing, we rejected that wing and its partner wing. For some female wings, the specimen was too large to be captured in one image. For these, we captured a portion of each wing in one image and then moved the stage to capture the rest of the wing in a separate image. The two images had sufficient overlap that they could be computationally stitched together post-imaging.
Images were captured as CZI files with a Zeiss Axiocam ERc 5s attached to a Dell XPS 8500 computer using ZEN Blue 3.1 imaging software. Each image had dimensions of 2560 x 1920 pixels, and each pixel intensity was recorded in 8-bit RGB mode. Each CZI file was converted to a TIFF file using the Bio-Formats 6.5.1 plugin for Matlab. Exposure time was 0.3 ms for white-lit images and 0.4 ms for green-lit images. Colour balance was set to auto. The intensity level was set at 100%. This ensured that the background was not saturated, i.e. background pixel intensity was not maximal. The average background pixel intensity was reproducibly between 210 and 215 for almost all wing samples (Figure S5e). For those wing samples that were captured using two overlapping images, we used the Photomerge algorithm in Adobe Photoshop CS3 with default settings. Although both white-lit and green-lit images were captured for each wing, we only used the green channel of the green-lit RGB files for further analysis.
We analysed both left and right wings for each individual. The datasets generated for the following conditions were: 18°C (169 females and 71 males), 25°C (202 females and 202 males), 29°C (185 females and 208 males), 25°C limited diet (216 females and 219 males).
Image Analysis of Genetic Mutants
We used a publicly available image database of Drosophila melanogaster wings that had been used for landmark analysis by others [33]. Briefly, P-element insertion mutants in the Epidermal growth factor receptor (Egfr), mastermind (mam), Star (S), and thick veins (tkv) genes had been extensively backcrossed into the Samarkand wildtype strain in order to introgress their genetic backgrounds with Samarkand. Each P-element mutant is described as hypomorphic when homozygous, meaning they are weak loss-of-function mutations. They were crossed to the Samarkand strain to generate heterozygous mutant offspring. These were the wings that had been imaged in addition to fully wildtype Samarkand wings, and all were deposited in a public database42.
We rejected some images due to quality issues that included but were not limited to dust, non-homogeneous illumination, damage to the wings. The remaining images were used for landmark-free analysis: Wildtype (214 females and 200 males), Egfr (231 females and 236 males), mam (212 females and 260 males), S (230 females and 222 males), and tkv (232 females and 232 males).
Landmark-Based Morphometries
Landmarks are defined as anatomical loci that are unambiguously identifiable and are homologous in all individuals being analysed. In the case of the Drosophila melanogaster wing, 12 points where wing veins intersect have been historically used as landmarks (Figure S1a). We used the Wings 4 software tool that had been developed specifically to automatically identify the position of the 12 landmarks on each wing. The software fits a spline model of the wing to each picture of the wing. The software and manual can be found at43.
Once the landmarks were identified for each image, the ensemble of landmarks was aligned using a standard Procrustes method44. In the Procrustes analysis, objects are superimposed by optimal translation, rotation and uniform scaling of the objects. Both the placement in space and the size of the objects are freely adjusted. The aim is to obtain a similar placement and size by minimising the Procrustes distance between the objects.
As a hypothetical example, we take a sample triangle and align it with a reference triangle (Figure S1d-g). Once the shapes are on top of one another, the sample shape is uniformly scaled to match the area of the reference shape. The last step is to rotate the sample shape to best-align with the reference. These steps are performed until the average distance between the landmarks (vertices of the triangle) of the sample are minimally distant to the landmarks of the reference.
A measure of the goodness of the superimposition is the Procrustes distance: where (x, y,…) and (xref, yref,…) are coordinates of the landmarks of the sample image and reference image, respectively. There are 12 landmarks on the Drosophila wing, thus there are 24 x and y coordinates that represent each wing. In the case of triangles, (Figure S1d-g). If two shapes are exactly the same but have different orientation and position, the Procrustes method will perfectly align them (d = 0) (Figure S1h-i). For the Drosophila wing landmarks, we used the Wings 4 software to perform the Procrustes alignment of the landmarks.
Since there are 24 x and y coordinates that represent each wing, one can think about each wing as a vector in 24-dimensional space. One can perform Principal Components Analysis (PCA) on these vectors for an ensemble of wings. As a result, one can get directions of the largest variation in landmark positions, but there will not be any information about the positions of the veins or other parts of the wing that have no landmarks. We performed PCA on the landmark-based data using the pca function from the Dimensionality Reduction and Feature Extraction toolbox in Matlab.
Landmark-Free Morphometries
The main concept of the method is to treat every pixel in a wing image as a variable, a trait, with a discrete intensity value. Hence, the higher the resolution of the image, the greater the number of variables. The resolution of wing images we captured are such that there are 100,000 pixels for each wing. However, the pixels are not landmarks in the traditional sense. Traditional landmark-based methods globally align identifiable anatomical loci from homologous objects of different individuals. Then, the variation in the landmark coordinate position is measured for each landmark. Our landmark-free method globally aligns the entire image from homologous objects of different individuals. Then, the variation in intensity for each pixel coordinate is measured.
Homologous body structures from different individuals can have different shapes. This can apply not only to individuals from different species (i.e. forelimb of bat and horse) but also individuals from the same species. This is why the field of morphometrics has reduced the complexity of the continuum of shape to a discretized proxy, i.e. landmark-based Procrustes analysis then can estimate shape variation.
Our approach is to use a conformal map to map all homologous body structures onto the same shape, in this case, a disc of fixed size. Although we apply the approach to one body structure, the Drosophila wing, in principle it can be applied to any shape. This could be a simple 2D shape like the wing or the closed surface of a complex 3D shape such as a tooth, brain, or another body part.
Wing Boundary Identification
Although the background intensity of all images was highly consistent across ensembles (Figure S5e), there were minor differences, including uneven illumination across the field of view. This variability was most problematic with the wing images from the genetic database42. To correct these issues we apply contrast-limited adaptive histogram equalization (CLAHE) to our images (Figure S3a)45.
We use an ilastik segmentation model to identify pixels that belong to the wing bulk, veins and background (Figure S2a). The machine learning model is trained on 25 wings and after that is applied to all wings across all ensembles to remove systematic trends owing to variations in segmentation. The output of Ilastik comprises four layers (Figure S2b). The segmentation output requires further cleaning that is done in a custom-made Matlab script. In particular, we use knowledge about the fact that background is only outside of the wing, and wing bulk is surrounded by veins, to clean up the segmentation (Figure S2c). Once the segmentation is cleaned, we use a watershed algorithm to produce the boundary of the wing (Figure S2d). Watershed algorithms find catchment basins in an image, treating intensity as a height of the landscape. Since wings were detached from the body by breaking the hinge region with tweezers, each wing has a slightly different hinge due to experimental manipulation. Therefore, we use two morphologically identifiable landmarks, the humeral break and the alula notch (stars in Figure S2d). These landmarks are manually selected for each segmented wing image, and a script automatically defines the line between the two points as the proximal boundary. This defines a precise and repeatable way to delete the hinge. Area of each wing is measured as pixel number inside the wing boundary. Distribution of outbred group wing areas is shown in Figure S5g-j.
Conformal Mapping
One feature of a conformal map is that it is possible to map any closed region onto another closed region if the shape is approximated as a complex polygon. For example, when we approximate the boundary of the Drosophila wing as a 100-point polygon, we can map the whole wing onto a unit disk. We distribute these points on the wing boundary with a density that is inversely proportional to the local curvature of the wing boundary (Figure S2e). Therefore we compute 2-dimensional curvature for every point of a segmented wing boundary using the line-curvature2D package46. Once we have curvature for every point, we compute and plot the cumulative curvature and distribute points equidistantly along the cumulative direction. The cumulative curve is monotonous; therefore, we can find the position of the vertices on the boundary. This approach minimizes the difference between polygonal representation and the real boundary for a given number of points.
Once a polygonal representation is made of a wing boundary, Schwarz-Christoffel mapping generates a map from the interior of the polygon onto a unit disc. The conformal map scales each local region homogeneously, but the scaling constant depends on the position. In the case of the Drosophila wing, which is approximately the shape of an ellipse, the bulk of the wing is minimally distorted, while regions far from the centre are more distorted. For instance, several peripheral pixels may be mapped onto one pixel of the unit disc (Figure S4k). Particular distortion depends on the shape of the wing, therefore if we would like to decouple shape from a pattern, this feature comes in handy.
We use the Schwarz-Christoffel Toolbox for Matlab47 to map each segmented wing onto a unit disc that has a diameter of 200 pixels (Figure S4i). Schwarz-Christoffel conformal mapping requires only the boundary and centre-point (Figure S4b) of the shape. The shape’s boundary becomes the circumference and the shape’s centrepoint becomes the origin. This is done individually for all of the segmented wings in an ensemble.
Note that the unit disc is the same area for all segmented wings. A wing boundary is a polygon in a complex space. Therefore, conformal mapping a segmented wing image onto the unit disc depends on the size of the segmented wing image. However, the target (the unit disc) has a fixed size, and so it may be the case that several pixels in the wing image may be mapped onto one pixel in the disc. Consequently, the intensity of the target pixel is an average of the wing image pixels that map to it. For the imaging resolution that was used, this happened most often for peripheral pixels (Figure S4k).
The Riemann mapping theorem implies that there is a biholomorphic (i.e. a bijective holomorphic mapping whose inverse is also holomorphic) mapping f from a non-empty simply connected open subset, U, of the complex plane onto the open unit disk, .
The Schwarz–Christoffel formula is a recipe for a conformal map f from the upper half-plane (the canonical domain) to the interior of a polygon (the physical domain). The function f maps the real axis to the edges of the polygon. If the polygon has interior angles α1, α2, α3…, then this mapping is given by where C is a constant, αj are interior angles at the vertices, and zj are pre-images of the vertices, i.e. dots on the real axis. They obey inequality z1 < z2 <… < zn = ∞. For wing data, the unit disc contains 31,416 pixels, which is smaller in number than the ~100,000 pixels in each segmented wing image. The reduction was achieved by reducing the weight of the peripheral pixels and as a result, the shape of the wing has a lower weight.
Conformal Map Alignment
Since wing shapes and orientations are variable, the mapped wings must be globally aligned with one another. To align the mapped images, we use the remaining freedom, which is a rotation of the disc, plus we use the movement of the origin (Figure S4j). This freedom is an automorphism of the unit disk, where θ is a rotation angle and α = g-1(0) is a movement of the origin. We perform an independent parameter sweep of angle and displacement for one mapped wing image to obtain maximal cross-correlation between it and a reference wing disc. This operation is repeated for all of the other mapped wings, aligning each one to the same reference wing disc. We wrote a script that uses the Geometric Transformation Toolbox in Matlab to perform this procedure.
Since we are comparing variation within a group as well as variation between groups, we randomly choose one mapped wing to be the reference for an entire experiment. There is only one reference wing disc for all groups within the experiment varying diet and temperature (G_25c_high_F_139_R). There is only one reference wing for all groups within the experimental data comprising the genetic mutants (G_samw_lei4x_F_110_L).
Left and right wings have a different orientation. We use the function fliplr from Matlab to flip all images of left wings prior to conformal mapping. Once flipped they are treated in the same way as right wings, but we store information about their chirality. To determine if left and right wings are different in shape or pattern, we computed the Kullback-Leibler divergence (for details see SI.4.14) between left and right ensembles for the outbred group and found no difference. We also plot PC1 vs PC2 for the outbred group and use colour labels for chirality (Figure S5d). We find no correlation between the score for PC1/PC2 and chirality. These analyses indicate that there is no statistical difference between the left and right wings. All subsequent analysis aggregates both left and right wing data.
Radon Transformation
The Drosophila wing is comprised of a sparse pattern of dark veins and lighter inter-vein compartments. We anticipate that much of the variation between wings will be detected as differences in vein thickness, position, and their angle relative to the body axes. A Radon transformation of a density function f(x,y) produces a function Rf(L) = ∫Lf(x)|dx| defined on a space of all lines L. For 2D images, a Radon transformation generates sinograms with coordinates of angle and R (Figure S6a,f-k). Since veins resemble lines, comparing two lines that differ by an angle is more sensitive to Radon-transformed data (Figure S6b-e). For this reason, we carry out all further analysis of the data with Radon-transformed images of aligned wing discs, obtained using the radon function in Matlab. However, when we need to present images of a wing, we use an inverse transformation iradon in Matlab.
Analysis of Pattern Variation Within a Group
Once all images are aligned to a reference on the disc, the remaining variability reflects biological variation. We use 8-bit grayscale images, which means that each pixel has intensity ranging from 0 to 255. Therefore, a wing image with N pixels can be represented as a single vector in discrete N-dimensional space, or to be more precise it is a vector in an N-dimensional cube ([0,255]N). For a group with M number of wings, the group can be represented as a set of M vectors in N-dimensional space. Therefore, we can use all the tools from linear algebra.
We can analyse variability within a group since each group of individuals is subject to natural variation. We analyse this variation using PCA, which finds the directions of greatest variation within the group. Each principal component or PC is a unit vector in the same N-dimensional space as the wing discs comprising a group. We use the pca function from the Dimensionality Reduction and Feature Extraction toolbox for Matlab for all PCA-related computations.
We can also analyse variability within a group using Entropy. Each pixel at a fixed position may have different intensities for wings in an ensemble. If the pixel belongs to a region that has almost no variability in intensity, then it will have small entropy, but in the regions where there is pattern variability, the entropy will be larger. As an example, we can consider vein motion, which means that the position of the vein along either AP or PD axes varies between wings. If a pixel at a fixed position has identical intensity values for all aligned images, then that pixel has zero entropy. If a fixed-position pixel is within a wing vein for some but not all aligned images, then it might have larger entropy. In the intervein regions of wing images, the intensity of fixed-position pixels often varies slightly, so their entropy will be small but nonzero. We use the Kozachenko-Leonenko31 entropy estimator for entropy where d is the dimension of x and cd is the volume of the d-dimensional unit ball cd = τd/2/Γ(d/2 + 1) for Euclidean norm, ρk(i) is the distance of the i-th sample to its k-th nearest neighbour, and ψ(x) is digamma function.
Analysis of Pattern Variation Between Groups: Entropy-like Approach
When there are two or more groups and we would like to compute the variability between them, we can estimate the Kullback-Leibler divergence, DKL or relative entropy. Let’s consider two distributions P = P(X) and Q = Q(Y), the former one is interpreted as a real distribution (postulated prior probability) and the latter one is an assumed distribution that is measured at the experiment. The value of this functional is equal to the amount of information that is not accounted if Q be taken instead of P,
We use the 2-nearest neighbour non-parametric Kozachenko-Leonenko estimator [48] for the Kullback-Leibler divergence, where ρk(i) is the distance from xi to its k-th nearest neighbour in{Xj}j≠i, and vk(i) is the distance from xi to its k-th nearest neighbour in {Yj}.
Analysis of Pattern Variation Between Groups: Centroid-based Analysis
Another method to compare two or more groups is by centroid-based analysis. For one group containing Z wings, the group can be represented as a set of Z vectors in N-dimensional space. The centre of mass or centroid of the set can then be computed. The centroid can be thought of as the Mean Wing of the group (Figure S7a-b). Since we have a large number of wings for each group (Z > 100), the Mean Wing is a statistically robust representation of the group (also we used bootstrap to check robustness, see next section). We perform all manipulation for radon images of the wings and transform everything back with its inverse transformation.
We compute the Mean Wing for each group of wings, and then we can calculate the pairwise difference between Mean Wings of different groups. A pairwise difference is a vector that shows how one Mean Wing transforms into another Mean Wing. For example, when we say that there is a direction from Mean Wing A to Mean Wing B we mean that there is a vector, Δ, that generates Mean Wing B when added pixel-wise to Mean Wing A: B = Δ + A. If we normalize this vector, n = Δ/|Δ|, we get a unit vector that points from the reference group to another group (i.e., wildtype group to genetic mutant group). We can compare the direction of a unit vector with the direction of any PC vector from PCA analysis of a given group. This is done by computing a scalar product between the unit vector and the PC vector:
Bootstrapping and Shuffling
We have to check that the findings of the analysis are statistically robust. This requires that the populations are well-sampled, i.e. we have enough images so that the in-sample variance of the mean wing is small, and as a result that measured direction between populations is stable and close to the ideal direction that would be achieved if we had an infinite number of wings. For this approach, we use the bootstrap method that requires that we randomly draw subsets of wings that have a size of 50% of the ensemble. We repeat this procedure for each ensemble individually, so we do not mix wings that correspond to different populations. For pairs of such samples, we compute mean wings and the directional vector between them. We found that the numerical value of the cos θ is stable, and the difference between sampled in this way cos θ and value that is computed for whole populations is extremely low (few per cent of the corresponding values), suggesting that it is well estimated.
The second important check is to confirm that the trends we observe are biological in origin and not artefacts of our analysis. We perform a shuffle test. For this check, we construct new populations from images drawn randomly from the entire ensemble, which means that we mix wings from different populations (difference environmental and genetic conditions). We find that for these shuffled populations, a variation of the cosθ is relatively large, and the mean value is only a few per cent of the unshuffled data. This suggests that the observed phenomenon depends on biological labels of the wings rather than artefacts introduced by the method and analysis itself.
1D-Structure of the Observed Data
While the data is embedded in high-dimensional space, it does not imply that the structure of the data is high dimensional as well. The simplest structure of the data that we may have is a one-dimensional cylinder, where the data is distributed along a line with noise in directions orthogonal to it. The simple structure of the data would hint at a simplifying principle that could be modelled and more deeply understood.
The angle between the n and PC vectors resides in an N-dimensional space. For a one-dimensional cylinder, one can compute a dependence of cos θ as a function of R, the distance between points. If the distance between the two Mean Wings is R, then
Thus, we get that , which suggests the presence of a long direction in the data that dominates all other directions of variation. It further suggests that were cosθ ~ R-1, then the noise in the directions orthogonal to the cylinder is constant along it. The simplest explanation for a different exponent would be that noise level increases with distance, and the structure is a cone rather than a cylinder. We experimentally measure the value of angles θ for pairs of bootstrapped centroids, computing and we found that it qualitatively displays a decay as a power of as . Values of α from fitting to an experimental data are reported in Figure S8.
Acknowledgements
We thank Seppe Kuehn for fruitful conversations. This work was supported in part by NSF grant DMS-1547394 (JEC), NSF (1764421, MM and RWC), and the Simons Foundation (597491, MM and RWC). MM is a Simons Foundation Investigator.
Footnotes
↵‡ vasyl.alba{at}northwestern.edu