Automated and customizable quantitative image analysis of whole Caenorhabditis elegans germlines

Abstract Arranged in a spatial-temporal gradient for germ cell development, the adult germline of Caenorhabditis elegans is an excellent system for understanding the generation, differentiation, function, and maintenance of germ cells. Imaging whole C. elegans germlines along the distal-proximal axis enables powerful cytological analyses of germ cell nuclei as they progress from the pre-meiotic tip through all the stages of meiotic prophase I. To enable high-content image analysis of whole C. elegans gonads, we developed a custom algorithm and pipelines to function with image processing software that enables: (1) quantification of cytological features at single nucleus resolution from immunofluorescence images; and (2) assessment of these individual nuclei based on their position within the germline. We show the capability of our quantitative image analysis approach by analyzing multiple cytological features of meiotic nuclei in whole C. elegans germlines. First, we quantify double-strand DNA breaks (DSBs) per nucleus by analyzing DNA-associated foci of the recombinase RAD-51 at single-nucleus resolution in the context of whole germline progression. Second, we quantify the DSBs that are licensed for crossover repair by analyzing foci of MSH-5 and COSA-1 when they associate with the synaptonemal complex during meiotic prophase progression. Finally, we quantify P-granule composition across the whole germline by analyzing the colocalization of PGL-1 and ZNFX-1 foci. Our image analysis pipeline is an adaptable and useful method for researchers spanning multiple fields using the C. elegans germline as a model system.


Introduction
Reproduction in many sexually reproducing organisms requires the formation of haploid gametes. Gametes originate from germ cells that divide and differentiate to generate a germline, which is also known as the "totipotent" or "immortal" cell lineage due to its ability to pass on its genetic information to the next generation (Hubbard and Schedl 2019). Studies of germ cells in multiple systems have revealed molecular mechanisms of germ cell development, function, and maintenance. Over the past several decades, theuse of genetics and cytology has been instrumental for understanding fundamental aspects of germ cell biology.
For germ cell studies, the Caenorhabditis elegans germline provides unique manipulation and visualization advantages Greenstein 2000, 2005). In adult hermaphrodites, there are two complete tube-shaped gonads that each form a Ushape when contained within the adult animal (Hubbard and Schedl 2019). Within the adult hermaphrodite germline, $1000 germ cell nuclei are positioned around the circumference of the tube and are arranged in a spatial-temporal gradient according to developmental stage along the distal-proximal axis. At the distal end of the gonad (pre-meiotic tip or proliferative zone), mitotically-cycling nuclei move proximally until they reach the leptotene/zygotene region that commits them to enter meiosis, the specialized cell division that generates haploid gametes. This entry into meiosis is termed the "transition zone" and the germ cells begin differentiating to form mature oocytes. The transition zone is classically identified by crescent-shaped DAPI morphology due to the polarized active movement of chromosomes; however, in certain mutant situations that affect chromosome pairing or germ cell proliferation, this region with distinct DAPI morphology may be either absent or extended (e.g., hal-2 and syp-1) (MacQueen et al. 2002;Zhang et al. 2012). Following the transition zone, germ cell nuclei enter pachytene stage where chromosomes are no longer undergoing rapid polarized movement and instead assume a cage-like appearance. After pachytene, chromosomes begin the condensation process in the diplotene stage and eventually fully condense to form six DAPIstaining bodies (one for each set of homologs) at diakinesis. This "pipeline" of germ cell development in the C. elegans gonad has enabled the visualization of all stages of germ cell development simultaneously within a single germline, thereby making this model system a powerful tool for cytological approaches.
Cytological studies of the C. elegans germline illuminate key aspects of meiosis, including chromosome pairing, recombination, regulation of DNA damage responses, and apoptosis in gamete production (Garcia-Muse and Boulton 2007;Hillers et al. 2017;. The spatial-temporal organization of the germline can be used to define the timing and/or progression of these events throughout meiotic prophase I in C. elegans (Garcia-Muse and Boulton 2007;Jaramillo-Lambert et al. 2007;Hillers et al. 2017). For example, localization and quantification of foci composed of meiotic recombination proteins established the timing and steps of DNA repair events in the C. elegans germline (Yokoo et al. 2012;Schvarzstein et al. 2014;Woglar and Villeneuve 2018;. Further, quantification of these foci within the germ cell nuclei can indicate changes in the frequency of these specific DNA repair events both in wild type and mutant contexts. Overall, quantitative image analysis of whole germlines has been instrumental in revealing roles for specific genes in meiotic DNA repair (Garcia-Muse and Boulton 2007).
Germ cell differentiation and fertility in C. elegans require the germline to assemble RNA/protein condensates called P granules. These membraneless organelles are perinuclear during the majority of germ cell development and are involved in silencing germline transcription via small RNA pathways (Seydoux 2018;Ouyang et al. 2019;Putnam et al. 2019). For nearly 40 years, cytology and genetics have played critical roles in studies of P granules. In 1982, P granules were originally identified by immunofluorescence imaging that revealed the existence of granules in the C. elegans P cell lineage, which exclusively gives rise to the germline (Strome and Wood 1982). Subsequent highresolution microscopy, live imaging, and fluorescence recovery after photobleaching studies have revealed the components, dynamics, and liquid-like properties of P granules (Seydoux 2018;Ouyang et al. 2019;Putnam et al. 2019). Further, analysis of whole adult gonads stained for P granule structures reveals that some components of these membraneless organelles can undergo morphological changes during meiotic prophase I progression (Uebel et al. 2020), further suggesting possible changes in function during oogenesis.
Although both qualitative and quantitative microscopy approaches are currently used to study the C. elegans germline, the variation in the chromosome morphology throughout the germline and technical variability from affixing dissected gonads affixed to microscope slides have limited high-content automated analysis of germline features. Some powerful computational methods exist for analyzing images taken of specific regions of the germline, such as the distal region where germ cell proliferation occurs (Lee et al. 2016;Crittenden et al. 2019), but these methods are limited to germlines (whole or specific regions) that affix in a straight/linear orientation. Due to limitations of existing automated image analysis methods for non-linear whole gonads, many research groups still rely on time-consuming and laborious manual efforts for quantifying features of germ cells within whole C. elegans germlines. To expedite and expand quantitative image analysis of the whole C. elegans germline, we developed a high-content, automated method using custom algorithms that function with image processing software. This method enables quantitative image analysis of cytological features of single nuclei within non-linear whole C. elegans gonads. Further, this computational pipeline permits analysis and data visualization of individual nuclei based on their position within the germline. Here we describe and validate our computational method by analyzing images of multiple features of germ cell nuclei undergoing meiotic prophase I progression within the context of an entire C. elegans germline.

Caenorhabditis elegans strains and maintenance
Caenorhabditis elegans strains were maintained under standard conditions on nematode growth medium (NGM) plates at 20 C with OP50 Escherichia coli bacteria lawns. All experiments were performed in the N2 background of C. elegans (CGC).

Immunofluorescence
Immunofluorescence was performed as in Libuda et al. (2013). At 18-22 h before dissection, L4 stage hermaphrodite worms were isolated and maintained at 20 C on NGM plates seeded with OP50. Gonads were dissected in 30 lL of egg buffer (118 mM NaCl, 48 mM KCl 2 , 2 mM CaCl 2 , 2 mM MgCl 2 , 25 mM HEPES pH7.4, 0.1% Tween20) and were fixed in egg buffer with 1% paraformaldehyde for 5 min on a Superfrost Plus slide (VWR). Gonads were then flash frozen in liquid N 2 and the cover slip was removed. For germlines stained for DSB-2, RAD-51, MSH-5, or GFP::COSA-1, the slide was placed in -20 C MeOH for 1 min and then was washed in PBST (1Â PBS, 0.1% Tween20). For germlines stained for PGL-1 and ZNFX-1, the slide was placed in -20 C MeOH for 10 min, then in -20 C acetone for 5 min, and then was washed in PBST. Slides were washed 3Â in 1Â PBST for 5 min before being place in block (1Â PBS, 0.1% Tween20, 0.7% Bovine Serum Albumin) for 1 h. 50 lL of diluted primary antibody (in 1Â PBST; see below for individual antibody concentrations) was applied to each slide and allowed to stain overnight in a dark humidifying chamber with a parafilm coverslip. At 16-18 h after application of primary antibody, slides were washed 3Â in PBST for 10 min. 50 lL of diluted secondary antibody (in 1Â PBST; see below for individual antibody concentrations) was applied to each slide and allowed to stain for 2 h in a dark humidifying chamber with a parafilm coverslip. Slides were washed 3Â in PBST for 10 min in a dark chamber and then 50 lL of 2 lg/mL of DAPI in ddH 2 O was added to each slide and incubated for 5 min in a dark humidifying chamber with a parafilm coverslip. Slides were washed in PBST for 5 min in a dark chamber and then were mounted in VectaShield with a No. 1.5 coverslip (VWR) and sealed with nail polish. Slides were maintained at 4 C prior to imaging (as described below). The following primary antibodies were used in this study at the listed concentrations: polyclonal chicken aRAD-51 (1:1000, this study, see below), aDSB-2 (1:5000; Rosu et al.

Antibody production
Our RAD-51 antibody was generated from a His-tagged fusion protein expressed by Genscript from plasmid pET30a containing the entire RAD-51S coding sequence (1385 bp, GenBank accession number AF061201; Rinaldo et al. 1998;Colaiá covo et al. 2003). Antibodies were produced in chicken and affinity purified by Pocono Rabbit Farms.

Image acquisition
Immunofluorescence slides were imaged at 512 Â 512 or 1024 Â 1024 pixel dimensions on an Applied Precision DeltaVision microscope with a 63Â lens and a 1.5Â optivar. To ensure analysis of the highest resolution germline images, we imaged the top $quarter of the germline along the dorsal-ventral axis that encompassed whole nuclei closest to the coverslip, but our pipeline can be used for analysis of gonads imaged through entire dorsal-ventral axis. Images were acquired as Z-stacks at 0.2 lm intervals and deconvolved with Applied Precision softWoRx deconvolution software.

Gonad Analysis Pipeline
Below is a detailed section describing the method. A step-by-step protocol published with the manuscript is available as Supplementary File S1. For the latest step-by-step protocol of this method, please go to the publication section of www.libudalab. org. The ability to resolve foci or cellular features using this protocol depends on the microscopy method used to capture the images. For this study, widefield microscopy combined with deconvolution was used to generate the gonad images for a resolution limit of 200 nm (see above "Image Acquisition" method section). To resolve objects less than 200 nm apart with this protocol, users will need to use superresolution microscopy techniques, such as structured illumination microscopy (SIM), stochastic optical reconstruction microscopy (STORM), or stimulated depletion microscopy (STED).

Identification of nuclei within whole gonad images
Three-dimensional images were tiled using the Imaris Stitcher software (Bitplane) or the Grid/Collection Stitching plugin in FIJI with regression threshold of 0.7 (this value was raised or lowered depending on the stitching results) (Preibisch et al. 2009). If images were not accurately aligned by the Imaris Stitcher algorithm, they were manually adjusted before proceeding with analysis. Individual nuclei within stitched gonads were identified by DAPI as Surface objects. When using DAPI staining to define Surface objects, the changing morphology of nuclei within the germline required different sets of parameters to be used. Nuclei spanning from the distal premeiotic tip through the final 5 rows of pachytene were defined using Smooth 0.15, Background 3.5, Seed Point Diameter 2-3, and Volume Filter 8-55. Late pachytene nuclei (nuclei in the 5 rows preceding diplotene) were defined using Smooth 0.15, Background 4, Seed Point Diameter 3-4, and Volume Filter 10-50. Manual thresholding and specific values for Seed Point Diameter and Volume Filter were defined for each gonad within the indicated ranges. Defined Surfaces were then split to designate individual nuclei using the Imaris Surfaces Split module. Nuclei that were either partially imaged or overlapping with another nucleus were eliminated from analysis.

Identification of SYP-1 surfaces in whole gonad images
In 3D stitched gonad images (see "Identification of nuclei within whole gonad images", above) Individual SYP surfaces were defined using Absolute Intensity (enabled), Smooth (0.22), Background (N/A), Seed Point Diameter (N/A), and Volume Filter (deleted surfaces less than 0.5 lm). If multiple individual surfaces were generated to represent the SYP-1 staining of a single given nucleus, then these surfaces were manually unified.
Quantification of DSB-2 normalized mean staining intensity DSB-2 mean staining intensity per nucleus was calculated in Imaris following definition of single nuclei as surface objects using DAPI signal (see "Identification of nuclei within whole gonad images" section). As image acquisition settings differed between imaged germlines but were consistent within the same germline, the DSB-2 mean intensity of each nucleus was normalized by dividing the mean intensity of each nucleus by the highest mean intensity among nuclei within a gonad.

Quantification of meiotic recombination foci
RAD-51, MSH-5, and GFP::COSA-1 foci were defined from stitched whole gonad images (see "Identification of nuclei within whole gonad images" section) using the "Create Spots" tool in Imaris (Bitplane) with the settings Estimated XY Diameter 0.1, Model PSF-elongation 1.37, and Background Subtraction enabled. To determine the number of RAD-51 foci per nucleus by determining based on proximity of defined Spots to Surfaces, we used a custom "Find Spots Close to Surface" MATLAB module (Threshold value 1; see "Data and Code Availability" section for link to download module). The number of SYP-1 associated MSH-5 or GFP::COSA-1 foci per nucleus was also determined using the "Find Spots Close to Surface" module (Threshold value 0.1).

Quantification of PGL-1 and ZNFX-1 foci
PGL-1 and ZNFX-1 foci were defined as Surface objects in Imaris (Bitplane) with the settings Smooth (Not enabled), Background 0.513, Seed Point Diameter (Not enabled), and Volume Filter (foci > 0.1 lM). In late pachytene, the large variance in different P granule sizes required the generation of a separate additional set of "large" surfaces with the settings Smooth (Not enabled), Background 0.513, Seed Point Diameter (Not Enabled), and Volume Filter A (0.1-2lm) for Filter B (0.1 lm-12lm). To ensure that moderately sized PGL-1 and ZNFX-1 foci were not counted twice in this analysis, we generated unique intensity channels to identify overlapping "small" and "large" PGL-1 and ZNFX-1 surfaces. If a "small" and "large" PGL-1 or ZNFX-1 surface was found to share a unique intensity value, indicating that they were occupying the same volume in the 3D reconstructed image, the "small" surface was excluded, as the "large" surface better represented the image.

Colocalization analysis
To determine if foci (PGL-1 and ZNFX-1 Figure 4, RAD-51 and MSH-5 Supplementary Figure S6) colocalized, we applied the Shortest Distance Calculation function in Imaris to identify and replicate surfaces separated by 0 lm. These overlapping surfaces were then given unique colocalization identity intensity channels. A focus was considered "co-localized" in all analyses if two or more foci of different types (PGL-1 and ZNFX-1; or, MSH-5 and RAD-51) with the same unique colocalization intensity value could be identified in the exported data. For colocalization analysis, MSH-5 and RAD-51 foci were identified as surface objects, following a protocol identical to the one described in "Quantification of PGL-1 and ZNFX-1 foci."

Gonad Linearization Algorithm
To assess nuclei based on their position within the gonad, we used an algorithm (called "Gonad Linearization Algorithm") implemented in R to approximate the progression of nuclei through the C. elegans germline as a linearly ordered sequence beginning at the premeiotic tip and terminating at the end of pachytene. For a link to download the Gonad Linearization Algorithm, see "Data and Code Availability" section of Materials and Methods. To delineate the orientation of the gonad, a series of connected line segments marking the approximate center of the gonad were drawn on the stitched germline image using the Imaris Measurement tool. When possible, specific measurement points were placed at positions indicating transitions between meiotic stages based on DAPI nuclei morphology, specifically marking the beginning of the premeiotic zone, transition zone, pachytene, and end of pachytene.
Each line segment drawn through the germline was defined by the coordinates of its respective start (x i , y i ) and end (x j , y j ) points. The standard equation [0 ¼ Ax þ By þ C] of each line segment IJ was calculated such that: To determine whether the position of a nucleus within the gonad could be well approximated as a position on a given line segment, we calculated the perpendicular intersection point of a vector drawn from the position of the nucleus to each line segment. The perpendicular intersection point (x p , y p ) of a nucleus at position (x n , y n ) to a line IJ was calculated as follows: The transformed coordinate position (x p , y p ) of a nucleus was considered well approximated if the distances from the start position of the line segment (x i , y i ) to (x p , y p ) and the distance from the end position of the line segment (x j , y j ) to (x p , y p ) were smaller than the total length of the line segment IJ. If multiple line segments met these criteria, the correct line segment was inferred to be the one for which the distance from the nucleus' original position (x n , y n ) to its perpendicular intersection point (x p , y p ) was the shortest.
The above method of assigning nuclei to segments was sufficient for all germlines analyzed in this study. However, the specific arrangement of nuclei around the central gonad axis in the context of the whole germline conformation may lead to nuclei being incorrectly aligned according to these criteria. To ameliorate this potential problem, we included a stringency parameter in our algorithm, which increases the permissible distance nuclei may be assigned to a particular line segment. If increasing the stringency parameter from its default value of 0 is not sufficient to enable more accurate nuclei assignment, nuclei can also be manually assigned to line segments.
Once all nuclei had been assigned transformed coordinate positions, the sum length of all contiguous line segments drawn through a germline, as well as the sum distance of all line segments from the most proximal point to each transformed nucleus position, were calculated. Each length measurement was normalized to the total length of all line segments drawn through the germline to calculate relative gonad position, where a position of 0 corresponded to the start of the premeiotic tip and position 1 corresponded to the end of late pachytene.

Validation of nucleus positioning by the Gonad Linearization Algorithm
100 "gonads" were simulated by iteratively generating six consecutive line segments with lengths $Normal(50,5) and angles of intersection $Normal(180,30). 100 points were simulated along the sum length of the line segments for each gonad $Uniform(0, sum line segment lengths). Each point was then transposed perpendicularly to its line segment a distance $Normal(10,3). These transposed "nucleus" positions were then realigned to the line segments using the Gonad Linearization Algorithm and were subsequently analyzed to determine goodness of fit.

Statistics
All statistics were calculated in R (v4.0.3). Data wrangling was performed using the Tidyverse package (v1.3.0). Nonparametric correlations between DSB-2 normalized staining intensity and RAD-51 focus counts (Supplementary Figure S3) were assessed by Spearman correlation tests with confidence intervals calculated using the DescTools package (v0.99.30). Comparisons of RAD-51 focus manual and automated quantification ( Figure 2B) and the rank order of simulated nucleus position data (Supplementary Figure S1C) were performed by linear regression analysis. The 95% Binomial confidence interval for the proportion of colocalized PGL-1 and ZNFX-1 granules ( Figure 4C) was calculated using the DescTools package. Volumes of PGL-1 and ZNFX-1 ( Figure 4D) foci were compared by Mann-Whitney U test.

Data and code availability
All strains and antibodies are available upon request. File S1 contains a step-by-step protocol for the Gonad Analysis Pipeline at the time of this manuscript's publication. The latest step-by-step protocol for the Gonad Analysis Pipeline can be found at www. libudalab.org in the publication section. The "Gonad Linearization Algorithm" and "Find Spots Close to Surface" MATLAB module are available at github.com/libudalab/Gonad-Analysis-Pipeline. Supplementary Figure S1 displays bar plots representing the proportion of nuclei identified from each region of the germline by the Whole Gonad Pipeline. Supplementary Figure S2A displays plots of the simulated "germlines" and "nuclei" use to validate the Gonad Linearization Algorithm. Supplementary Figure S2B displays a density plot of the proportion of "nuclei" in simulated "germlines" which were accurately assigned to central line segments. Supplementary Figure S2C displays a plot comparing the rank order of simulated "nuclei" correctly assigned to central line segments within simulated "germlines" to their known simulated rank order. Supplementary Figure S2D displays density plots showing the relative deviation of simulated "nuclei" from their known simulated positions relative to the alignment performed by the Gonad Linearization Algorithm. Supplementary Figure S3D displays dot plots assessing the association of DSB-2 staining intensity and RAD-51 focus counts in germlines analyzed by the Gonad Analysis Pipeline. Supplementary Figure S4AB displays immunofluorescence images on whole gonads of spo-11(me44) and rad-54(ok615) whole germlines. Supplementary Figure S4C displays dot plots assessing RAD-51 focus counts per nucleus in spo-11(me44) and rad-54(ok615) whole germlines analyzed by the Gonad Analysis Pipeline. Supplementary Figure S5

Results
Gonad analysis pipeline for fluorescent image analysis of whole C. elegans germlines The C. elegans germline presents many challenges for automated quantification of cytological data. Due to the non-linear three-dimensional (3D) shape of both undissected and dissected gonads, it has been difficult to computationally: (1) distinguish individual nuclei within an imaged gonad; and (2) contextualize quantitative features of individual nuclei based on their position in the gonad and during specific stages of meiotic prophase I. Further, the freedom of dissected gonads to adopt multiple shape conformations when affixed to a microscope slide or coverslip presents an additional challenge for automating computational analysis of large numbers of dissected gonads. To overcome these challenges, we constructed a Gonad Analysis Pipeline using image quantification software in conjunction with custom scripts implemented in MATLAB and R to enable high-throughput quantification of germline features at single nucleus resolution, while maintaining information regarding the relative position of these nuclei within the C. elegans germline. For all of our analyses, we acquired and used 3D immunofluorescence images of dissected, fixed C. elegans germlines using established protocols that preserve the 3D architecture of the germline (Figure 1, A and B; Materials and Methods). Since high-resolution analysis of whole C. elegans gonads requires acquisition of multiple 3D images to encompass their entire distal-proximal length, we stitched the individual 3D images together into a single reconstruction of the imaged germline using either Imaris Stitcher or an image stitching plugin in FIJI (see Materials and Methods; (Preibisch et al. 2009)). Individual nuclei within the gonad were defined using Surface in Imaris with the DNA stain DAPI (see below). Due to the arrangement of nuclei in some germlines, a subset of nuclei ($23%) was unable to be computationally identified and were subsequently removed from the dataset (Figure 1, B and C). A caveat of removing these nuclei is that specific germline regions could be under sampled (P < 0.001 chi-square test of goodness of fit, Supplementary Figure S1, A and B); however, we found that combining the datasets of at least two germlines was sufficient to enable even sampling of nuclei across the germline from the premeiotic tip to the end of late pachytene (P ¼ 0.422, chi-square test of goodness of fit, Supplementary Figure S1C). From our imaged gonads (which capture the top 25-30% of the germline along the dorsal-ventral axis; see Materials and Methods), we computationally identified an average of 146.3 6 16.9 nuclei per germline (n ¼ 4 gonads). Overall, $15% of the germline nuclei contained in a single gonad arm are captured by this method using our particular images of the top dorsal portion of each gonad, and are evenly sampled from all regions of the germline. These results indicate the ability of this pipeline to identify and analyze large numbers of nuclei from whole gonads.
To demarcate the conformation of each gonad from the distal tip (premeiotic) to proximal end (late pachytene), we drew contiguous line segments down the center of each germline ( Figure 1D). Using this method, we designated each stage of meiotic prophase I along this segmented line based on DNA morphology: the premeiotic zone, transition zone (encompassing leptotene and zygotene), and pachytene. Since some mutant germlines lack some of these cytological features (e.g., absence of polarized chromosomes characteristic of transition zone nuclei), we developed an algorithm to approximate the relative germline position of each nucleus independent of DNA morphology ( Figure 1E). This algorithm (called the "Gonad Linearization Algorithm") approximates the position of each nucleus along the length of the germline based on its orientation relative to the line drawn along the center of the gonad. To calculate the position of each nucleus, the Gonad Linearization Algorithm identifies the best fit perpendicular intersection point for the position of each nucleus relative to the central line segments (see perpendicular arrows projecting from each nucleus to the central line in Figure 1D). This analysis allows us to recontextualize individual nuclei from 3D space into a one-dimensional (1D) space, enabling assessment of nucleus features based on position in the gonad as nuclei progress through meiotic prophase I.
To assess the ability of the Gonad Linearization Algorithm to accurately align nuclei through the germline, we applied the algorithm to a simulated dataset of 100 "germlines." Each simulated "germline" contained 100 simulated "nuclei" dispersed along the lengths of the "germline" (Supplementary Figure S2A). We found that, for most simulated "germlines," >90% of the "nuclei" were accurately assigned to the correct line segment, and that correctly aligned nuclei recapitulated the order in which they were simulated along the length of the "germline" (P < 0.001, R 2 ¼ 1, Linear regression analysis, Supplementary Figure S2, B and C). Even in the case of incorrect assignment of a "nucleus" to a line segment, the deviation of the placement of each "nucleus" in the context of the whole gonad was 0.00 6 3.7% on average, and all were <10% (Supplementary Figure S2D). In addition, we have included within the algorithm a way to manually correct the assignment of these incorrectly assigned nuclei. These data illustrate the accuracy and customizability of the Gonad Linearization Algorithm for analysis of diverse conformations of dissected gonads.

Quantification of DNA-associated proteins at single nucleus resolution
Manual quantification of foci within nuclei from whole C. elegans gonads is a laborious, rate-limiting step during image analysis. To validate our Gonad Analysis Pipeline's automated quantification of meiotic features, we first quantified classic markers that are involved in double-strand DNA break (DSB) formation and repair. The recombinase RAD-51 loads at sites of DSBs in meiotic nuclei (Colaiá covo et al. 2003;Lemmens and Tijsterman 2011). The number of RAD-51 foci within germline nuclei can indicate either the extent of DSB induction and/or the efficiency of DSB repair during meiotic prophase I progression (Bickel et al. 2010;Rosu et al. 2013). DSB-2 promotes DSB induction, and accumulates on meiotic chromatin in the final stages of the transition zone and early pachytene when RAD-51 forms numerous foci Stamper et al. 2013).
To quantify RAD-51 within an entire germline, we implemented our Gonad Analysis Pipeline adapted with a custom MATLAB script in combination with the Gonad Linearization Algorithm. First, we identified nuclei within the germline using DAPI (see Methods for details). We developed a custom MATLAB script (called "Find Spots Close to Surface") to: (1) identify the RAD-51 foci (spots) that were associated with each individual nucleus (surface); and (2) provide a readout of foci per nucleus. Then after drawing line segments along the length of the gonad, the Gonad Linearization Algorithm was used to transform the position of each nucleus and the RAD-51 foci (spots) associated with that nucleus on to that 1D line. This transformation generated data from a single germline that contained both the number of spots associated with each nucleus and the relative position of each nucleus along the length of the germline. In addition to scoring the number of RAD-51 foci for each nucleus, we further calculated the mean intensity of DSB-2 staining with each nucleus using Imaris (Figure 2A). From these analyses, we are able to observe the complete dynamics of DNA repair at a single nucleus resolution.
To determine the accuracy of our high-throughput Gonad Analysis Pipeline method for nuclear-associated foci quantification, we manually scored RAD-51 foci in a blinded subset of representative nuclei taken from whole gonad images ( Figure 2B; n ¼70 nuclei). The mean deviation between automated and manual foci quantification was 0.05 6 1.21, and the number of foci per nucleus quantified by Imaris software correlated well with the number of foci scored manually (P <0.001, Adjusted R 2 ¼ 0.91, Linear Regression Analysis, Figure 2B). Thus, across a population of nuclei, our Gonad Analysis Pipeline yields reliable statistics for the number of foci associated with individual C. elegans germline nuclei.
Using the Gonad Analysis Pipeline, we assessed the distribution of RAD-51 along the length of the germline ( Figure 2C) in wild-type and mutant contexts. In concordance with previous studies of wild-type germlines (Colaiá covo et al. 2003;Rosu et al. 2013;Stamper et al. 2013), we observe most nuclei with one or more RAD-51 foci within the central $50% of the germline ( Figure 2C), corresponding to the end of the transition zone through mid-pachytene stages of meiosis I ( Figure 1D). In addition, we assessed mutants that displayed aberrant meiotic recombination. Null mutants for the topoisomerase-like protein SPO-11 are unable to generate endogenous meiotic DSBs and show few RAD-51 foci throughout meiotic prophase I (Colaiá covo et al. 2003); Supplementary Figure S4A). Our quantification of a spo-11(me44) null mutant hermaphrodite germline reflects this phenotype, with 93.3% of nuclei analyzed (125/139 nuclei) showing no RAD-51 foci (Supplementary Figure S4C, top). Null mutants of the recombination protein RAD-54 are unable to unload RAD-51 from DSBs during pachytene, resulting in elevated and persistent RAD-51 foci (Mets and Meyer 2009;Rosu et al. 2011;Nottke et al. 2011;Supplementary Figure S4B). When we quantified RAD-51 foci per nucleus in a rad-54(ok615) null mutant hermaphrodite germline using the Whole Gonad Pipeline, we also observed elevated and persistent RAD-51 foci during meiotic prophase I progression (Supplementary Figure S4C, bottom). Our dataset illustrates that the number of DSBs per nucleus in a rad- Figure 1 Gonad Linearization Algorithm transforms and orients 3Dnuclei within a non-linear C. elegans gonad onto a one-dimensional axis. We designed a custom algorithm (called the "Gonad Linearization Algorithm") to enable the assessment of individual C. elegans nuclei relative to their position within a germline. (A) Cartoon of adult hermaphrodite worm (top panel; made with Biorender) with zoom in of one gonad arm (lower panel) with nuclei (blue) and indicated stages of meiosis based on DNA morphology (B) Dissected C. elegans hermaphrodite germline with DNA stained using DAPI (white). Specific meiotic stages were determined by DNA morphology. (C) 2D coordinate positions (units arbitrary) of individual whole nuclei (gray circles) within a C. elegans germline. Whole nuclei and respective coordinate positions were defined using Imaris. Nuclei found to be overlapping or only partially imaged were eliminated from analysis. Nuclei that were not able to be computationally oriented were also removed from analysis. (D) Application of the Gonad Linearization Algorithm transforms the coordinates of nuclei onto a central axis line drawn through the Figure 1 Continued germline, approximating the progression of nuclei through the germline based on their position along that line. (E) Normalizing the total length of line segments drawn through the center of the gonad enables standardized assessment of individual nuclei contextualized by their progression through the germline. Line segments were specifically placed to delineate the premeiotic zone and transition zone based on DAPI morphology of chromosomes. Early, mid, and late pachytene were defined on this graph by dividing the remaining normalized germline length into equal thirds. 54 mutant is dramatically higher than wild-type (Supplementary Figure S4C), with the highest number of DSBs in a single nucleus (83 RAD-51 foci in a single nucleus) located most proximally in the germline. Taken together, these data show the flexibility of using the Gonad Analysis Pipeline to quantify DNA damage repair foci across different mutant contexts.
To further assess the functionality and accuracy of our image quantification method, we quantified the association between RAD-51 and DSB-2 on a single nucleus basis. Similar to RAD-51, the per-nucleus normalized mean intensity of DSB-2 within germlines was also highest in the central 50% of the germline ( Figure 2C). To dissect this relationship further, we binned the DSB-2 and RAD-51 data into two bins based on when DSB-2 is loaded to chromatin in early prophase (transition zone-early pachytene) or offloaded from chromatin in late prophase (midlate pachytene) . Overall, higher DSB-2 intensity Figure 2 Gonad Analysis Pipeline enables germline-wide single nucleus assessment of double-strand DNA break (DSB) levels. (A) Immunofluorescence image of a C. elegans hermaphrodite germline stained with DAPI (DNA; blue), DSB-2 (red), and RAD-51 (green). Scale bar represents 20 lm. Inset images display a representative mid-pachytene nucleus with characteristic DSB-2 and RAD-51 staining. The location of inset image within the whole germline image is indicated by a white box on the whole germline image. For clarity, a dashed line is used in the inset image to emphasize the region of the image containing the nucleus of interest. Specific meiotic stages were determined by DNA morphology. (B) Comparison of data from automated quantification of RAD-51 foci associated with individual nuclei to data from manual quantification of RAD-51 foci within those same nuclei analyzed by the automated system (n ¼70 nuclei derived from three separate germlines). The number listed on each point (purple) indicates the number of nuclei scored with that result. The linear regression line is displayed as a black line, whereas the gray-shaded area represents the 95% confidence interval of this analysis. (C) Visualization of RAD-51 foci counts and DSB-2 normalized mean fluorescence intensity of individual nuclei across gonads (n ¼2). The RAD-51 foci counts and DSB-2 normalized intensity values of 295 individual nuclei are displayed. DSB-2 mean intensity was normalized within analyzed gonads by the highest recorded DSB-2 mean fluorescence intensity among nuclei. Normalized DSB-2 intensity is indicated with a color gradient from red (highest intensity) to blue (lowest intensity). Vertical dashed lines indicate the average position in which nuclei within each gonad transition between each successive stage of meiotic prophase I (as indicated by text in the figure), determined by DAPI morphology. The deviation between these transition points was <0.01 between the germlines. Numbers below the text demarcating each respective meiotic stage in the germline indicate the mean number of RAD-51 foci 6 the standard deviation of RAD-51 foci among nuclei within that region.
is correlated with increased numbers of RAD-51 foci (Supplementary Figure S3). Notably, we observed a stronger correlation in early prophase (Spearman's q 0.785 95% CI 0.721-0.836, P < 0.001, Spearman's rank correlation test) than in late prophase (Spearman's q 0.389 95% CI 0.225-0.532, P < 0.001, Spearman's rank correlation test), supporting the reported function of DSB-2 to promote DSB induction during early pachytene by creating a DSB-permissive state when loaded onto chromatin . Taken together, these results show the capability of the Gonad Analysis Pipeline to quantify the relationships of cytological features at single nucleus resolution.
Quantification of meiotic chromosome structureassociated foci at single nucleus resolution Next we used the Gonad Analysis Pipeline to quantify foci associated with specific steps in DSB repair that occur along meiotic chromosome axis structures. Although many proteins are involved in establishing a crossover during meiosis, we focused on quantifying the localization pattern of two proteins that are loaded after the initial strand invasion steps of recombination. The MutS homolog MSH-4/5 and cyclin-like COSA-1 localize to intermediate steps in the meiotic DSB repair process and are required for crossover recombination events between homologous chromosomes (Kelly et al. 2000;Colaiá covo et al. 2003;Yokoo et al. 2012;Woglar and Villeneuve 2018). In early-mid pachytene, MSH-5 has been observed to form many dim foci before late pachytene, when both COSA-1 and MSH-5 localize to 6 foci, marking the positions of the obligate crossover for each of the six C. elegans chromosomes. Studies have shown that the synaptonemal complex-a proteinaceous structure that assembles between homologous chromosomes during meiosis-recruits MSH-5 and COSA-1 in C. elegans (MacQueen and Villeneuve 2001;Colaiá covo et al. 2003;Jantsch et al. 2004;Bhalla et al. 2008;Libuda et al. 2013;. We adapted the Gonad Analysis Pipeline to determine the number of MSH-5 and COSA-1 foci associated with the synaptonemal complex protein, SYP-1 throughout the germline (Figure 3, A and B). For this approach, SYP-1 staining was used instead of DAPI to generate surfaces for each individual nucleus. Next, we identified MSH-5 or GFP::COSA-1 foci, then used the "Find Spots Close to Surface" MATLAB script to identify the foci associated with each SYP-1 surface, and finally approximated the positions of these SYP-1 surfaces along the germline using the Gonad Linearization Algorithm. As the synaptonemal complex is not fully assembled until the end of the transition zone, we did not identify any SYP-1 objects in the first segmented portion of each analyzed germline, which corresponds to the pre-meiotic region ( Figure 3C). In total, we identified the SYP-1 surfaces of 167 individual nuclei in a single germline stained with SYP-1 and MSH-5, and 168 individual nuclei in a single germline stained with SYP-1 and GFP::COSA-1. As previously reported (Yokoo et al. 2012;Woglar and Villeneuve 2018), MSH-5 forms >6 foci per meiotic nucleus in early-mid pachytene. Then in late pachytene (the final $25% of the germline), GFP::COSA-1 forms bright, robust foci and both MSH-5 and COSA-1 foci counts converge to $6 foci per nucleus, which corresponds to the 6 total crossovers formed per nucleus (Yokoo et al. 2012). Notably, MSH-5 and COSA-1 foci in late pachytene have been found to be brighter than those observed earlier in meiotic prophase I (Yokoo et al. 2012;Woglar and Villeneuve 2018). As Imaris software enables flexible thresholding of puncta based on signal intensity, it is possible to limit analysis specifically to these bright foci by changing the threshold cutoff (Supplementary Figure S5). Overall, these results show the capability of our approach to identify nuclear structures, as well as to quantitate the subnuclear association of specific meiotic proteins with specific chromosome structures at singlenucleus resolution.

Quantification of perinuclear structures across the C. elegans germline
To show the ability of our method to assess extranuclear features of the C. elegans germline, we adapted our Gonad Analysis Pipeline to identify and quantify P granule structures that assemble within the perinuclear space of germ cells. P granules are liquid-like condensates associated with nuclear pore complexes in the C. elegans germline that process small RNAs (Seydoux 2018). For our analysis of P granules, we analyzed two components of P granules: PGL-1 and ZNFX-1. PGL-1 is a core component of P granules that is required for fecundity (Strome and Wood 1982;Kawasaki et al. 1998). ZNFX-1 is a P granule component required for effective transcript silencing in the germline and colocalizes with PGL-1 perinuclear foci in the germline (Ishidate et al. 2018;Wan et al. 2018).
To analyze the localization of PGL-1 and ZNFX-1 P granule components throughout the adult germline ( Figure 4A), we adapted our Gonad Analysis Pipeline to initially identify and quantify the number of individual perinuclear PGL-1 and ZNFX-1 foci by creating surfaces of each focus in Imaris ( Figure 4A). In total, we identified n ¼4543 PGL-1 foci and n ¼3842 ZNFX-1 foci ( Figure 4B). Then, we applied the Gonad Linearization Algorithm to approximate the position of these foci relative to their progression through the germline ( Figure 4B). To understand the relationship between PGL-1 and ZNFX-1, we determined the proportion of colocalized PGL-1 and ZNFX-1 along the germline in a sliding window representing 10% of total gonad length ( Figure 4C). Throughout meiotic prophase I, >50% of PGL-1 and $75% of ZNFX-1 foci are consistently colocalized. However, in late prophase I, the frequency of PGL-1 colocalization increases to $75%. From our analysis, we also found that throughout the germline, PGL-1 foci were more frequently found unassociated with ZNFX-1 than ZNFX-1 was found unassociated with PGL-1 ( Figure 4D). Together, these results agree with previous findings indicating the colocalization of these two components within the C. elegans hermaphrodite germline (Ishidate et al. 2018;Wan et al. 2018).
To assess the accuracy of the Gonad Analysis Pipeline in determining colocalization frequencies, we also compared the association between MSH-5 and RAD-51 foci, which mark distinct recombination intermediates and rarely interact in germ nuclei (Schvarzstein et al. 2014;Woglar and Villeneuve 2018) (Supplementary Figure S6). We found that $6-7% of MSH-5 and RAD-51 are colocalized (Supplementary Figure S6B). Importantly, we found that the distributions of distances between colocalized MSH-5 foci with their associated RAD-51 focus, as well as between non-colocalized MSH-5 foci with the nearest RAD-51 focus, are not discretely separated (Supplementary Figure S6C). This result indicates that proximity alone does not determine colocalization, therefore supporting the accuracy of the Gonad Analysis Pipeline in identifying interactions between germline features. Overall, our data show the adaptability and customizability of the Gonad Analysis Pipeline to quantitate the changes in colocalization frequency throughout the whole C. elegans germline.
To test whether our method could quantify additional structural features of P granules, we quantified and compared the volume/size of individual PGL-1 and ZNFX-1 P granules to the volume/size of P granules with colocalized PGL-1 and ZNFX-1. From our analysis across meiotic prophase I, we found that the volume of foci that were colocalized were larger than individualized foci for both proteins assessed (P <0.001, Mann-Whitney U test, Figure 4D). When we examined the mean volume of PGL-1 and ZNFX-1 foci in a sliding window representing 10% of total gonad length ( Figure 4E), we observed that P granules with colocalization of PGL-1 and ZNFX-1 were consistently larger in volume than those granules that did not have both components present. This result may indicate that the inclusion of multiple P granule components possibly results in a synergistic increase the volume of a granule. Taken together, we have shown that our approach enables high-throughput analysis of germline granules and provides support for a model in which the composition and features of individual P granules may change throughout meiotic prophase I progression.

Discussion
In this study, we show the utility of a customizable computational pipeline, called the Gonad Analysis Pipeline, developed to perform automated quantification of features within (or associated with) individual nuclei with reference to the position of the nuclei in the C. elegans gonad. Specifically, we adapt and use the Gonad Analysis Pipeline to quantify foci per nucleus, foci associated with chromosome structures, and foci colocalization frequencies across whole adult C. elegans hermaphrodite gonads from the pre-meiotic tip to late pachytene. This pipeline yields Figure 3 Single-nucleus analysis of meiotic recombination markers along the meiotic chromosome axis. Immunofluorescence images of a C. elegans hermaphrodite germline stained with either (A) DAPI (DNA; blue), MSH-5 (green), and SYP-1 (red), or (B) DAPI (blue), GFP::COSA-1 (green), and SYP-1 (red). Scale bar represents 20 lm. Inset images display representative late pachytene nuclei. The location of these inset images within the germline image are indicated by white boxes on the whole gonad images. Specific meiotic stages were determined by DNA morphology. (C) Visualization of numbers of MSH-5 (purple) or GFP::COSA-1 (blue) foci associated with SYP-1 within individual nuclei across the germlines displayed in A-B. As nuclei progress through meiotic prophase I, the number of MSH-5 and COSA-1 spots converge at 6 foci per nucleus in the latter part of the germline, consistent with the reported number of MSH-5 and COSA-1 foci marking the 6 crossover sites in late pachytene (Yokoo et al. 2012).
datasets concordant with previous observations for known features of meiotic prophase I (Colaiá covo et al. 2003;Rosu et al. 2011;Nottke et al. 2011;Yokoo et al. 2012;Rosu et al. 2013;Schvarzstein et al. 2014;Ishidate et al. 2018;Wan et al. 2018;Woglar and Villeneuve 2018). Additionally, many C. elegans mutants defective in key meiotic events such as synapsis and pairing can have aberrant DNA morphology and disruption of normal meiotic stage progression. These defects make it difficult to use DNA morphology to discern the specific transitions between meiotic stages and challenging to categorically delineate nuclei within those germline contexts. Our automated Gonad Analysis Pipeline provides a consistent metric using position along the normalized gonad length for comparative analysis of mutants to wildtype germlines.
Although analyses presented here assess nuclei from the premeiotic tip to late pachytene of the C. elegans germline, our pipeline can also be extended to include more proximal portions of the germline for quantitative analyses of other germline features. For example, P granules display a dynamic localization pattern throughout the germline, changing from cytoplasmic localization in the distal region of the germline to a more perinuclear localization in the more proximal region of the germline (Seydoux 2018). Our computational pipeline could be adapted to quantify these changes in P granule localization across the entire C. elegans Figure 4 Assessment of P-granule components across meiotic prophase I. (A) Immunofluorescence image of a C. elegans hermaphrodite germline stained with DAPI (DNA), PGL-1 (green), and 3xFLAG::GFP::ZNFX-1 (red). Specific meiotic stages were determined by DNA morphology. Inset images show a single mid-pachytene nucleus. The location of these inset nuclei within the original whole germline image are indicated by white boxes on the whole gonad images. Numbered arrowheads, respectively, indicate examples of: (1) a PGL-1 focus not colocalized with ZNFX-1, (2) a ZNFX-1 focus not colocalized with PGL-1, and (3) colocalized PGL-1 and ZNFX-1 foci. The scale bar in the whole germline image represents 20 lm, whereas the scale bars in the insets represent 2 lm. (B) Cumulative number of PGL-1 and ZNFX-1 foci identified across the germline. (C) Percent of total PGL-1 and ZNFX-1 foci which are, respectively, colocalized within a sliding window representing 10% of total germline length. Shaded area represents 95% Binomial Confidence Interval. (D) Histograms displaying the distribution of PGL-1 and ZNFX-1 foci volumes, distinguishing between foci colocalized (yellow) or not colocalized (blue) with other respective protein. P values were calculated from comparisons between colocalized and non-colocalized focus volumes by Mann-Whitney U test. (E) Mean volume of PGL-1 and ZNFX-1 foci in a sliding window representing 10% of total germline length, distinguishing between foci which are (yellow) or are not (blue) colocalized. Shaded area represents standard deviation.
germline and perform comparative studies of these nucleuscytoplasm localization dynamics between wild type and mutant contexts. Additionally, several studies have found dynamic changes to the localization of specific synaptonemal complex components during meiotic prophase progression (Martinez-Perez et al. 2008;Severson et al. 2009;Tzur et al. 2012;Nadarajan et al. 2016). Our pipeline can also be used to quantify these changes in the chromosome axis and the synaptonemal complex from transition zone through diakinesis.
Our analyses show how small customizable changes to the Gonad Analysis Pipeline can enable quantification at multiple levels from the entire germline to single nuclei. Further changes can enable the additional quantifications of cytological objects, such as sphericity, intensity, and relative distance between objects. Use of these other quantifiable metrics enables a comprehensive analysis of many germ cell features, including the quantification of chromosome pairing for fluorescence in situ hybridization (FISH) experiments, assembly and disassembly of chromosome structures, and protein dynamics during live cell imaging. In particular for live imaging, the pipeline could assess changes in numerous metrics such as velocity, mean square displacement, duration, volume, and sphericity of objects over time for all nuclei during oogenesis and contextualize these statistics based on nuclear position within the germline. These types of adaptations of our Gonad Analysis Pipeline for live imaging may prove particularly powerful for quantification of the liquid-like properties and dynamics of P granules in the adult germline, especially in response to different stresses or aging.
The present study focuses on adult hermaphrodite germlines; however, the Gonad Analysis Pipeline can also be used to analyze larval germlines and adult male germlines. An increasing number of studies are showing the power of performing comparative analyses between oogenesis and spermatogenesis in C. elegans to identify important sexual dimorphic features of meiosis (Jaramillo-Lambert et al. 2007; Van et al. 2016;Li et al. 2020). Spermatogenesis in the germlines of C. elegans males is also organized in a spatial-temporal gradient (Shakes et al. 2009) and can easily be analyzed by our pipeline, thereby aiding both studies of spermatogenesis as well as sexual dimorphism of germ cell development. Additionally, this approach and protocol could be adapted to use with other tissues and organisms. For example, many developing tissues do not follow a straight line, such as the epithelium of the Drosophila wing disc, and this protocol can be used to linearize elements within the developing tissue that might help to reveal different aspects of cellular migration and development.
Taken together, we have generated and validated an automated and customizable image analysis resource for the C. elegans germline community. Our Gonad Analysis Pipeline enables standardized quantification of diverse features of the C. elegans gonad. Moreover, our approach is flexible and could be applied to analyze features of other tissues composed of cells organized along a linear gradient.