Rstudio: Error in LDheatmap

rstudio

#1

i have a problem when i use LDheatmap.
Rstudio reported an error: column 1 is not a genotype object
Please help me to solve this problem.

###LDheatmap in CHR1
CHR1.b.FT_drought <- subset(CHR_drought, CHR == 1 & BP <= 7000000 & BP >= 6400000)
dist_CHR1.b_FT_drought <- CHR1.b.FT_drought$BP
SNPname.CHR1.b <- CHR1.b.FT_drought$SNP
dim(CHR1.b.FT_drought)
[1] 49 190
CHR1.b.FT_drought <-CHR1.b.FT_drought[,c(5:189)]
colnames(CHR1.b.FT_drought) <- NULL
CHR1.b.FT_drought <- as.data.frame(t(CHR1.b.FT_drought), row.names = T)
colnames(CHR1.b.FT_drought) <- SNPname.CHR1.b
CHR1.b.FT_drought <- makeGenotypes(CHR1.b.FT_drought, method = as.genotype)
###ldhm
ldhm.CHR1.b.FT_drought <- LDheatmap(CHR1.b.FT_drought, genetic.distances = dist_CHR1.b_FT_drought, LDmeasure = "r",

  •                                  add.map = TRUE, add.key = TRUE, flip = TRUE, color = heat.colors(12))
    

Error in LDheatmap(CHR1.b.FT_drought, genetic.distances = dist_CHR1.b_FT_drought, :
column 1 is not a genotype object

Here is my data

Dj03_15206647F Sj03_15208644R Dj03_15208660R Sj03_15215915R Dj03_15224751R Sj03_15224760F Dj03_15290330R
1 AA CC TT TT AA GG AA
2 TT GG AA TT TT AA TT
3 TT GG AA TT TT AA TT
4 AA CC AA AA AA GG AA
5 AA CC AA AA AA GG AA
6 TT GG AA TT TT AA TT