coarsen_jsfs {jaatha} | R Documentation |
Divides the joint site frequency spectrum (jsfs) into blocks and returns the sum of the jsfs entries for each block.
Description
ja is the jsfs, part a list of vectors specifying for each dimension how ja should be partitioned. If part_hi!=NULL, it is a list spefifying how ja is to be paritioned on the higher end of each dimension. if part or part_hi is not a list, it is turned into a list of the same length as dim(ja), in which each entry is the original part or part_hi e.g. 2,7,9 partitions into 1:2, 3:7, 8:9, 9:N For example, with part=c(1,3) and part_hi=c(1,3) we get the classical jaatha summary statistics. Note, however, that the order in which they appear will be different than in the original jaatha package.
Usage
coarsen_jsfs(ja, part, part_hi = NULL)
Arguments
ja |
an array containing the joint site frequency spectrum |
part |
a vector of integers or a list of vectors of integers. If
it is a list, the vector part[[i]] specifies that the |
part_hi |
NULL or a vector of integers or a list of vector of integers
indicating the partioning at the higher end of each dimension. This means,
if it is a list, the values in the vector |
Value
vector of numbers, which are the sums over the blocks of the jsfs for all combinations of partitions
Author(s)
Dirk Metzler & Paul Staab
References
A. Tellier, P. Pfaffelhuber, B. Haubold, L. Naduvilezhath, L. E. Rose, T. Staedler, W. Stephan, and D. Metzler (2011) Estimating parameters of speciation models based on refined summaries of the joint site-frequency spectrum. PLoS One 6(5): e18155