hap.convert: Convert gbs objects to other formats.

Description Usage Arguments Output Author(s) Examples

Description

Takes in a gbs object and converts it to formats suitable for other analysis programs and packages.

Usage

1
2
3
hap.convert(hap, output, write.file = FALSE, filename, parents = NULL,
  encoding = c(-1, 0, 1), genotypes = c("A", "C", "G", "T"), het = "H",
  missing = c("N", NA), pheno)

Arguments

hap

The gbs object to convert.

output

The target format(s).

write.file

Should the converted object be written?

filename

A name to use as the base for the output file.

parents

Two columns or names of the parents for RQTL and AB format.

encoding

The numbers that should be used to numerically encode alleles (minor, het, major).

genotypes

A vector of symbols to denote genotype calls in the gbs object.

het

A vector of symbols to denote heterozygous calls in the gbs object.

missing

A vector of symbols used to denote missing data in the gbs object.

pheno

A data frmae of phenotypes to include in R/qtl output. See details.

Output

AB, GENO, RQTL, GAPIT, STRUCTURE, FSTRUCTURE, DNASP, PHYLIP

R/qtl

If the a pheno data frame is included, The first column should contain the same names as the individials in the gbs object and every subsequent column should correspond to a phenotype.

Author(s)

Trevor Rife, trife@ksu.edu

Narinder Singh, nss470@ksu.edu

Examples

1
2
3
4
data(dh)
dh = hap.collapse(dh,names=c("TIGER","DANBY"),match=0.9)
dh.ab = hap.convert(dh,output="AB",parents=c("tiger","danby"))$AB
dh.ab[1:10,1:10]

trife/gbs documentation built on May 31, 2019, 7:53 p.m.