gcaCompute: GCA computation

View source: R/otherFunc.r

gcaComputeR Documentation

GCA computation

Description

Calculate parental general combining ability (GCA) based F1 phenotypic values.

Usage

gcaCompute(phe_df,which,trait)

Arguments

phe_df

Phenotypic data frame, row represents F1 combination and includes the paternal information in columns.

which

The column index of male or female to compute parternal or maternal GCA.

trait

A character string to define which trait GCA will be computed, this function support two or more phenotypic GCA be computed at the same time.

Value

A data frame involves of target trait GCA.

Author(s)

Qian Cheng, Shuqin Jiang, Xiangfeng Wang

Examples

## simulation data
df <- data.frame(seqname = paste0("sample",1:500),
                 female_ID = sample(paste0("female",1:20), size = 500, replace = TRUE),
                 male_ID = sample(paste0("male",1:10), size = 500, replace = TRUE),
                 trait = rnorm(500, mean = 225, sd = 20))
plot(density(df$trait))

## compute GCA of female lines
gcaRes <- gcaCompute(df,which = "female_ID",trait = "trait")

GOVS-pack/GOVS documentation built on Oct. 9, 2022, 8:29 a.m.