I'm using the --foldedSFS flag to simulate joint SFSs to fit a model to a set of 2D SFSs generated in ANGSD (8 populations total):
From what I understand, this flag produces folded SFSs compatible with those from ANGSD, however, when I use it, say to simulate the joint sfs between two populations of n and m diploids:
fsc26 -i TestSFS.par -x -s0 -m -n1 --seed 1234 -q --foldedSFS
I get a triangular matrix with dimensions 2n+1 x 2m+1.
For example, if 2n=6 and 2m=4, I get a matrix that looks like:
d0_0 d0_1 d0_2 d0_3 d0_4 d0_5 d0_6
d1_0 XX XX XX XX XX XX 0
d1_1 XX XX XX XX XX 0 0
d1_2 XX XX XX XX 0 0 0
d1_3 XX XX XX XX 0 0 0
d1_4 XX XX 0 0 0 0 0
On the other hand ANGSD generates "fully folded" 2Dsfs by collapsing four unfolded categories into one folded one. For example, in the case above the cells {(d0_2,d1_1), (d0_4,d1_1), (d0_2,d1_3), and (d0_4,d1_3)} from the unfolded spectrum are collapsed into cell (d0_2, d1_1) of the folded spectrum, producing a rectangular n+1 x m+1 matrix, which in this case would look like:
d0_0 d0_1 d0_2 d0_3 d0_4 d0_5 d0_6
d1_0 XX XX XX XX 0 0 0
d1_1 XX XX XX XX 0 0 0
d1_2 XX XX XX XX 0 0 0
d1_3 0 0 0 0 0 0 0
d1_4 0 0 0 0 0 0 0
I realize the folded spectrum in ANGSD loses quite a bit of information compared to e.g., the joint minor allele spectrum, but I'm working with low-coverage data so inferring the SFS with ANGSD seems like the way to go.
Is there perhaps a flag that I'm failing to specify for fsc to fold the sfs in a comparable way to angsd? Otherwise, would someone who successfully used ANGSD folded spectra to optimize demographic parameters be willing to provide any insight?
Thanks!
Roberto Marquez