Description Usage Arguments Value Examples
convert PolyHaplotyper input data to Happy-inf format for a single haploblock
1 2 | make.Happyinf.input(mrkDosage, indiv=NULL, haploblock,
ploidy, fname)
|
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 Happy-inf input data. Default NULL includes all individuals |
haploblock |
a list of character vectors. The names are the names of the haploblocks, the character vectors have the names of the markers in each haploblock. Only the markers in haploblock will be included in the Happy-inf input data |
ploidy |
single integer: the ploidy level |
fname |
filename of a tab-separated output file: this will contain the data in Happy-inf format (the saved data.frame is also the return value). If "" no file is written |
a data.frame in the Happy-inf input format: a header row with "SNPID", "block" and names of the individuals and one row per marker, with only the individuals, markers and blocks as specified. #'SNPID has the marker names, "Block" the haploblock names. All markers of a haploblock are in contiguous rows. Missing dosages are represented by "NA"
1 2 3 4 | data(PolyHaplotyper_small)
HAPin <- make.Happyinf.input(mrkDosage=phdos, haploblock=phblocks,
ploidy=6, fname="")
HAPin[,1:8]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.