Hi Alex and Pavlos,
Did you reach any resolution to this issue? In the meantime, I tested a solution that appears to be working for me. I was able to recreate the error that Alex noted using the files Alex provided, but then I was able to "fix" the error to give results that look more like those expected by providing SweeD with an empiricalSFS (-isfs) that I manually folded myself.
First I created the empirical SFS for the dataset (empirical_SFS.txt).
Next, to recreate the error, I ran the following:
./SweeD -name test02_basicRun -input simulated_sweep_sweepfinder_format.SF -grid 1000 -folded -isfs empirical_SFS.txt
Indeed, most of the likelihood values are equal to zero, as Alex noted.
Then, I tried folding the empirical SFS myself (empirical_SFS_folded.txt) so that all frequencies where the derived allele is >50% were manually set to zero, and ran the following:
./SweeD -name test03_foldedSFS -input simulated_sweep_sweepfinder_format.SF -grid 1000 -folded -isfs empirical_SFS_folded.txt
It seems like this solved the problem, because now the likelihood values have a pattern resembling those that Alex found with SweepFinder, with evidence of a sweep near 500,000 bp.
Here are plots of the two tests for comparison, and the empirical SFSs that I used:
https://drive.google.com/file/d/17ZJlhBQWPkiR4g1i8cZsSXGDVLYseWZb/view?usp=sharing
Is this the correct way to use a folded SFS? If every SNP is folded, then we could provide a folded empirical -isfs and -folded flag, then it seems to work fine? However, I suppose this solution would not work if you want to specify that some individual SNPs are folded and others are not folded (specified inside the .SF file with the “folded” column).
Thanks,
Jordan
P.S. I used v. 3.1. I know it's an old version, but I could not get a new version to install on my system.