ANGSD: Analysis of next generation Sequencing Data
Latest tar.gz version is (0.938/0.939 on github), see Change_log for changes, and download it here.
RealSFS: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
This program will estimate the SFS based on a .saf file generated from the '''./angsd [options] -doSaf '''. | This program will estimate the SFS based on a .saf file generated from the '''./angsd [options] -doSaf '''. | ||
Or use it to estimate a 2dsfs by supplying 2 .saf files (also generated from '''./angsd [options] -doSaf)'''. | |||
=Brief overview= | =Brief overview= | ||
<pre> | <pre> |
Revision as of 22:09, 12 March 2014
This program will estimate the SFS based on a .saf file generated from the ./angsd [options] -doSaf .
Or use it to estimate a 2dsfs by supplying 2 .saf files (also generated from ./angsd [options] -doSaf).
Brief overview
./emOptim2 afile.saf nChr [-start FNAME -P nThreads -tole tole -maxIter -nSites -use-BFGS ] nChr is the number of chromosomes. (twice the number of diploid invididuals)
Program defaults to use the EM algorithm for the optimisation. See example below for using the bfgs optimisation.
emOptim2 sfstest.saf 20 -P 4 >sfs.em emOptim2 fstest.saf 20 -P 4 -use-BFGS 1 >sfs.bfgs
The emOptim2 program will read in a block of the genome (from the .saf) file, and for this region it will estimate the SFS.
The size of the block can be choosen using -nSites argument, otherwise it will try to read in the entire saf file.
If you have .saf file larger than -nSites (you can check the number of sites in the .saf.pos file), then the program will loop over the genome and output the results for each block. So each line in your Whit.saf.ml, is an SFS for a region.
Output
Main results are printed to the stdout. Values are in logspace.
NB
Use as many sites as possible, for more reliable estimates.