Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in make_seq_mappoly #74

Open
jeekinlau opened this issue May 22, 2024 · 1 comment
Open

Bug in make_seq_mappoly #74

jeekinlau opened this issue May 22, 2024 · 1 comment

Comments

@jeekinlau
Copy link
Contributor

https://github.com/mmollina/MAPpoly/blame/7bcae98fdeaeb4538a8f087cb7f92386399b9bdb/R/make_seq.R#L57

I think I isolated the problem to start at commit 8f7c232 (all previous commits work) May 1, 2023 @Cristianetaniguti

make_seq_mappoly at some point was broken so that the tutorial lines below are broken. https://rpubs.com/mmollin/tetra_mappoly_vignette

Problem reported by Amaka as she was trying to go through my tutorial https://jeekinlau.github.io/mapping_example/tutorial/Mapping_Example.html. But similar problem can be recreated also with Marcelo's tutorial.

# Marcelo's tutorial

z <- as.numeric(colnames(grs$seq.vs.grouped.snp)[1:12])
LGS<-vector("list", 12)
for(j in 1:12){
    temp1 <- make_seq_mappoly(grs, j, genomic.info = 1)
    tpt <- make_pairs_mappoly(all.rf.pairwise, input.seq = temp1)
    temp2 <- rf_snp_filter(input.twopt = tpt, diagnostic.plot = FALSE)
    lgtemp <- get_genomic_order(temp2)
    LGS[[z[j]]] <- list(seq = make_seq_mappoly(lgtemp), tpt = tpt, ch = z[j])
}

# my tutorial

LGS.inter=vector("list", 7)
for(j in 1:7){
  temp1 = make_seq_mappoly(grs, j, genomic.info=1)
  tpt = make_pairs_mappoly(all.rf.pairwise, input.seq = temp1)
  temp2 = rf_snp_filter(input.twopt = tpt, diagnostic.plot = FALSE)
  tpt2 = make_pairs_mappoly(tpt, input.seq = temp2)
  LGS.inter[[as.numeric(names(table(temp2$chrom))[which.max(table(temp2$chrom))])]] = list(seq = temp2, tpt = tpt2)
}

Current suggestion I gave was to revert to an older build before the problem happens in commit 8f7c232

@mmollina
Copy link
Owner

I will take care of this soon.
As a workaround :

devtools::install_github(repo = "mmollina/mappoly", 
                        ref = "95aa0cf25f2be17a64faf3a13c627b8399c5b52f", 
                        dependencies = TRUE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants