Description Usage Arguments Value Author(s) References Examples
To calculate composite linkage disequilibrium (r2) between HLA locus and SNP markers.
1 | hlaGenoLD(hla, geno)
|
hla |
an object of |
geno |
an object of |
Return a vector of linkage disequilibrium (r2) for each SNP marker.
Xiuwen Zheng
Weir BS, Cockerham CC: Complete characterization of disequilibrium at two loci; in Feldman MW (ed): Mathematical Evolutionary Theory. Princeton, NJ: Princeton University Press, 1989.
Zaykin, D. V., Pudovkin, A., and Weir, B. S. (2008). Correlation-based inference for linkage disequilibrium with multiple alleles. Genetics 180, 533-545.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # plot linkage disequilibrium
ymax <- 0.16
plot(NaN, NaN, xlab="SNP Position (in KB)",
ylab="Composite Linkage Disequilibrium (r2)",
xlim=range(HapMap_CEU_Geno$snp.position)/1000, ylim=c(0, ymax),
main="Major Histocompatibility Complex")
hla.list <- c("A", "C", "DQA1")
col.list <- 1:3
# for-loop
for (i in 1:3)
{
hla.id <- hla.list[i]
# make a "hlaAlleleClass" object
hla <- hlaAllele(HLA_Type_Table$sample.id,
H1 = HLA_Type_Table[, paste(hla.id, ".1", sep="")],
H2 = HLA_Type_Table[, paste(hla.id, ".2", sep="")],
locus=hla.id, assembly="hg19")
# linkage disequilibrium between HLA locus and SNP markers
ld <- hlaGenoLD(hla, HapMap_CEU_Geno)
# draw
points(HapMap_CEU_Geno$snp.position/1000, ld, pch="*", col=i)
x <- (hla$pos.start/1000 + hla$pos.end/1000)/2
abline(v=x, col=col.list[i], lty=3, lwd=2.5)
points(x, ymax, pch=25, col=7, bg=col.list[i], cex=1.5)
}
legend("topleft", col=col.list, pt.bg=col.list, text.col=col.list, pch=25,
legend=paste("HLA -", hla.list))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.