8.2 sfsStats
Estimating statistics of a SFS
sfsStats estimates statistics of a SFS (site frequency spectrum) of any number of populations/dimensions. Expected heterozygosity is calculated per population. The task also estimates pairwise F_{ST} using the finite sample-size-corrected estimators of Nei (1978) and Hudson et al. (1992) for any SFS with more than one population. Both the realsfs or winsfs SFS output formats as well as the fastsimcoal SFS input format are supported.
8.2.1 Input
Required inputs :
--sfs Input.sfs |
Input SFS file |
See Filter parameters to apply specific filters for bases, reads and parsing window setting. Engine parameters that are common to all tasks can be found here.
8.2.2 Output
| *_sfsStats.txt | Output file with SFS statistics. Statistics related to different populations are denoted as _0 for the first population, _1 for the second population, etc |
8.2.3 Usage Example
#! /bin/bash
# Set atlas path
atlas=$(dirname "$0")/../build/atlas
# Create a 2D SFS file as an example
echo '#SHAPE=<15/11>
0.956105 0.009576 0.002592 0.003897 0.000011 0.001484 0.000339 0.000134 0.002077 0.000671 0.007219 0.000798 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.00082
7 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000474 0.000
000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.001091 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.0
00000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0
.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.001856 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000322 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.0000
00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.010526 0.000000 0.000000 0.000000 0.000000 0.00
0000 0.000000 0.000000 0.000000 0.000000 0.000000' > sfs2d.txt
# Run sfsStats on the example SFS file
$atlas sfsStats --sfs sfs2d.txt