library(genotype)
n.sim = 10000

homogenotypes = rep('A')

Impacte de la profondeur de séquençage

p.hetero = 1/1000
error.rate = 1/100
merror = error_jc(rate = error.rate)
couvertures =1:50
success.homo = numeric(length = length(couvertures))
i = 0
for (c in couvertures) {
  s = simulate_sites(rep('A',n.sim),
                     rep('A',n.sim),
                     coverage = c,
                     error = merror)
  g = genotyping(s,sequencing.error = error.rate,phetero = p.hetero)
  i = i+1
  success.homo[i] = sum(g$ok) 
}
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3J9CmxpYnJhcnkoZ2Vub3R5cGUpCmBgYAoKCmBgYHtyfQpuLnNpbSA9IDEwMDAwCgpob21vZ2Vub3R5cGVzID0gcmVwKCdBJykKYGBgCgojIEltcGFjdGUgZGUgbGEgcHJvZm9uZGV1ciBkZSBz6XF1ZW7nYWdlCgpgYGB7cn0KcC5oZXRlcm8gPSAxLzEwMDAKZXJyb3IucmF0ZSA9IDEvMTAwCm1lcnJvciA9IGVycm9yX2pjKHJhdGUgPSBlcnJvci5yYXRlKQpjb3V2ZXJ0dXJlcyA9MTo1MApgYGAKCmBgYHtyfQpzdWNjZXNzLmhvbW8gPSBudW1lcmljKGxlbmd0aCA9IGxlbmd0aChjb3V2ZXJ0dXJlcykpCmkgPSAwCmZvciAoYyBpbiBjb3V2ZXJ0dXJlcykgewogIHMgPSBzaW11bGF0ZV9zaXRlcyhyZXAoJ0EnLG4uc2ltKSwKICAgICAgICAgICAgICAgICAgICAgcmVwKCdBJyxuLnNpbSksCiAgICAgICAgICAgICAgICAgICAgIGNvdmVyYWdlID0gYywKICAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBtZXJyb3IpCiAgZyA9IGdlbm90eXBpbmcocyxzZXF1ZW5jaW5nLmVycm9yID0gZXJyb3IucmF0ZSxwaGV0ZXJvID0gcC5oZXRlcm8pCiAgaSA9IGkrMQogIHN1Y2Nlc3MuaG9tb1tpXSA9IHN1bShnJG9rKSAKfQpgYGAK