Description Usage Arguments Value Author(s) References Examples
Takes a recoded (0,1,2,NA) matrix where SNPs are columns and a vector of minor allele frequencies for each column. Returns nxn kinship matrix
1 | realizedAB(W=genoMat,maf=snpInfo$MAF)
|
W |
Matrix where SNPs are columns and lines are rows, no metadata columns. Coded as 0,1,2,NA. |
maf |
Previously calculated minor allele frequencies for each row. |
Returns an nxn kinship matrix
Greg Ziegler
See R package synbreed kinship calculations for original source.
1 2 3 4 5 6 7 8 9 10 | genoMat <- as.matrix(genotype)
class(genoMat) <- "numeric"
genoMat <- t(genoMat)
colnames(genoMat) <- snpInfo$`rs#`
kinship <- realizedAB(genoMat,maf=snpInfo$MAF)
pdf(paste("../results/5.AstleBalding.synbreed.kinship.pdf",sep=""), width = 12, height = 12)
par(mar = c(25,25,25,25))
heatmap.2(kinship, cexRow =.2, cexCol = 0.2, col=rev(heat.colors(256)), scale="none", symkey=FALSE, trace="none")
dev.off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.