Open Ahhgust opened 4 months ago
I think it is just that the way I wrote the code requires the first value to be 0
For example this code gives errors / works as commented below
source("https://raw.githubusercontent.com/rwdavies/STITCH/master/STITCH/R/genetic-map.R")
genetic_map <- rbind(
c(16370978, 0.5018727, 1.585395),
c(16372046, 0.4959920, 1.585931)
)
colnames(genetic_map) <- c("position", "COMBINED_rate.cM.Mb.", "Genetic_Map.cM.")
validate_genetic_map(genetic_map) ## throws error
genetic_map[, 3] <- genetic_map[, 3] - genetic_map[1, 3]
validate_genetic_map(genetic_map) ## is fine
Hopefully that's an easy fix for your text files, just read in and remove the genetic map value at the first position.
Thanks! Robbie
Hi! I'm trying to re-use one of our standard genetic maps w/ QUILT (which in turns uses STITCH), and some of the genetic map files are generating the following error. The example (I think) stands on its own, and the extra line of R code to show that the error message (by my eye) doesn't quite track.
I think it has something to do with the genetic map not starting at 0 (presumably the 0 was lost in the liftover), but I cannot say for certain.
The most likely answer is that I managed to muck something up, but for the life of me I cannot see what the error is. Can you take a look? Thanks! -August