make.SATlotyper.input: convert PolyHaplotyper marker data to SATlotyper format

Description Usage Arguments Value Examples

Description

convert PolyHaplotyper marker data (input) to SATlotyper format for a single haploblock.

Usage

1
2
make.SATlotyper.input(mrkDosage, indiv=NULL, markers,
ploidy, phenotype=0, fname)

Arguments

mrkDosage

matrix or data.frame of allele dosages; same as input for inferHaplotypes. Markers are in rows, individuals in columns, each cell has a marker dosage. All marker dosages must be in 0:ploidy or NA

indiv

the names of the individuals to include in the ShesisPlus input data. Default NULL includes all individuals

markers

character vector with the names of the markers in the haploblock; all must occur in mrkDosage

ploidy

single integer: the ploidy level

phenotype

vector with the phenotypes of all individuals, in order of the columns of dosmat; default 0

fname

filename of a *.csv output file: this will contain the data in the SATlotyper format (the saved data.frame is also the return value). If "" no file is written

Value

a data.frame in the SATlotyper input format: a header row with "Genotype" and the marker names, and one row per individual with the individual name plus for each marker the genotype as a sorted string of <ploidy> A's and B's, or <ploidy> N's

Examples

1
2
3
4
data(PolyHaplotyper_small)
SATin <- make.SATlotyper.input(mrkDosage=phdos, markers=phblocks[[1]],
                              ploidy=6, fname="")
head(SATin)

PolyHaplotyper documentation built on June 17, 2021, 5:12 p.m.