millanek / Dsuite

Fast calculation of Patterson's D (ABBA-BABA) and the f4-ratio statistics across many populations/species
160 stars 26 forks source link

Question about Dsuite Dinvestigate #89

Closed klcym closed 8 months ago

klcym commented 8 months ago

Dear @millanek and community :

I use Dsuite Dtios to test 3 populations and it shows positive singal.

image

However, when I use Dsuite Dinvestigate it shows a weird result: The average of D, f_d, f_dM and d_f statistics are all negative.

image

The populations order in the test_trios.txt is copied from the P1 P2 P3 in _tree.txt directly.

Thanks for your help.

millanek commented 8 months ago

This is indeed weird and hard to imagine how this could happen. Are you really sure that the P1 P2 P3 order is the same in both cases? Maybe some misunderstanding of that is still the most likely explanation.

If you are confident it is not an ordering issue, I will have a look at your data if you are willing to share.

All the best Milan

klcym commented 8 months ago

@millanek Thanks for your reply!

I tried to find out the problem by running Dsuite Dinvestigate with a single scaffold, (last time I ran Dsuite Dinvestigate in parallel ) and it reported an error: Segmentation fault (core dumped)

image

It means the Dsuite Dinvestigate Dsuite Dinvestigate is incomplete. Maybe that’s the reason why it showed a weird result.

klcym commented 8 months ago

I compare my vcf file to yours and find out what happened.

I used samtools to call snp and the last column of the result vcf file is ./. instead of 0/0 and Dsuite could not parse this format. So Dsuite reported the error Segmentation fault (core dumped).

Therefore, the problem has solved.

Thank you for your help and I will close the issue.