Description Usage Arguments Value Examples
View source: R/PolyHaplotyper.R
get the marker dosages from mrkdids (marker dosage IDs)
1 | mrkdid2mrkdos(dosageIDs, nmrk, ploidy, mrknames=NULL)
|
dosageIDs |
vector of marker-dosage-combination IDs (mrkdid) |
nmrk |
character vector of marker names in the haploblock |
ploidy |
the ploidy level, a single positive integer |
mrknames |
a vector of nmrk marker names (default NULL): if not NULL these are used as rownames of the returned matrix |
a matrix with in columns the marker dosages corresponding to the marker dosageIDs, with these mrkdids as colnames, and one row per marker, with marker names as rownames if mrknames are specified
1 2 3 4 5 6 7 8 | # dosages of 3 markers in 3 tetraploid individuals:
mrkdosg <-
matrix(c(1,2,2, 4,0,0, 3,0,2), nrow=3,
dimnames=list(c("mrkA", "mrkB", "mrkC"), c("indiv1", "indiv2", "indiv3")))
# get the "marker dosage IDs":
dids <- mrkdos2mrkdid(mrkDosage=mrkdosg, ploidy=4)
# convert dids back to marker dosages:
mrkdid2mrkdos(dosageIDs=dids, nmrk=3, ploidy=4, mrknames=c("mrkA", "mrkB", "mrkC"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.