Title: | Stability Analysis in Crop Breeding |
---|---|
Description: | Provides tools for crop breeding analysis including Genetic Coefficient of Variation (GCV), Phenotypic Coefficient of Variation (PCV), heritability, genetic advance calculations, stability analysis using the Eberhart-Russell model, two-way ANOVA for genotype-environment interactions, and Additive Main Effects and Multiplicative Interaction (AMMI) analysis. These tools are developed for crop breeding research and stability evaluation under various environmental conditions. The methods are based on established statistical and biometrical principles. Refer to Eberhart and Russell (1966) <doi:10.2135/cropsci1966.0011183X000600010011x> for stability parameters, Fisher (1935) "The Design of Experiments" <ISBN:9780198522294>, Falconer (1996) "Introduction to Quantitative Genetics" <ISBN:9780582243026>, and Singh and Chaudhary (1985) "Biometrical Methods in Quantitative Genetic Analysis" <ISBN:9788122433764> for foundational methodologies. |
Authors: | Prity Kumari [aut, cre] |
Maintainer: | Prity Kumari <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-12-12 07:25:25 UTC |
Source: | https://github.com/cran/CropBreeding |
This function calculates key breeding metrics such as genotypic variance, environmental variance, genotypic coefficient of variation (GCV), phenotypic coefficient of variation (PCV), heritability, and genetic advance (GA). These metrics are critical for assessing genotype performance and genetic potential in crop breeding experiments.
breeding_metrics(data, genotype_col, trait_col, replication_col)
breeding_metrics(data, genotype_col, trait_col, replication_col)
data |
A data frame containing the dataset with required columns. |
genotype_col |
Character. Name of the genotype column. |
trait_col |
Character. Name of the trait column. |
replication_col |
Character. Name of the replication column. |
A list containing:
'ANOVA': The summary of the ANOVA table.
'GenotypicVariance': Genotypic variance, which measures the genetic variability among genotypes.
'EnvironmentalVariance': Environmental variance, which reflects the variability due to environmental factors.
'PhenotypicVariance': Phenotypic variance, the sum of genotypic and environmental variances.
'GCV': Genotypic coefficient of variation, expressed as a percentage of the mean.
'PCV': Phenotypic coefficient of variation, expressed as a percentage of the mean.
'Heritability': Broad-sense heritability, the proportion of phenotypic variance attributable to genetic variance.
'GeneticAdvance': Genetic advance under selection, a measure of genetic improvement.
'GAPercentage': Genetic advance as a percentage of the mean, indicating the relative genetic improvement.
Falconer, D. S. (1996). "Introduction to Quantitative Genetics". ISBN: 9780582243026. Singh, R. K., & Chaudhary, B. D. (1985). "Biometrical Methods in Quantitative Genetic Analysis". ISBN: 9788122433764.
set.seed(123) data <- data.frame( Genotype = rep(c("G1", "G2", "G3"), each = 10), Replication = rep(1:10, times = 3), Trait = c(rnorm(10, 50, 5), rnorm(10, 55, 5), rnorm(10, 60, 5)) ) result <- breeding_metrics(data, "Genotype", "Trait", "Replication") print(result)
set.seed(123) data <- data.frame( Genotype = rep(c("G1", "G2", "G3"), each = 10), Replication = rep(1:10, times = 3), Trait = c(rnorm(10, 50, 5), rnorm(10, 55, 5), rnorm(10, 60, 5)) ) result <- breeding_metrics(data, "Genotype", "Trait", "Replication") print(result)
This function performs a two-way ANOVA to analyze genotype and environment interactions for multiple traits, including replication effects. It provides separate ANOVA results for each specified trait in the dataset.
gxe_analysis_multiple( data, genotype_col, environment_col, replication_col, trait_cols )
gxe_analysis_multiple( data, genotype_col, environment_col, replication_col, trait_cols )
data |
A data frame containing the dataset with required columns. |
genotype_col |
Character. Name of the genotype column. |
environment_col |
Character. Name of the environment column. |
replication_col |
Character. Name of the replication column. |
trait_cols |
A vector of trait column names to analyze. |
A list containing ANOVA results for each trait.
Fisher, R. A. (1935). "The Design of Experiments". ISBN: 9780198522294.
set.seed(123) data <- data.frame( Genotype = rep(c("G1", "G2", "G3"), each = 12), Environment = rep(c("E1", "E2", "E3", "E4"), times = 9), Replication = rep(c("R1", "R2", "R3"), times = 12), Trait1 = c(rnorm(36, 50, 5)), Trait2 = c(rnorm(36, 150, 10)), Trait3 = c(rnorm(36, 250, 15)) ) anova_results <- gxe_analysis_multiple( data = data, genotype_col = "Genotype", environment_col = "Environment", replication_col = "Replication", trait_cols = c("Trait1", "Trait2", "Trait3") ) print(anova_results$Trait1)
set.seed(123) data <- data.frame( Genotype = rep(c("G1", "G2", "G3"), each = 12), Environment = rep(c("E1", "E2", "E3", "E4"), times = 9), Replication = rep(c("R1", "R2", "R3"), times = 12), Trait1 = c(rnorm(36, 50, 5)), Trait2 = c(rnorm(36, 150, 10)), Trait3 = c(rnorm(36, 250, 15)) ) anova_results <- gxe_analysis_multiple( data = data, genotype_col = "Genotype", environment_col = "Environment", replication_col = "Replication", trait_cols = c("Trait1", "Trait2", "Trait3") ) print(anova_results$Trait1)
This function performs Additive Main Effects and Multiplicative Interaction (AMMI) analysis for a single trait to evaluate genotype x environment interactions. It generates biplots and PC1 vs. Trait visualizations without relying on predictions.
perform_ammi_single_trait(data, env_col, gen_col, rep_col, trait_col)
perform_ammi_single_trait(data, env_col, gen_col, rep_col, trait_col)
data |
A data frame containing the dataset with required columns. |
env_col |
Character. Name of the environment column. |
gen_col |
Character. Name of the genotype column. |
rep_col |
Character. Name of the replication column. |
trait_col |
Character. Name of the trait column to be analyzed. |
A list containing:
'analysis': The AMMI analysis results.
'biplot': The biplot (PC1 vs PC2).
'pc1_plot': The PC1 vs Trait plot.
set.seed(123) data <- data.frame( GEN = rep(c("G1", "G2", "G3", "G4"), each = 12), ENV = rep(c("E1", "E2", "E3"), each = 4, times = 4), REP = rep(1:3, times = 16), Y = c(rnorm(12, 50, 5), rnorm(12, 55, 5), rnorm(12, 60, 5), rnorm(12, 65, 5)) ) results <- perform_ammi_single_trait(data, "ENV", "GEN", "REP", "Y")
set.seed(123) data <- data.frame( GEN = rep(c("G1", "G2", "G3", "G4"), each = 12), ENV = rep(c("E1", "E2", "E3"), each = 4, times = 4), REP = rep(1:3, times = 16), Y = c(rnorm(12, 50, 5), rnorm(12, 55, 5), rnorm(12, 60, 5), rnorm(12, 65, 5)) ) results <- perform_ammi_single_trait(data, "ENV", "GEN", "REP", "Y")
This function performs stability analysis for multiple traits across different environments using Eberhart and Russell's regression model provided by the 'metan' package. It computes ANOVA tables and regression parameters for assessing genotype stability.
stability_analysis( data, genotype_col, environment_col, replication_col, trait_cols )
stability_analysis( data, genotype_col, environment_col, replication_col, trait_cols )
data |
A data frame containing the dataset with required columns. |
genotype_col |
Character. Name of the genotype column. |
environment_col |
Character. Name of the environment column. |
replication_col |
Character. Name of the replication column. |
trait_cols |
A vector of trait column names (response variables). |
A list containing results for each trait:
'anova': The ANOVA table for each trait.
'regression': Regression parameters for stability analysis.
Eberhart, S. A., & Russell, W. A. (1966). "Stability Parameters for Comparing Varieties". Crop Science, 6(1), 36–40. doi:10.2135/cropsci1966.0011183X000600010011x
if (!requireNamespace("metan", quietly = TRUE)) { install.packages("metan") } library(metan) # Simulated dataset set.seed(123) data <- data.frame( Genotype = rep(c("G1", "G2", "G3"), each = 12), Environment = rep(c("E1", "E2", "E3", "E4"), times = 9), Replication = rep(1:3, times = 12), Trait1 = c(rnorm(36, 50, 5)), Trait2 = c(rnorm(36, 150, 10)), Trait3 = c(rnorm(36, 250, 15)) ) results <- stability_analysis( data = data, genotype_col = "Genotype", environment_col = "Environment", replication_col = "Replication", trait_cols = c("Trait1", "Trait2", "Trait3") ) print(results$Trait1$anova) print(results$Trait1$regression)
if (!requireNamespace("metan", quietly = TRUE)) { install.packages("metan") } library(metan) # Simulated dataset set.seed(123) data <- data.frame( Genotype = rep(c("G1", "G2", "G3"), each = 12), Environment = rep(c("E1", "E2", "E3", "E4"), times = 9), Replication = rep(1:3, times = 12), Trait1 = c(rnorm(36, 50, 5)), Trait2 = c(rnorm(36, 150, 10)), Trait3 = c(rnorm(36, 250, 15)) ) results <- stability_analysis( data = data, genotype_col = "Genotype", environment_col = "Environment", replication_col = "Replication", trait_cols = c("Trait1", "Trait2", "Trait3") ) print(results$Trait1$anova) print(results$Trait1$regression)