Open xukaili opened 4 years ago
Hap_results <- results(hap, gene="Si9g49990")
if (! require("LDheatmap")) install.packages("LDheatmap") if (! require("genetics")) install.packages("genetics") LDsnp <- Hap_results[, !names(Hap_results) %in% c("sample","Info")] LDsnp = LDsnp[,-ncol(LDsnp)] NAs <- LDsnp == "N/N" is.na(LDsnp)[NAs] <- TRUE LDsnp[NAs] <- NA LDsnp = LDsnp[-1,] Dist = as.numeric(LDsnp[1,]) LDsnp = LDsnp[-c(1:6),] num<-ncol(LDsnp) for(i in 1:num){ LDsnp[,i]<-as.genotype(LDsnp[,i]) } rgb.palette <- colorRampPalette(rev(c("#1F77B4", "#AEC7E8", "#FF7F0E")), space = "rgb") LDheatmap(LDsnp, genetic.distances = Dist, flip = TRUE, color=rgb.palette(40))
want to extract results (For V0.0.15)
Plot Gene LDheatmap