poolReads {poolHelper} | R Documentation |
Reads contributed by each pool
Description
This function simulates the contribution, in terms of reads, of each pool. The number of reads contributed from all pools is equal to the total coverage of the population.
Usage
poolReads(nPools, coverage, probs)
Arguments
nPools |
an integer indicating how many pools were used to sequence the population. |
coverage |
a vector containing the total depth of coverage of the population. Each entry of the vector represents a different site. |
probs |
a matrix containing the probability of contribution of each pool
used to sequence the population. This matrix can be obtained with the
|
Value
a matrix with the number of reads contributed by each pool towards the total coverage of the population. Each row of the matrix is a different pool and each column a different site.
Examples
# simulate the probability of contribution of each pool
probs <- poolProbs(nPools = 5, vector_np = rep(10, 5), nSNPs = 8, pError = 50)
# simulate the number of reads contributed, assuming 10x coverage for each site
poolReads(nPools = 5, coverage = rep(10, 8), probs = probs)
[Package poolHelper version 1.1.0 Index]