herMarker: Marker Based Heritability Calutation

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
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

Author(s)

Johan Aparicio, j.aparicio@cgiar.org

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# 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")

AparicioJohan/GS documentation built on Oct. 11, 2020, 11:06 p.m.