View source: R/functions_pool.R
indReads | R Documentation |
This function simulates the contribution, in terms of reads, of each individual of a given pool. Please note that this function works for a single pool and should not be directly applied to situations where multiple pools were used.
indReads(np, coverage, probs)
np |
an integer specifying how many individuals were pooled. |
coverage |
a vector containing the total depth of coverage of a given pool. Each entry of the vector represents a different site. |
probs |
a matrix containing the probability of contribution of each
individual. This matrix can be obtained with the |
a matrix with the number of reads contributed by each individual towards the coverage of its pool. Each row of the matrix is a different individual and each column a different site.
# probability of contribution for 10 individuals at 5 sites
probs <- indProbs(np = 10, nSNPs = 5, pError = 100)
# simulate the number of reads contributed, assuming 10x coverage for each site
indReads(np = 10, coverage = rep(10, 5), probs = probs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.