rawLAF <- c(rnorm(300, 0.2, 0.05), rnorm(300, 0.4, 0.05), rnorm(200, 0.3, 0.05),
rnorm(200, 0.2, 0.05), rnorm(200, 0.3, 0.05), rnorm(250, 0.4, 0.05))
germLAF <- c(rnorm(800+650, 0.4, 0.05))
rawLAF <- ifelse(rawLAF>0.5, 1-rawLAF, rawLAF)
germLAF <- ifelse(germLAF>0.5, 1-germLAF, germLAF)
reads1 <- c(rpois(300, 25), rpois(300, 50), rpois(200, 60), rpois(200, 25),
rpois(200, 40), rpois(250, 50))
reads2 <- rpois(800+650, 50)
chr <- c(rep("chr1", 800), rep("chr2", 650))
position <- c(seq(1, 16000000, by=20000), seq(1, 13000000, by=20000))
zygo <- rep("het", 800+650)
x <- data.frame(chr, as.integer(position), as.character(zygo), as.integer(reads1), rawLAF, as.integer(reads2), germLAF)
colnames(x) <- c("seqnames", "start", "zygosity", "tCount", "LAF", "tCountN", "germLAF")
data <- SomatiCAFormat(x)
data(GCcontent)
res <- SomatiCApipe(data, mcmc = 10000, burnin = 5000, rss=FALSE, GC=GCcontent)
Run the code above in your browser using DataLab