Avaliação individual do grupo 2 formado a partir dos marcadores contidos neste arquivo. Para mais informações acesse a página principal.

1 Carregando dados gerados na pagina principal

load("LGs_force_HMM_Markers_First_Check.RData")
load("LGs_safe_HMM_Markers_First_Check.RData")


library(onemap)
data1 <- read_mapmaker(file = "data_with_head.raw")
LOD <- suggest_lod(data1)
rf2points <- rf_2pts(data1, LOD = LOD, max.rf = 0.5)

2 Breve comparação com o mapa publicado

Desde já podemos comparar os grupos formados com o mapa já publicado, para sabermos a correspondência entre ambos. Para facilitar, fizemos esta tabela com os nomes dos marcadores que compoem o mapa publicado, sendo que cada coluna da tabela corresponde à um grupo de ligação.

ref <- read.csv(file = "LG.csv", stringsAsFactors = FALSE)
names <- colnames(data1$geno)[LGs.HMM.force[[2]]$seq.num]

comp <- pos <- lgs <- pos2 <- num_lgs <- list()
for (i in 1:length(ref)){
  comp[[i]] <- ref[[i]] %in% names
  pos[[i]] <- which(comp[[i]] == TRUE)
  lgs[[i]] <- ref[[i]][pos[[i]]]
  pos2[[i]] <- names %in% lgs[[i]]
  num_lgs[[i]] <- LGs.HMM.force[[2]]$seq.num[pos2[[i]]]
}

comp

Com as informações da tabela sabemos que o grupo 2 formado tem marcadores que estavam presentes no grupo 2 do mapa publicado.

3 Comparando “safe” e “force”

#Marcadores presentes no "force" e ausentes no "safe" de HMM
comp_unsafe <- LGs.HMM.force[[2]]$seq.num %in% LGs.HMM.safe[[2]]$seq.num
pos_unsafe <- which(comp_unsafe == FALSE)
unsafe <- LGs.HMM.force[[2]]$seq.num[pos_unsafe]
unsafe 

rf_graph_table(LGs.HMM.force[[1]], scale = 2.2, main = paste("LG", 1, "- HMM"),
               inter = FALSE)

4 Removendo marcadores duvidosos

Aqui aderimos a ordem dada pela opção “safe” e removemos também o marcador 45 conforme observação do heatmap.

Temp <- c(45)

Exc <- LGs.HMM.safe[[2]]$seq.num %in% Temp

pos <- which(Exc == TRUE)

LG2.Exc <- LGs.HMM.safe[[2]]$seq.num[-pos]

LG2 <- make_seq(rf2points, LG2.Exc)

LG2

LG2.ord <- order_seq(LG2, n.init = 5, THRES = 3,
                     touchdown = FALSE, draw.try = FALSE)


LG2.ord.seq <- make_seq(LG2.ord, "force")


rf_graph_table(LG2.ord.seq, scale = 2.2, main = paste("LG", 2, "- HMM"),
               inter = FALSE)

5 Inserindo novamente os marcadores

unsafe

colnames(data1$geno)[81]
data1$segr.type[81]

Exten.LG2 <- try_seq(LG2.ord.seq, 81)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.ord.seq
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 

###

Exten.LG2 <- try_seq(LG2.exp, 99)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 

###

Exten.LG2 <- try_seq(LG2.exp, 274)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 


######

Exten.LG2 <- try_seq(LG2.exp, 128)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 

####

Exten.LG2 <- try_seq(LG2.exp, 317)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 

#####

Exten.LG2 <- try_seq(LG2.exp, 331)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 

#########

Exten.LG2 <- try_seq(LG2.exp, 299)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 

##########

Exten.LG2 <- try_seq(LG2.exp, 189)

Exten.LG2

pos <- Exten.LG2$LOD == 0

pos <- which(pos == TRUE)

Check <- make_seq(Exten.LG2, pos)

LG2.exp
Check

c(LG2.ord.seq$seq.like, Check$seq.like) 

rf_graph_table(Check, scale = 1.5, main = paste("LG", 1, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

LG2.exp <- make_seq(Exten.LG2, pos) 


LG2 <- LG2.exp

rf_graph_table(LG2, scale = 1.5, main = paste("LG", 2, "- HMM"),
               inter = FALSE, axis.cex = 0.75)

save(LG2, file = "LG2.Rdata")

##############
# Sobraram:

trash <- LGs.HMM.force[[2]]$seq.num %in% LG2.exp$seq.num
pos <- which(trash == FALSE)
trash <- LGs.HMM.force[[2]]$seq.num[pos]
trash 
## [1] 225  45

Ao serem inseridos no mapa, esses marcadores aumentavam o tamanho, diminuiam a verossimilhança e fugiam do padrão esperado no heatmap