millanek / Dsuite

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

The *__combine.txt file format is different from the tutorials. #19

Closed xiekunwhy closed 3 years ago

xiekunwhy commented 4 years ago

Hi,

In the thirpart tutorial (https://github.com/mmatschiner/tutorials/tree/master/analysis_of_introgression_with_snp_data), there are 6 columns in samples__combine.txt file, but I got 12 columns(like below) when I use ./Dsuite Dtrios, can you explain the meanings of these 12 columns? cat T90_T111__combine.txt G1 G2 G3 54351.5 27674.1 27854.6 71440.7 33485 43411.3 71204.7 43988.2 33408.6

Best, Kun

millanek commented 4 years ago

Hi Kun

The _combine.txt output changed since Dtrios and DtriosCombine started to also calculate f4-ratios. The first six columns are as before, and six more columns were added with numbers needed for the f4-ratio calculation. We are going to update the tutorial accordingly.

Kind regards Milan

nicotel commented 4 years ago

Dear millanek, I am comparing the outputs of Dtrios. The results below :
__tree.txt | P1 | P2 | P3 | Dstatistic | Z-score | p-value | f4-ratio | BBAA | ABBA | BABA |   |   Species2 | Species1 | Species3 | 0.154233 | 8.57549 | 4.93E-18 | 0.0300724 | 11495.2 | 1493 | 1094 |   Dmin.txt | P1 | P2 | P3 | Dstatistic | Z-score | p-value | f4-ratio | BBAA | ABBA | BABA |   |   Species2 | Species1 | Species3 | 0.154233 | 8.57549 | 4.93E-18 | 0.0300724 | 11495.2 | 1493 | 1094 |   _combine.txt | Species1 | Species2 | Species3 | 11495.2 | 1493 | 1094 | 12886.5 | 3829 | 13482.5 | 13268 | 14225.5 | 3484.5

I am wondering, since in _combine.txt the fifth column correspond to the ABBA and the sixth to the BABA (in bold) and given Species1 | Species2 are inverted compared to Dmin.txt why do the ABBA and BABA sites remain in the same order (see Dmin.txt output )? should not being inverted?

Best regards,

Nicolò Tellini

millanek commented 3 years ago

An updated detailed tutorial is now available: https://github.com/millanek/tutorials/tree/master/analysis_of_introgression_with_snp_data

Hope you and others find it helpful Milan