-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Covar and new ANGSD 2D SFS #2
Comments
The -sfsfile taken by ngsCovar is not the (global) 2D-SFS but rather the per-site allele frequency probabilities (.saf files). Also, remember that the latter file should be produced by ANGSD <0.800 otherwise the new file format in ANSGD is not supported ngsTools. Additionally, rather than using the -sfsfile option (and thus weighting each site but its probability of being variable) you can try to perform a non-stringent SNP calling (e.g. with ANGSD or using -minMaf in nsgCovar) and avoid using -sfsfile. |
You should be able to generate the old format from the new format.
|
Matteo - many thanks for your response. Yes, I had suspected the -sfsfile used might be the .saf file (there are a couple inconsistencies in the documentation that made it unclear) and tried it too. However, since it was produced by ANGSD >0.800, it too did not work. Initially I had used -minMaf in ngsCovar, but the lowest coverage samples grouped together, which was the reason for wanting to try the weighted method. ANGSD - thanks! To confirm, the conversion from new to old versions is via Thanks again for your replies! |
Exactly. You use the print option of the ./realSFS program, but by also supplying -oldout 1. Otherwise it will print the safs to the screen. |
Apologies for the delay reporting back as I had to put working on this aside temporarily. However, I am happy to report that it is working. Thanks again for all your help. |
I am having trouble getting ngsCovar to play nice with the 2D SFS from the recent version of ANGSD.
As mentioned, I am trying to use a 2D SFS from the new ANGSD output because it is quite simple to generate. (It does output all values in a single line, but I converted it to matrix of
(2N1+1)x(2N2+2)
as noted in the ngs2dSFS documentation.) The consistently produced error is-> Possible error reading SFS, binary file might be broken...
.Granted the file may be incorrect because I notice that in the ngsCovar documentation it states the SFS file contains
sample allele frequency posterior probabilities
while the ANGSD 2D SFS documentation states its output ANGSD containsthe expected values
. Additionally, the file is plain text.Any help or suggestions would be greatly appreciated and please let me know if you need additional information.
The text was updated successfully, but these errors were encountered: