runGPCP: Genomic Prediction of Cross Performance This function...

View source: R/gpcp.R

runGPCPR Documentation

Genomic Prediction of Cross Performance This function performs genomic prediction of cross performance using genotype and phenotype data.

Description

Genomic Prediction of Cross Performance This function performs genomic prediction of cross performance using genotype and phenotype data.

Usage

runGPCP(
  phenotypeFile,
  genotypeFile,
  genotypes,
  traits,
  weights = NA,
  userSexes = "",
  userFixed = NA,
  userRandom = NA,
  Ploidy = NA,
  NCrosses = NA
)

Arguments

phenotypeFile

A data frame containing phenotypic data, typically read from a CSV file.

genotypeFile

Path to the genotypic data, either in VCF or HapMap format.

genotypes

A character string representing the column name in the phenotype file for the genotype IDs.

traits

A string of comma-separated trait names from the phenotype file.

weights

A numeric vector specifying weights for the traits.

userSexes

A string representing the column name corresponding to the individuals' sexes.

userFixed

A string of comma-separated fixed effect variables.

userRandom

A string of comma-separated random effect variables.

Ploidy

An integer representing the ploidy level of the organism.

NCrosses

An integer specifying the number of top crosses to output.

Value

A data frame containing predicted cross performance.

Examples

# Load phenotype data from CSV
phenotypeFile <- read.csv(system.file("extdata", "phenotypeFile.csv", package = "gpcp"))
genotypeFile <- system.file("extdata", "genotypeFile_Chr9and11.vcf", package = "gpcp")
finalcrosses <- runGPCP(
    phenotypeFile = phenotypeFile,
    genotypeFile = genotypeFile,
    genotypes = "Accession",
    traits = "YIELD,DMC",
    weights = c(3, 1),
    userFixed = "LOC,REP",
    Ploidy = 2,
    NCrosses = 150
)
print(finalcrosses)

gpcp documentation built on April 12, 2025, 1:17 a.m.