DOI: 10.5061/dryad.b8gtht7px
title: Evaluating somatic cell count, the California mastitis test, and infrared thermography for subclinical mastitis detection in meat ewes

description: Mastitis is a major concern in sheep farming. Detecting subclinical
 mastitis, which manifests without apparent signs, is particularly
 challenging. While somatic cell count (SCC) and the California Mastitis
 Test (CMT) are widely used in dairy animals, and infrared thermography has
 shown some promise, their diagnostic performance in meat sheep remains
 under-evaluated. This study aimed to 1) characterize SCC and udder skin
 surface temperature across lactation in subclinically infected and
 uninfected udder halves; 2) determine diagnostic cutoffs for SCC, CMT, and
 thermography; and 3) compare diagnostic performance using receiver
 operating characteristic curves. Milk and thermal data were collected
 weekly from 37 clinically healthy nursing ewes over the first 8 weeks
 postpartum. Infection was defined by ≥100 CFU/mL of a bacterial species.
 Infected udder halves had higher log SCCs than uninfected halves in weeks
 1–4 and 6 postpartum. Infection status did not predict udder skin
 temperature, which was more influenced by ambient temperature. SCC had the
 highest diagnostic performance (AUC = 0.78), with an optimal cutoff of
 148,500 cells/mL (sensitivity = 0.77; specificity = 0.66). The CMT yielded
 an AUC of 0.70 with an optimal cutoff score above negative (i.e., trace or
 positive reaction; sensitivity = 0.77; specificity = 0.51). Udder skin
 temperature had the lowest AUC (0.56). SCC is the most effective of the
 three tools for detecting subclinical mastitis, although CMT may serve as
 a useful on-farm screening tool. Infrared thermography did not detect
 subclinical infection, highlighting the need for further research into
 non-invasive diagnostics.
description: # Evaluating somatic cell count, the California mastitis test, and
 infrared thermography for subclinical mastitis detection in meat ewes This
 repository contains the data and R script used to conduct the descriptive
 and statistical analyses and create the tables and figures referenced in
 the paper of the same name. --- ## Study Overview This study aimed to 1.
 characterize SCC and udder skin surface temperature across lactation in
 infected and uninfected udder halves 2. establish diagnostic cutoff values
 for SCC, CMT, and infrared thermography in detecting subclinical mastitis
 3. compare diagnostic performance among the three methods using receiver
 operating characteristic curves. **Methods:** We collected posterior
 thermal images of the udder and milk samples for bacterial culture, SCC,
 and CMT from each udder half of 37 clinically healthy nursing ewes
 (Polypay, Hampshire, and Targhee) weekly beginning 2-4 days postpartum
 until 8 weeks postpartum. --- ## Files and Descriptions ###
 `Peckler_Adcock_RVS_SheepMastitis_analysis_250512.nb.html` *
 **Description:** R script to characterize somatic cell count and udder
 skin surface temperature over the study period. This script also contains
 code to evaluate and compare the diagnostic performance of SCC, CMT, and
 average udder skin surface temperature. * **Input:**
 `Peckler&Adcock_RVS_SheepMastitisData_250512.xlsx` * **Output:**
 Tables 1-4, Figures 2-6 * **Use:** Open in any web browser or in RStudio
 (*File → Open File*) --- ###
 `Peckler_Adcock_RVS_SheepMastitisData_250512.xlsx` * **Description:**
 Excel file containing the data collected from each udder half of 39 ewes
 weekly over the first 8 weeks of lactation. The second sheet contains
 descriptions of each column variable. *Blank cells in these columns
 indicate NA values. | Variable | Description | |
 --------------------------- |
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `EweID` | Unique ID for each ewe (n=39) | | `DOB` | Ewe's date of birth | | `Breed` | Breed of the ewe (Targhee, Polypay, or Hampshire) | | `Cohort` | Each ewe belonged to a cohort that lambed in Spring or Fall 2021 | | `Parity` | The ewe's total number of lactations (including the current one). Ranges from 1 to 9. | | `ParityGroup` | Ewes were categorized into first, second, third, or &gt;third parity | | `LambingDate` | Date the ewe gave birth | | `LambsBorn` | The number of lambs the ewe birthed | | `LambsReared` | The number of lambs the ewe reared | | `MultipleLambs` | Binary variable indicating whether the ewe reared a single lamb (0) or multiple lambs (1) | | `UdderHalf` | Left (L) or right (R) udder half | | `DateSampled` | Date that the udder half was milk sampled | | `DaysSinceLambing` | The number of days since the ewe lambed when the milk samples were taken. Ranges from 2 to 53 days. | | `WeeksSinceLambing` | The number of weeks since the ewe lambed when the milk samples were taken. Ranges from 1 to 8 weeks. | | `Bacteria1_ID_Sample1`\* | Identification of the first bacterial species (Bacteria1) identified in the culture of the first milk sample taken (Sample1). Milk samples were taken in duplicate for each udder half. | | `Bacteria1_Level_Sample1`\* | Level classifying the number of colony-forming units for the first bacterial species (Bacteria1) identified on the culture of the first milk sample taken (Sample1). | | `Bacteria2_ID_Sample1`\* | Identification of the second bacterial species (Bacteria2) identified in the culture of the first milk sample taken (Sample1). Milk samples were taken in duplicate for each udder half. | | `Bacteria2_Level_Sample1`\* | Level classifying the number of colony-forming units for the second bacterial species (Bacteria2) identified in the culture of the first milk sample taken (Sample1). | | `Bacteria3_ID_Sample1`\* | Identification of the third bacterial species (Bacteria3) identified in the culture of the first milk sample taken (Sample1). Milk samples were taken in duplicate for each udder half. | | `Bacteria3_Level_Sample1`\* | Level classifying the number of colony-forming units for the third bacterial species (Bacteria3) identified in the culture of the first milk sample taken (Sample1). | | `Bacteria1_ID_Sample2`\* | Identification of the first bacterial species (Bacteria1) identified in the culture of the second milk sample taken (Sample2). Milk samples were taken in duplicate for each udder half. | | `Bacteria1_Level_Sample2`\* | Level classifying the number of colony-forming units for the first bacterial species (Bacteria1) identified on the culture of the second milk sample taken (Sample2). | | `Bacteria2_ID_Sample2`\* | Identification of the second bacterial species (Bacteria2) identified in the culture of the second milk sample taken (Sample2). Milk samples were taken in duplicate for each udder half. | | `Bacteria2_Level_Sample2`\* | Level classifying the number of colony-forming units for the second bacterial species (Bacteria2) identified in the culture of the second milk sample taken (Sample2). | | `Sample1Diagnosis`\* | Diagnosis of Sample1, using criteria described in the related article. | | `Sample2Diagnosis`\* | Diagnosis of Sample2, using criteria described in the related article. | | `Diagnosis`\* | Final diagnosis of udder half based on diagnoses from Samples 1 and 2, using criteria described in the related article. | | `BacteriaPresent`\* | Binary variable indicating whether the udder half was considered infected (1) or not (0). | | `Persistence`\* | Binary variable indicating whether the same infection may have been present the previous week (1) or is a new infection (0). | | `Bout`\* | Unique ID for each infection bout that lasted at least two weeks (i.e., considered persistent) | | `BoutDuration`\* | The number of weeks each infection bout lasted. | | `Cure`\* | Binary variable indicating whether the infection spontaneously cured (1) or not (0). | | `CMTScore`\* | Categorical California Mastitis Test result: N (Negative), T (Trace), WP (Weak Positive), DP (Distinct Positive), or SP (Strong Positive) | | `SCCx1000_per_mL`\* | Somatic cell count in thousands per mL of milk | | `FLIRID`\* | Unique photo ID assigned by the FLIR camera software for each thermal image | | `Average_Udder_C`\* | Average udder skin surface temperature (°C) on the sample date | | `Average_Teat_C`\* | Average teat skin surface temperature (°C) on the sample date | | `Max_Udder_C`\* | Maximum udder skin surface temperature (°C) on the sample date | | `Max_Teat_C`\* | Maximum teat skin surface temperature (°C) on the sample date | | `Min_Udder_C`\* | Minimum udder skin surface temperature (°C) on the sample date | | `Min_Teat_C`\* | Minimum teat skin surface temperature (°C) on the sample date | | `Span_Udder_C`\* | Temperature range (max - min) of udder skin surface temperature (°C) on the sample date | | `Span_Teat_C`\* | Temperature range (max - min) of teat skin surface temperature (°C) on the sample date | | `AmbientMax_C` | Maximum ambient temperature (°C) on the sample date, from Visual Crossing weather data | | `AmbientMin_C` | Minimum ambient temperature (°C) on the sample date, from Visual Crossing weather data | | `AmbientAverage_C` | Average ambient temperature (°C) on the sample date, from Visual Crossing weather data | | `FinalDateSampled` | Final sampling date for the udder half in the study | --- ## Requirements * [R](https://www.r-project.org/) * [RStudio](https://posit.co/downloads/) * Basic familiarity with R Markdown or `.nb.html` output files. ---