do.gs: do.gs function

Description Usage Arguments Examples

View source: R/do_gs.R

Description

This function allows you to pull data from the oat data base or similar

Usage

1
2
do.gs(geno = NULL, pheno = NULL, id = NULL, cross.valid = F,
  prog.valid = F, tp.size = NULL, nrep = NULL, trait = NULL)

Arguments

geno

REQUIRED matrix #matrix with geno x markers, marker names are first row and lines are first col. cell[1,1] is empty

pheno

REQUIRED data.frame #data frame with first col as line name, next are the data. line name must be "line_name"

id

OPTIONAL data.frame #data frame with fist col as line name, next is class where "prog" is the progney validation and "train" is the TP

cross.valid

OPTIONAL T/F # T/F to do cross validation, either prog.valid and/or cross.valid must be set to T

prog.valid

OPTIONAL T/F # T/F to do prog validation, either prog.valid and/or cross.valid must be set to T

tp.size

OPTIONAL number # must be specified if cross.valid=T; fraction of whole pop to use as the training pop (0-1)

nrep

OPTIONAL number # must be specified if cross.valid=T; number of bootrap itterations of of cross validation (1-inf)

trait

REQUIRED character string #name of trait in pheno file, i.e. "GrainYield"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
### example data
geno<-read.csv("geno.example.csv", head=T, stringsAsFactors = F)
pheno<-read.csv("pheno.example.csv", head=T, stringsAsFactors = F )
id<-read.csv("ids.csv", head=T, stringsAsFactors = F )
### done by user
do.gs(geno=geno, id = id, pheno = pheno, cross.valid =T, prog.valid = T, 
     tp.size= 0.7, nrep = 5, trait= "GrainYield")
do.gs(geno=geno, pheno = pheno, cross.valid =T, 
     tp.size= 0.7, nrep = 5, trait= "GrainYield")
# just prog valid
do.gs(geno=geno, id = id, pheno = pheno, prog.valid = T, trait= "GrainYield")

austinjcase/BreedR documentation built on May 16, 2019, 6:45 p.m.