geom.series {QSutils} | R Documentation |
Function to simulate haplotype abundances in the quasispecies by geometric series.
geom.series(n,p=0.001)
n |
Number of frequencies to compute. |
p |
Numeric parameter of the geometric function. |
The abundances, as counts, are computed according to the following equation:
p ~(1-p)^{i-1}, ~~ i=1..n
The lower r
, the faster the decrease in abundances.
Numeric vector with n
decreasing counts.
Mercedes Guerrero-Murillo and Josep Gregori
GetRandomSeq
, GenerateVars
,
Diverge
# Simulate a quasispecies alignment. m1 <- GetRandomSeq(50) v1 <- GenerateVars(m1,50,2,c(10,1)) qs <- c(m1,v1) w <- geom.series(100,0.8)