herMarker returns the marker based heritability using sommer package and RKHS function from BGLR package.

herMarker(geno, samp, phen, method = c("RKHS", "sommer"), traits = NULL)

Arguments

geno

The name of the file which the genotypic-data are to be read from or a matrix in the r-environment. Data coded as (-1,0,1)

samp

The name of the file which the genotypes are to be read from or a vector with the genotype names

phen

The name of the file which the phenotypic-data are to be read from or a data.frame in the r-environment.

method

A String c("RKHS","sommer")

traits

NULL by default or a vector with trait names

Value

two components

Examples

# library(tidyverse) # library(sommer) # data(DT_cpdata) # geno <- GT_cpdata # samp <- rownames(GT_cpdata) # phen <- DT_cpdata # tmp <- herMarker(geno, samp, phen, method = c("RKHS","sommer"), traits=NULL) # names(tmp$data) # tmp$data[,-c(4,5)] %>% spread(method,h) # # tmp$data %>% # ggplot(aes(x=method, y=h,fill=method, label=round(h,2)))+ # geom_bar(stat = "identity", position = "dodge" )+ # theme_bw()+ # theme(axis.text.x = element_text(hjust = 1,angle = 75))+ # geom_text(aes(method), size=3,nudge_y = 0.1)+ # facet_wrap(~trait,ncol = 4,scales = "free_x")