Package 'CropBreeding'

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

Help Index


Breeding Metrics Calculation

Description

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.

Usage

breeding_metrics(data, genotype_col, trait_col, replication_col)

Arguments

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.

Value

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.

References

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.

Examples

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)

Two-Way ANOVA for Genotype x Environment Interaction with Multiple Traits

Description

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.

Usage

gxe_analysis_multiple(
  data,
  genotype_col,
  environment_col,
  replication_col,
  trait_cols
)

Arguments

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.

Value

A list containing ANOVA results for each trait.

References

Fisher, R. A. (1935). "The Design of Experiments". ISBN: 9780198522294.

Examples

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)

Perform AMMI Analysis for a Single Trait

Description

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.

Usage

perform_ammi_single_trait(data, env_col, gen_col, rep_col, trait_col)

Arguments

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.

Value

A list containing:

  • 'analysis': The AMMI analysis results.

  • 'biplot': The biplot (PC1 vs PC2).

  • 'pc1_plot': The PC1 vs Trait plot.

Examples

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")

Stability Analysis using Eberhart-Russell Model

Description

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.

Usage

stability_analysis(
  data,
  genotype_col,
  environment_col,
  replication_col,
  trait_cols
)

Arguments

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).

Value

A list containing results for each trait:

  • 'anova': The ANOVA table for each trait.

  • 'regression': Regression parameters for stability analysis.

References

Eberhart, S. A., & Russell, W. A. (1966). "Stability Parameters for Comparing Varieties". Crop Science, 6(1), 36–40. doi:10.2135/cropsci1966.0011183X000600010011x

Examples

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)