malthesr / winsfs

Site frequency spectrum estimation based on window expectation-maximisation algorithm
MIT License
13 stars 0 forks source link

error: invalid or unsupported SAF magic number #2

Closed tida-one closed 2 years ago

tida-one commented 2 years ago

Hello, I just installed winsfs on a cluster using the cargo thing and I ran into this error: error: invalid or unsupported SAF magic number (found '[73, 61, 66, 76, 34, 00, 00, 00]', expected '[73, 61, 66, 76, 33, 00, 00, 00]')

The example (SAFA and B) ran perfectly. I tried with different SAF files obtained from ANGSD (angsd version: 0.937-108-gbb2e2d7 (htslib: 1.14-9-ge769401)) in different populations and with different filters in ANGSD and I always got the same error. I googled but...

Note that I am not super confident in my dataset because 1) of some strange pattern in terms of depths (bumpy from 1 to 100 depth then going to the usual "normal" distribution like and 2) of the results of the realSFS which are also bumpy to some point (e.g. for one pop of 11 individuals: 477252479.919277 1275341.790921 1311721.463687 1150418.711882 1038184.248378 818146.03548 707177.638546 636220.983638 565128.098679 524291.968394 482128.873608 350877.267486 0 0 0 0 0 0 0 0 0 0 0 ) So I am increasing the iterations in realSFS (default parameter with 30 it and 500000 sites) but I also wanted to test whether winsfs gives different results... and that's where the error came in the game.

Thank you for any comment you may have.

malthesr commented 2 years ago

Thanks for reporting.

The magic number error is due to the fact that angsd was recently updated to output SAF files in a novel format by default. I'm not entirely clear on whether the previous format can still be created. Either way, I plan on updating winsfs over the coming week or so to also be able to run from the new format. I'll report back here when that work is done. Apologies for the inconvenience.

malthesr commented 2 years ago

This issue should be fixed in the latest version. You can re-install using e.g. cargo install --force --git https://github.com/malthesr/winsfs. Please let me know if any problems persist.

Also, I've opened #4 to track some more work related to the new SAF format.

malthesr commented 2 years ago

I'll close this as fixed. Please re-open if you still encounter this problem.