SATINN: An automated neural network-based classification of testicular sections allows for high-throughput histopathology of mouse mutants

Motivation The mammalian testis is a complex organ with a hierarchical organization that changes smoothly and stereotypically over time in normal adults. While testis histology is already an invaluable tool for identifying and describing developmental differences in evolution and disease, methods for standardized, digital image analysis of testis are needed to expand the utility of this approach. Results We developed SATINN (Software for Analysis of Testis Images with Neural Networks), a multi-level framework for automated analysis of multiplexed immunofluorescence images from mouse testis. This approach uses a convolutional neural network (CNN) to classify nuclei from seminiferous tubules into 7 distinct cell types with an accuracy of 94.2%. These cell classifications are then used in a second-level tubule CNN, which places seminiferous tubules into one of 7 distinct tubule stages with 90.4% accuracy. We further describe numerous cell- and tubule-level statistics that can be derived from wildtype testis. Finally, we demonstrate how the classifiers and derived statistics can be used to rapidly and precisely describe pathology by applying our methods to image data from two mutant mouse lines. Our results demonstrate the feasibility and potential of using computer-assisted analysis for testis histology, an area poised to evolve rapidly on the back of emerging, spatially-resolved genomic and proteomic technologies. Availability and implementation Scripts to apply the methods described here are available from http://github.com/conradlab/SATINN.

seminiferous tubules into 7 distinct cell types with an accuracy of 94.2%. These cell classifications 23 are then used in a second-level tubule CNN, which places seminiferous tubules into one of 7 24 distinct tubule stages with 90.4% accuracy. We further describe numerous cell-and tubule-level 25 statistics that can be derived from wildtype testis. Finally, we demonstrate how the classifiers 26 and derived statistics can be used to rapidly and precisely describe pathology by applying our 27 methods to image data from two mutant mouse lines. Our results demonstrate the feasibility 28 and potential of using computer-assisted analysis for testis histology, an area poised to evolve 29 rapidly on the back of emerging, spatially-resolved genomic and proteomic technologies. 30 Availability and implementation: Scripts to apply the methods described here are available from 31 http://github.com/conradlab/SATINN. Background 35 Spermatogenesis is a cyclical process in mammalian seminiferous tubules that, under normal 36 circumstances, results in continuous sperm production. Deficiencies in this complex but essential 37 evolutionary process often result in male infertility, which is characterized by a reduction or 38 complete absence of mature sperm count (Schlegel 2004) and currently affects approximately 1 39 in 7 couples worldwide (Agarwal, et al. 2021). While key regulatory genes (Krausz and Casamonti  ) ) (Guo, et al. 2017) (Shami, et al. 2020) (Suzuki,Diaz and 45 Hermann 2019) is far from complete. 46 Histology is the premier method for phenotyping spermatogenic defects and has set the 47 foundation of understanding spermatogenesis in several key organisms, including humans 48 (Clermont 1966) (Paniagua and Nistal 1984), non-human primates (Clermont and Lebland 1959) (Oakberg 1956) 53 (Russell, et al. 1990) (Ahmed and de Rooij 2009) that serve as landmarks in the cycle of 54 spermatogenesis. But while the quality and quantity of testis histology has greatly improved over 55 the last decade, computational tools capable of handling and analyzing that data are just 56 emerging. Traditional histology is low-throughput due to the time-consuming nature and 57 expertise required to manually analyze the images. Clinical histopathology typically focuses on 58 identifying only a handful of severe phenotypes, such as Sertoli cell only, germ cell maturation 59 arrest, and hypospermatogenesis (Abdullah and Bondagji 2011) (Hentrich, et al. 2011), which 60 only offer insights at a coarse resolution. 61 To enable higher level analyses and to increase data processing efficiency, we aim to integrate  (Oei, et al. 2019). However, adapting these learning algorithms to analyze testis histology remains 71 largely unexplored, apart from a single recent study from (Xu, et al. 2021) which used a neural 72 network to stage Hematoxylin and Eosin (H&E)-stained tubule cross-sections.

73
Our goal in this study is to develop and assess a computational method to evaluate 74 histopathology using automated classification of mouse seminiferous cell types and tubule stages 75 from immunofluorescence (IF) images. To our knowledge, this report is the first of a publicly 76 available, neural network-based classification method for IF testis images, which have unique 77 features for the computer to learn from. Our workflow has the benefit over similar methods of 78 making no assumptions about the composition of cells within tubules, which reduces processing 79 times and enables functionality under non-ideal conditions, such as for meiotic arrest mutants 80 which lack entire cell type populations. It also opens the door to extensive network refinement 81 by using fluorescent markers with additional specificity, as well as downstream quantification of 82 those markers of interest, something that would be more difficult to do using traditional 83 immunohistochemistry (IHC) stains.

84
In this paper, we describe and validate our neural network trained to automatically classify 85 mouse seminiferous cell types and tubule stages from IF images stained with a basic set of 86 markers. We show that we are able to computationally recapitulate the previously described 87 meiotic-arrest phenotype of Mlh3 -/mice. Additionally, we use the high sensitivity of our software 88 to make biological inferences on an undisclosed mouse mutant line that exhibits a much milder 89 phenotype that would typically be impossible to detect and quantify by eye. We conclude by

95
Neural networks classify mouse seminiferous tubules and nuclei with above 90% accuracy 96 To facilitate high-throughput statistical analysis of seminiferous tubules with various genetic 97 backgrounds, we developed SATINN (Software for Analysis of Testis Images with Neural 98 Networks) to automate cell type and tubule stage classification (overview in Fig. 1).

103
We acquired cross-sectional images of mouse seminiferous tubules (see methods and 104 supplemental methods) containing the following color channels: Hoechst (a nuclear marker), 105 Actin Alpha 2 (Acta2), and Acrosomal vesicle protein 1 (Acrv1). Acta2 and Acrv1 were used to 106 assist the tubule classifier as described below. We segmented cell nuclei using Cellpose (Stringer,107 et al. 2021) and tubules using Otsu's method (Otsu 1979), automated object extraction, and 108 manually annotated over 7,800 cells and 2,000 tubules to use for neural network training. We  Filtering out low confidence calls (LCF, defined as below 80% confidence) resulted in 94.2% of 137 training images being classified correctly while retaining a majority (69.9%) of the data (Fig. 2B). 138 We confirmed the validity of thresholding in this way using two metrics: first, we observed that

166
The stage XII class has notably fewer high confidence calls, likely due to being easily confused with stage I. (E) Visual 167 overview of tubule segmentation and stage classification. Each object is colored by its predicted stage class. N: 168 sample size; Acc: Accuracy. ±1: Accuracy within one adjacent class error.

194
(F) ABP sorted by tubule stage and cell type.

195
Batch effects are a common concern with high-throughput experiments. We found subtle but lumen) as the cells progressed from SPCs to eSPDs (Fig. S3E).

212
To better visualize spatial rearrangements in seminiferous tubules that may not be immediately 213 apparent at first glance, we plotted ABP (Fig. 4F) and relative orientation (Fig. S3F) with respect 214 to tubule stage. We were able to recapitulate eSPDs moving into the lumen (more apical position) 215 at stages VI-VII, while having an otherwise stable ABP distribution. On the other hand, rSPDs 216 steadily increase in ABP as spermatogenesis progresses, reflecting their apical migration as they 217 mature. Finally, we note that Sertoli ABP drops sharply (more basal) at stage VIII, after blood-    (not shown). Our statistical analysis found little to no variation in nuclear size and orientation, as 270 expected ( Fig. 6B and S4B, respectively). However, our computational method revealed a reversal 271 in the spatial organization of Sertoli cells from SPGs and SPCs (Fig. 6C), as well as increasing cell 272 density along the basal tubule edge (Fig. S4C).

288
The hardest challenge in histopathology is the identification of minor changes undetectable by 289 the human eye. Therefore, we tested SATINN on a mutant with a milder phenotype to calibrate 290 its ability to detect subtle differences. To do this, we analyzed Crispy -/mutants (Fig. 6D), a mouse 291 line with a targeted 5kb deletion of an evolutionarily conserved non-coding sequence that is 292 predicted to impact spermatogenic gene expression (Okhovat et al., manuscript in preparation).

293
Analyzing six Crispy -/cross-sections (1,164 tubules and 320,000 cells) we found subtle but 294 significant changes in the nuclear areas of most cell types (Fig. 6E) and an apical shift in nuclei 295 location of SPC and SPCII (Fig. 6F, p < 10 -5 ) without disruption in other cell types. Crispy -/tubules appearing morphologically indistinguishable to wildtype, they had a notably 300 lower spermatogenic index, averaging slightly less than 3 across all tubules (p < 10 -5 ). This finding, 301 which would not have been apparent in a qualitative evaluation, may provide useful insight on 302 the functional mechanisms of this mutant. We also calculated tubule and lumen radii (Fig. 6H) 303 for the genotypes used in this paper. Wildtype tubules were larger than the Crispy +/+ , which is 304 likely a result of differences in fixation protocols for those equivalent genotypes. Nonetheless, In this paper we present SATINN, a software that performs a high-throughput analysis of 315 immunofluorescence images from whole mouse testis cross-sections. We apply the image 316 recognition capabilities of convolutional neural networks to the field of reproductive biology, 317 resulting in automated detection and classification of thousands of nuclei into 7 cell types and 318 hundreds of tubules into 7 stages of spermatogenesis, from a single cross-section image with 319 very high accuracy. We show the benefit of collecting large amounts of data for the otherwise 320 inaccessible exploration of fine spatial relationships between tissue structures, and how they can 321 contribute to a better understanding of testicular biology. Importantly, we demonstrate that this 322 software can be used to recapitulate known histopathologies of the Mlh3 -/mouse mutants and 323 detect mild phenotypic alterations in the histology of an unpublished mouse mutant, Crispy -/-. To 324 our knowledge, this code is the first of its kind to be publicly available and will be immediately 325 useful to analyze IF images of mouse testis generated with the same staining schema used here 326 (Hoechst, Acta2, Acrv1).

328
Recently (Xu, et al. 2021) began to explore the potential of automated classification of tubule 329 stages. However, this work was limited to brightfield images, which inherently lacks the capability 330 of simultaneously detecting multiple molecular targets, and did not expand on the identification 331 of tubular cell-types, which are crucial for the study of complex biological processes in the testis.

332
Our approach has improved on these limitations through the classification and statistical analysis 333 of more precise cell types and tubule stages, which we then applied to studying mutant 334 morphologies. While we demonstrated SATINN's ability to detect and quantify subtle 335 morphological changes, it was necessary to make careful interpretations due to the limitations 336 of image recognition software. As with all machine learning methods that use discrete classes to 337 categorize a continuous biological process like spermatogenesis, we expect the presence of cell 338 type or tubule stage intermediates to arise as errors during classification. To mitigate this effect, 339 we used a post-classification filtering based on classifier confidence (LCF), which improved the 340 accuracy of both classifiers, and importantly, did not compromise our statistical power due to 341 the large volume of cells and tubules that can be analyzed from each image. Additionally, due to 342 the highly sensitive nature of CNNs, we expected the presence of batch effects and addressed 343 them by quantile normalization (Fig. S2). We also noticed that specific measurements could be    (Fig. S1). The input for cells was a 50x50 pixels normalized 422 Hoechst image centered on the centroid of each segmented cell, whereas for tubules, a 423 2000x2000 pixels normalized image containing Hoechst, Acta2, and Acrv1 was used instead.

424
Objects whose CNN input image exceeded the boundaries of the source image were padded with 425 zeros. For cell nucleus CNN training, each image was manually annotated with its cell type. We  We used a modified version of quantile normalization that was originally described by (Hicks and 453 Irizarry 2015) in order to mitigate the impact of batch effects. Rather than quantile-normalizing 454 a 2D matrix, we extended the design to a 3D matrix containing the following components: