--multiSFS error message

362 views
Skip to first unread message

Anne-Laure Ferchaud

unread,
Dec 1, 2015, 12:04:21 PM12/1/15
to fastsimcoal
Dear Laurent and Fastsimcoal2 users,

We are trying to use the new version of Fastsimcoal to answer the following question:

We currently observed 4 morphs in our species and want to know when these 4 morphs diverged.
Our dataset is based on GBS data with 57963 SNPs. We do not know the derived allele in our case so we implemented an folded SFS generated from dadi.

We chose the parameter estimation for getting an estimate of the divergence time

Since we have more than 2 populations (i.e., morphs) we wanted to use --multiSFS option but using the following command line
 
fsc25221 -t IR_with_estimation.tpl -e IR_with_estimation.est -m -n 100000 -N 100000 -E 1000 -M 0.001 -l 10 -L 40 --multiSFS -c 16

we got this error message :

"multiSFS::createSFSdadiLike(): Unable to create multiJointSFS as totSFSEntries (1801048) is out of bounds [1;1e6]
Exiting program!"

Attached are the observed SFS we have built with dadi for the 4 morphs (with the _DSFS.obs suffix), the .tpl and .est files used
as well as the pdf created via your new function to visualize the implemented model (AWESOME!).



Looking forward to getting any answer

Anne-Laure & Alysse

IR.pdf
IR_with_estimation.est
IR_with_estimation.tpl

Laurent Excoffier

unread,
Dec 7, 2015, 9:52:27 PM12/7/15
to fastsimcoal
Hi,

as mentioned in the error message, the obsrved SFS is too large for fastsimcoal. I indeed limit its size to 1 million entries...
With about 50000 snps, note that most entries of the multi dimensional sfs are zeros, which is not optimal for the estimation procedure, as implemented.
For the moment, maybe simply reduce your sample sizes, to say, 20 individuals per sample, and it should be okay.
This is not an optimal strategy, but a work around at this stage. I hope to be able to remove this constraint in the future.

best

laurent

Christophe Patterson

unread,
Jan 27, 2026, 11:23:11 AM (3 days ago) Jan 27
to fastsimcoal2
Hi All,

I just wanted to add a note in case anyone else finds this error. I was also getting a similar error for a different reason.

"multiSFS::createSFSdadiLike(): Unable to create multiJointSFS as totSFSEntries (-53669551135) is out of bounds [1;1e6]", apart from the number in brackets was fluctuating randomly between massive negative and positive numbers.

The cause was me accidently leaving the "//Samples sizes and samples age section" blank. I was automatically generating the multi .tpl files and while testing forgot to run the section of code that saved the variable for the number of samples, so the code was putting in a blank space. So not directly linked to the SFS, but must be to do with the interaction between the values in SFS and the input sample sizes.

Simple fix, but took me a while to narrow down, hope that saves someone an afternoon. 

All the best,

Christophe

Reply all
Reply to author
Forward
0 new messages