# NOT RUN {
set.seed(1)
n <- 100
ploidy <- 6
## Generate the genotypes of individuals from an F1 population,
## where the first parent has 1 copy of the reference allele
## and the second parent has two copies of the reference
## allele.
genovec <- rgeno(n = n, ploidy = ploidy, model = "f1",
p1geno = 1, p2geno = 2)
## Get the total number of read-counts for each individual.
## Ideally, you would take this from real data as the total
## read-counts are definitely not Poisson.
sizevec <- stats::rpois(n = n, lambda = 200)
## Generate the counts of reads with the reference allele
## when there is a strong bias for the reference allele
## and there is no overdispersion.
refvec <- rflexdog(sizevec = sizevec, geno = genovec,
ploidy = ploidy, seq = 0.001,
bias = 0.5, od = 0)
## Plot the simulated data using plot_geno.
plot_geno(refvec = refvec, sizevec = sizevec,
ploidy = ploidy, seq = 0.001, bias = 0.5)
# }
Run the code above in your browser using DataLab