DOI: 10.5061/dryad.gxd25480n
title: Data from: Life-history and ecological variables as drivers of the evolution of avian innate immune defences

description: Animals rely on immune defences to counteract pathogens and parasites, but
 investing in immune defences limits the use of shared resources for other
 functions. Therefore, the strength of immune defences is hypothesised to
 be shaped by life history or broader ecology. To better understand
 ecological and evolutionary patterns in innate humoral immune defences in
 birds, we compiled more than 400 immunological records of more than 100
 avian species from about 100 previous studies that applied a standardised
 protocol to measure haemolysis and haemagglutination. We extracted data on
 15 life-history and ecological variables and built
 phylogenetically-informed comparative models to determine how these
 variables can explain variation in both immunological indices. We also
 inferred evolutionary patterns by selecting the best-fitting
 macroevolutionary models. Our comparative models indicated that several
 ecological variables, including seasonal stage, sex, age, migration
 distance, diet type, and climatic factors, and only one life-history
 variable, body mass, were able to explain the immunological variation. The
 best macroevolutionary models suggest that both immune indices evolved
 largely through gradual divergence under strong phylogenetic constraints,
 with evidence for stabilising selection within Passeriformes. Overall, our
 results highlight the role of seasonal and demographic pressures,
 alongside phylogenetic history, in shaping immune variation across avian
 species.
description: # Data from: Life-history and ecological variables as drivers of the
 evolution of avian innate immune defences Dataset DOI:
 [10.5061/dryad.gxd25480n](https://doi.org/10.5061/dryad.gxd25480n) ##
 Description of the data and file structure The file
 **‘20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx’**
 contains the raw data for haemagglutination and haemolysis obtained from
 all (sub)populations included in the selected HLHA studies. It also
 includes all explanatory variables required for the Bayesian phylogenetic
 mixed models (BPMMs). The file
 **‘20251010_Peng_et_al_one_observation_per_species_dataset.xlsx’**
 contains the within-species means for haemagglutination and haemolysis.
 These data were calculated from those in
 *20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx*. This
 file also includes the species-level explanatory variables. The file
 **‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’**
 is a reformatted version of
 *‘20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx’*
 prepared specifically for data analysis in RStudio. The file
 **‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’** is a
 reformatted version of
 *‘20251010_Peng_et_al_one_observation_per_species_dataset.xlsx’* prepared
 specifically for data analysis in RStudio. The file
 **‘20250316_birdtree_consensus.newick’** contains the consensus tree
 including all collected avian species. The file
 **‘20251010_correlation_HA_HL_one_observation_per_species.R’** calculates
 the correlation between species-level haemagglutination and haemolysis
 using *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. The file
 **‘20251010_HA_BPMM_multiple_observations_per_species.R’** establishes the
 Bayesian phylogenetic mixed models (BPMMs) explaining variation in
 haemagglutination in relation to life-history traits and ecological
 variables. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. The file
 **‘20251010_HL_BPMM_multiple_observations_per_species.R’** establishes the
 Bayesian phylogenetic mixed models (BPMMs) explaining variation in
 haemolysis in relation to life-history traits and ecological variables. It
 uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. The file
 **‘20251010_HA_evolution_one_observation_per_species.R’** builds the
 macro-evolutionary models and related analyses for haemagglutination
 across species, mainly using
 *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’* and
 *‘20250316_birdtree_consensus.newick’*. The file
 **‘20251010_HL_evolution_one_observation_per_species.R’** builds the
 macro-evolutionary models and related analyses for haemolysis across
 species, mainly using
 *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’* and
 *‘20250316_birdtree_consensus.newick’*. The file
 **‘20251010_HA_nested_ANOVA_multiple_observations_per_species.R’**
 performs nested analyses of haemagglutination at different taxonomic
 levels using (sub)population-level data. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. The file
 **‘20251010_HL_nested_ANOVA_multiple_observations_per_species.R’**
 performs nested analyses of haemolysis at different taxonomic levels using
 (sub)population-level data. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*.   ### Files and variables ####
 File: 20250316_birdtree_consensus.newick **Description:** The file
 **‘20250316_birdtree_consensus.newick’** contains the consensus tree
 including all collected avian species. #### File:
 20251010_correlation_HA_HL_one_observation_per_species.R
 **Description:** The file
 **‘20251010_correlation_HA_HL_one_observation_per_species.R’** calculates
 the correlation between species-level haemagglutination and haemolysis
 using *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HA_evolution_one_observation_per_species.R **Description:** The
 file **‘20251010_HA_evolution_one_observation_per_species.R’** builds the
 macro-evolutionary models and related analyses for haemagglutination
 across species, mainly using
 *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’* and
 *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HA_BPMM_multiple_observations_per_species.R **Description:** The
 file **‘20251010_HA_BPMM_multiple_observations_per_species.R’**
 establishes the Bayesian phylogenetic mixed models (BPMMs) explaining
 variation in haemagglutination in relation to life-history traits and
 ecological variables. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HA_nested_ANOVA_multiple_observations_per_species.R
 **Description:** The file
 **‘20251010_HA_nested_ANOVA_multiple_observations_per_species.R’**
 performs nested analyses of haemagglutination at different taxonomic
 levels using (sub)population-level data. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HL_nested_ANOVA_multiple_observations_per_species.R
 **Description:** The file
 **‘20251010_HL_nested_ANOVA_multiple_observations_per_species.R’**
 performs nested analyses of haemolysis at different taxonomic levels using
 (sub)population-level data. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HL_evolution_one_observation_per_species.R **Description:** The
 file **‘20251010_HL_evolution_one_observation_per_species.R’** builds the
 macro-evolutionary models and related analyses for haemolysis across
 species, mainly using
 *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’* and
 *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HL_BPMM_multiple_observations_per_species.R **Description:** The
 file **‘20251010_HL_BPMM_multiple_observations_per_species.R’**
 establishes the Bayesian phylogenetic mixed models (BPMMs) explaining
 variation in haemolysis in relation to life-history traits and ecological
 variables. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_R_Peng_et_al_one_observation_per_species_dataset.csv
 **Description:** The file
 **‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’** is a
 reformatted version of
 *‘20251010_Peng_et_al_one_observation_per_species_dataset.xlsx’* prepared
 specifically for data analysis in RStudio. ##### Variables * row_no: *
 Order: * Order_code: * Family: * Family_code: * Genus: * Common_name: *
 Latin2: * Subspecies: * alternative_Latin: * notes_Latin: * Diet_Type: *
 Diet_notes: * Diet_Ref: * Social_Structure: * Social_Structure_Ref: *
 migration: * flight_distance_(km): * water_type: * Water_Ref: *
 Clutch_size: * CS_Mean: * Clutch_size_Ref: * mass: * Mass_notes: *
 Mass_Ref: * Max_Lifespan: * Max_Lifespan_notes: * source_type: *
 Max_Lifespan_ref: * breeding_latitude: * abs_breeding_latitude: *
 HL_value_mean: * HA_value_mean: * n_for_species_HL: * n_for_species_HA:
 #### File: 20251010_Peng_et_al_one_observation_per_species_dataset.xlsx
 **Description:** The file
 **‘20251010_Peng_et_al_one_observation_per_species_dataset.xlsx’**
 contains the within-species means for haemagglutination and haemolysis.
 These data were calculated from those in
 *20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx*. This
 file also includes the species-level explanatory variables. #####
 Variables * Order: * Order_code: * Family: * Family_code: * Genus: *
 Common_name: * Latin2: * Subspecies: * alternative_Latin: * notes_Latin: *
 Diet_Type: * Diet_notes: * Diet_Ref: * Social_Structure: *
 Social_Structure_Ref: * migration: * flight_distance_(km): * water_type: *
 Water_Ref: * Clutch_size: * CS_Mean: * Clutch_size_Ref: * mass: *
 Mass_notes: * Mass_Ref: * Max_Lifespan: * Max_Lifespan_notes: *
 source_type: * Max_Lifespan_ref: * breeding_latitude: *
 abs_breeding_latitude: * HL_value_mean: * HA_value_mean: *
 n_for_species_HL: * n_for_species_HA: #### File:
 20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx
 **Description:** The file
 **‘20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx’**
 contains the raw data for haemagglutination and haemolysis obtained from
 all (sub)populations included in the selected HLHA studies. It also
 includes all explanatory variables required for the Bayesian phylogenetic
 mixed models (BPMMs). ##### Variables * Order: * Order_code: * Family: *
 Family_code: * Genus: * Common_name: * Latin2: * Subspecies: *
 alternative_Latin: * notes_Latin: * Diet_Type: * Diet_notes: * Diet_Ref: *
 Social_Structure: * Social_Structure_Ref: * migration: * flight_distance:
 * water_type: * Water_Ref: * Clutch_size: * CS_Mean: * Clutch_size_Ref: *
 mass: * Mass_notes: * Mass_Ref: * Max_Lifespan: * Max_Lifespan_notes: *
 source_type: * Max_Lifespan_ref: * breeding_latitude: *
 abs_breeding_latitude: * seasonal_stage: * seasonal_stage_notes: *
 moulting: * Free_or_captive: * captivity_status_notes: *
 Sampling_season_or_month: * sex: * age_group: *
 Sampling_location_country_or_region: * Sampling_location_specific: *
 Sampling_location_lat1: * Sampling_location_long1: * average_temperature1:
 * precipitation1: * solar_radiation1: * water_vapor_pressure1: *
 wind_speed1: * Bird_origin_location_lat2: * Bird_origin_location_long2: *
 average_temperature2: * precipitation2: * solar_radiation2: *
 water_vapor_pressure2: * wind_speed2: * Habitat_type: *
 Other_measurements: * HL_value: * HL_value_type: * HL_variation: *
 HL_variation_type: * HA_value: * HA_value_type: * HA_variation: *
 HA_variation_type: * Notes_for_value_and_variation: *
 Number_of_birds_per_(sub)pop: * notes_number: * n_for_species_HL: *
 n_for_species_HA: * ref_number: * Reference: #### File:
 20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv
 **Description:** The file
 **‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’**
 is a reformatted version of
 *‘20251010_Peng_et_al_multiple_observations_per_species_dataset.xlsx’*
 prepared specifically for data analysis in RStudio. ##### Variables *
 no.row: * Order: * Order_code: * Family: * Family_code: * Genus: *
 Common_name: * Latin2: * Subspecies: * alternative_Latin: * notes_Latin: *
 Diet_Type: * Diet_notes: * Diet_Ref: * Social_Structure: *
 Social_Structure_Ref: * migration: * flight_distance: * water_type: *
 Water_Ref: * Clutch_size: * CS_Mean: * Clutch_size_Ref: * mass: *
 Mass_notes: * Mass_Ref: * Max_Lifespan: * Max_Lifespan_notes: *
 source_type: * Max_Lifespan_ref: * breeding_latitude: *
 abs_breeding_latitude: * seasonal_stage: * seasonal_stage_notes: *
 moulting: * Free_or_captive: * captivity_status_notes: *
 Sampling_season_or_month: * sex: * age_group: *
 Sampling_location_country_or_region: * Sampling_location_specific: *
 Sampling_location_lat1: * Sampling_location_long1: * average_temperature1:
 * precipitation1: * solar_radiation1: * water_vapor_pressure1: *
 wind_speed1: * Bird_origin_location_lat2: * Bird_origin_location_long2: *
 average_temperature2: * precipitation2: * solar_radiation2: *
 water_vapor_pressure2: * wind_speed2: * Habitat_type: *
 Other_measurements: * HL_value: * HL_value_type: * HL_variation: *
 HL_variation_type: * HA_value: * HA_value_type: * HA_variation: *
 HA_variation_type: * Notes_for_value_and_variation: *
 Number_of_birds_per_(sub)pop: * notes_number: * n_for_species_HL: *
 n_for_species_HA: * ref_number: * Reference: ## Code/software All analyses
 were conducted in R version 4.4.2 (R Core Team, 2024). **The packages
 include**: MCMCglmm, dplyr, ape, moments, nlme, geiger, phytools, plotly,
 ggplot2, viridis, RColorBrewer, tidyr, coda. #### File:
 20251010_correlation_HA_HL_one_observation_per_species.R
 **Description:** The file
 **‘20251010_correlation_HA_HL_one_observation_per_species.R’** calculates
 the correlation between species-level haemagglutination and haemolysis
 using *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HA_evolution_one_observation_per_species.R **Description:** The
 file **‘20251010_HA_evolution_one_observation_per_species.R’** builds the
 macro-evolutionary models and related analyses for haemagglutination
 across species, mainly using
 *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’* and
 *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HA_BPMM_multiple_observations_per_species.R **Description:** The
 file **‘20251010_HA_BPMM_multiple_observations_per_species.R’**
 establishes the Bayesian phylogenetic mixed models (BPMMs) explaining
 variation in haemagglutination in relation to life-history traits and
 ecological variables. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HA_nested_ANOVA_multiple_observations_per_species.R
 **Description:** The file
 **‘20251010_HA_nested_ANOVA_multiple_observations_per_species.R’**
 performs nested analyses of haemagglutination at different taxonomic
 levels using (sub)population-level data. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HL_nested_ANOVA_multiple_observations_per_species.R
 **Description:** The file
 **‘20251010_HL_nested_ANOVA_multiple_observations_per_species.R’**
 performs nested analyses of haemolysis at different taxonomic levels using
 (sub)population-level data. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HL_evolution_one_observation_per_species.R **Description:** The
 file **‘20251010_HL_evolution_one_observation_per_species.R’** builds the
 macro-evolutionary models and related analyses for haemolysis across
 species, mainly using
 *‘20251010_R_Peng_et_al_one_observation_per_species_dataset.csv’* and
 *‘20250316_birdtree_consensus.newick’*. #### File:
 20251010_HL_BPMM_multiple_observations_per_species.R **Description:** The
 file **‘20251010_HL_BPMM_multiple_observations_per_species.R’**
 establishes the Bayesian phylogenetic mixed models (BPMMs) explaining
 variation in haemolysis in relation to life-history traits and ecological
 variables. It uses
 *‘20251010_R_Peng_et_al_multiple_observations_per_species_dataset.csv’*
 and *‘20250316_birdtree_consensus.newick’*. ## Access information Other
 publicly accessible locations of the data: * none Data was derived from
 the following sources: * see References in data files