Berkshire 2024 progeny testing

Data formatting, checking

Author

Juan Steibel

Published

January 4, 2025

Start reading historical data and current placement data

[1] "C:/Users/jsteibel/OneDrive/Documents/Berkshire/Prog"

Read master data

Join placement, phenotype

Meat quality data includes many spreadsheets that are imported and compiled into one single table. I took care to link all records by the ID (last 4 digitst of RFID)

 [1] "Pen"                                        
 [2] "ID"                                         
 [3] "Kill Date"                                  
 [4] "Kill Group"                                 
 [5] "Sequence Number"                            
 [6] "Sex"                                        
 [7] "On-Test Block"                              
 [8] "On-Test Date"                               
 [9] "Penn State  On-Test Wt (kg)"                
[10] "Penn State Live Weight (kg)"                
[11] "LK converted Live Weight (kg to lb)"        
[12] "Ohio State converted Live Weight (kg to lb)"
[13] "Ohio State Live Weight (lb)"                
[14] "Transport Shrink (%)"                       
[15] "Hot Carcass Weight (lb)"                    
[16] "Dressing Percentage (%)"                    
[17] "Carcass Length (cm)"                        
[18] "Backfat (in)"                               
[19] "Loin Eye Area (sq. in.)"                    
[20] "Ultimate pH"                                
[21] "Minolta Sequence"                           
[22] "L*"                                         
[23] "a*"                                         
[24] "b*"                                         
[25] "Hunter L"                                   
[26] "Hunter a"                                   
[27] "Hunter b"                                   
[28] "Y"                                          
[29] "NPB Color"                                  
[30] "NPB Marbling"                               
[31] "NPPC Firmness"                              
[32] "Intramuscular Fat IMF (%)"                  
[33] "Purge Loss (%)"                             
[34] "Cooking Loss (%)"                           
[35] "WB Shear Force (kg)"                        
[36] "Sensory Tenderness (1-10 scale)"            
[37] "Sensory Juiciness (1-10 scale)"             
[38] "Sensory Chewiness (1-10 scale)"             
[39] "Sensory Pork Flavor (1-10 scale)"           
 [1] "ID"                 "Visual Tag"         "Tag ID"            
 [4] "Pen"                "Sex"                "Entry Name"        
 [7] "Complete Sire Name" "ABA reg. #"         "Front"             
[10] "Rear"              

THis is by far the longest data wranging operation including three tables: Placement, weight and MQ. Several steps take place here:

  1. select variables in each table

  2. rename variables as needed

  3. compute ADG for the whole test period (april-august weights)

  4. Transform Share force to starprobe units using equation from ISU paper (Figure 4): Instron_kg=WBSF_KG*0.8143+3.4416, please see ABA reports Cybox folder.

  5. Compute LEA from provided data

Note: How LEA was computed: Take 2 columns from LEA spreadsheet (Dots and Initial), LEA=Dots/20+Initial. It has been confirmed by PU

Finally, raw data is saved.

Pigs per SIRE

Eliminate sires that don’t have to be included according to Lance’s indications

# A tibble: 10 × 2
   Sire                               cnt
   <fct>                            <dbl>
 1 DKNS3 Django 7-3 (A)                 8
 2 DKNS3 Django 7-3 (B)                 8
 3 FKB1 Lakota 17-4                     8
 4 FKB2 SEAL Team 6 26-8 (A)            6
 5 FKB2 SEAL Team 6 26-8 (B)            7
 6 JBM2 Machine 30-1                    8
 7 KURO Saki II 95-9                    8
 8 KURO1 Rumbolds Peter Lad 14 15-9     8
 9 KURO2 Black Stallion 58-9            7
10 KURO3 Rosette Count 11-9             8

Compare this year’s results to data up to 2023

This is important to make sure we are working in the same range for all phenotypes and that we can join data for computing correction factors.

The following phenotypes are compared between the two datasets:

 [1] "Year"             "ID"               "Pen"              "Breeder"         
 [5] "Sire"             "Gender"           "On_Test_Date"     "On_Test_WT"      
 [9] "Off_Test_Date"    "Off_Test_Weight"  "On-Test_Days"     "On-Test_ADG"     
[13] "Soundness_Score"  "Market_Date"      "Market_Weight"    "Carcass_BF10"    
[17] "Carcass_LEA"      "48h_Loin_pH"      "Visual_Color"     "Visual_Marbling" 
[21] "Visual_Firmness"  "Minolta_Y"        "Minolta_L*"       "Hunter_L"        
[25] "Thaw_Purge"       "Cook_Loss"        "Juiciness_Score"  "Tenderness_Score"
[29] "Instron_kg"       "Percent_IMF"     

The comparison is on the basis of the mean value per year and sex of the pigs in the progeny test. It is EXTREMELY important that ABA reviews these results and flag anything that may not make sense. We are on time to make adjustments as long as sire evaluations are not published.


    2024 previous 
    1292    10084 

Compare means

This table shows the mean value (average) for Barrows (B) and Gilts (G) in the current test (2024) and in previous tests.

Again: extremely important to check this.

Observations of some results: It is extremely important to review all this carefully before proceeding

I can provide a full comparison in case it is useful for a discussion.

Full comparison between years

Not showing this anymore, but it is available

Computing corrections factors and adjustments

Records need to be adjusted for sex effects. To accomplish this, for each phenotype I fit a model that includes: Sire (random effect), Off_Test_Date (random effect), Sex and Off_Test_Weight.

Everything but Sex are so called “nuisance” effects (effects we want to account for but that we are not interested in yet). Sex, on the other hand, is our effect of interest. We decide if there is a sex difference or not and then we figure out the correction factors for each phenotype such that corrected phenotypes will be comparable regardless of the sex of the tested pig.

Check sire sample sizes and mean phenotypes

All results are available upon request

# A tibble: 10 × 3
   Sire                              mins  maxs
   <fct>                            <int> <int>
 1 DKNS3 Django 7-3 (A)                 8     8
 2 DKNS3 Django 7-3 (B)                 7     8
 3 FKB1 Lakota 17-4                     8     8
 4 FKB2 SEAL Team 6 26-8 (A)            6     6
 5 FKB2 SEAL Team 6 26-8 (B)            7     7
 6 JBM2 Machine 30-1                    8     8
 7 KURO Saki II 95-9                    8     8
 8 KURO1 Rumbolds Peter Lad 14 15-9     8     8
 9 KURO2 Black Stallion 58-9            7     7
10 KURO3 Rosette Count 11-9             8     8

Sex Correction factor using all data

Results available upon request

#long_joint

rst<-joint_DT%>%
  group_modify(~ lmer(value~(1|Sire)+(1|Off_Test_Date)+Gender+Off_Test_Weight,data= .x)%>%
                 emmeans(.,specs=~Gender)%>%pairs()%>%as.data.frame())%>%
                 mutate(Barrow=-(p.value<0.05)*estimate/2,Gilt=(p.value<0.05)*estimate/2)%>%
                 select(Phenotype,contrast,Barrow, Gilt)
boundary (singular) fit: see help('isSingular')
datatable(rst)%>%formatRound(columns=c('Barrow','Gilt'), digits=3)

Sex correction factors using only 2024 data

I repeated calculations of the sex correction factors for 3 datasets: 1) all data (above) 2) all data up to 2023, Used by Matt Ritter last year and not shown 3) only 2024 data (below)

General conclusion from these results: Using all data for computing sex adjustment vs using only 2024 data gives similar factors, but, as expected, the factors based on a very small dataset (2024) often are not significant and end up on a zero correction factor.

One particularly different result this year is the one for meat color

ABA should discuss this with Steibel to confirm that initial choice of using all data is still acceptable Using the sex correction factors from all data for now on.

NPPC’s equations, used before for every Berkshire evaluation

  1. Adjusted ADG=ADG+0.005*(90-ON-Test-weight). Note: BF and Weight in lb
  2. Adjusted BF10=BF10+(290-Market_Weight)*(BF10/(Market_Weight-c)) note: c=30 for barrows and 5 for gilts
  3. Adjusted LEA=LEA+(290-Market_Weight)*(LEA/(Market_Weight+155))
# A tibble: 700 × 31
   Gender yr       Off_Test_Date Year  ID    Pen   Breeder    Sire  On_Test_Date
   <fct>  <fct>    <fct>         <fct> <chr> <fct> <chr>      <fct> <chr>       
 1 B      previous 42798         2017  36    1     Brummer    KURO… 42693       
 2 B      previous 42798         2017  37    1     Brummer    KURO… 42693       
 3 B      previous 42820         2017  38    1     Brummer    KURO… 42693       
 4 G      previous 42820         2017  39    1     Brummer    KURO… 42693       
 5 G      previous 42798         2017  40    1     Brummer    KURO… 42693       
 6 B      previous 42784         2017  41    1     Brummer    KURO… 42693       
 7 B      previous 42784         2017  42    1     Brummer    KURO… 42693       
 8 B      previous 42784         2017  43    1     Brummer    KURO… 42693       
 9 B      previous 42784         2017  8717  2     Evergreen… EHB5… 42679       
10 B      previous 42798         2017  8719  2     Evergreen… EHB5… 42679       
# ℹ 690 more rows
# ℹ 22 more variables: On_Test_WT <dbl>, Off_Test_Weight <dbl>,
#   `On-Test_Days` <dbl>, Market_Date <chr>, Market_Weight <dbl>,
#   `On-Test_ADG` <dbl>, Soundness_Score <dbl>, Carcass_LEA <dbl>,
#   `48h_Loin_pH` <dbl>, Visual_Color <dbl>, Visual_Marbling <dbl>,
#   Visual_Firmness <dbl>, Minolta_Y <dbl>, `Minolta_L*` <dbl>, Hunter_L <dbl>,
#   Thaw_Purge <dbl>, Cook_Loss <dbl>, Juiciness_Score <dbl>, …

Sex adjustments using previously computed coefficients (historical data)

Explained above. Here I include some graphics to show the effect of these corrections

Per-sire summary

In this section, I prepared the data for computing sire summaries and also corrected by year mean, which is needed for the selection indexes. This table is sortable and searchable.

Compute selection indexes using ABA index equations

Indexes are computed and joined to the individual phenotype summaries. Two tables are presented: 1) table only for indexes. 2) A wide table for all evaluated traits.

Producer-specific reports

Per-breeder individual reports are generated for all pigs that finished the test, but they are written to breeder-specific excell files for sharing with each breeder individually.