Entering edit mode
11.1 years ago
714
▴
110
Does anyone know a way to calculate the p-values for the corresponding r2 and D' output of LDheatmap?
Thanks
Does anyone know a way to calculate the p-values for the corresponding r2 and D' output of LDheatmap?
Thanks
This is now a bit old, but I just saw it - the best way to get to the p-values is not to use LDHeatmap, but to use LD() of the "genetics" library. I don't think LDheatmap even has the capacity of giving you the p-values directly, the reference says nothing.
library(LDHeatmap)
# this is probably how you did it
genotypes <- read.csv("some_file")
LDheatmap(genotypes)
# this is easier
library(genetics)
results <- LD(genotypes)
head(results$p.value) # gives you the beginning of the p-values
head(results$D) # gives you the beginning of D
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.