setwd('C:\\Users\\username\\directory') library(genetics) library(LDheatmap) d <- read.table("d.txt", header=F, sep="\t") dim(d) # use the information obtained from the dim command in the following step to subset genotypic data: dsnp <- d[,3:372] d <- t(dsnp) colnames(d) <- as.character(unlist(d[1,])) d = d[-1,] d <- as.data.frame(d) dnum <- ncol(d) for(o in 1:dnum){d[,o]<-as.genotype(d[,o])} class(d[,1]) #check that your genotypes are truly genotype objects</pre> <pre># subset the marker distance/genomic map ddist <- d[,2] ddist <- as.numeric(ddist) # run LDheatmap and draw the plot dHeatmap <- LDheatmap(d, ddist, LDmeasure = "r", add.map = F, add.key=F) This, as I said, makes the plot above. But, when you are running the code across all chromosomes in a genome, then you want to see a clearer picture of what is happening in pairwise chromosomes.
अर्को चलाउनुहोस्ParaCrawl Corpus ParaCrawl Corpus