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

can´t recognize a sample in a tree and recognize more four groups when I assigned three #71

Open almamelisa opened 1 year ago

almamelisa commented 1 year ago

Hi!!

I tried to run the Dtrio instruction followed the tutorial of Analysis of Introgression with SNP Data, with this tree and this SET. However I get the next error:

(base) mel@melisaU:~/Dsuite$ ./Build/Dsuite Dtrios -c -n mltre -t /home/mel/ALONDRA/ABBA-BABA/inputs_lrg/newtreebarehout /home/mel/ALONDRA/ABBA-BABA/inputs_lrg/test_84-33.vcf /home/mel/ALONDRA/ABBA-BABA/inputs_lrg/SETS.txt There are 4 sets (populations/species) excluding the Outgroup Going to calculate D and f4-ratio values for 4 trios Out of Range error: map::at setInfo.populations[i]: xxx It seems that this species is in the SETS.txt file but can't be found in the tree. Please check the spelling and completeness of your tree file.

However, the names of the tree and the sets.txt are the same.

Also, I tried to get the same anlysis but without a tree and with the same sets species, and I got results, but it seems like the program assigned 4 species instead of three, but I don't know if it's like that, or I'm misinterpreting it, here the output .txt and the output message:

(base) mel@melisaU:~/Dsuite$ ./Build/Dsuite Dtrios -n notree /home/mel/ALONDRA/ABBA-BABA/inputs_lrg/test_84-33.vcf /home/mel/ALONDRA/ABBA-BABA/inputs_lrg/SETS.txt There are 4 sets (populations/species) excluding the Outgroup Going to calculate D and f4-ratio values for 4 trios Done permutations The VCF contains 178160 variants Going to use block size of 8907 variants to get 20 Jackknife blocks Processed 100000 variants (56.1293%) in 23.8042secs Done processing VCF. Preparing output files...

Thanks in advance!!

Melisa

millanek commented 1 year ago

Hi almamelisa

As for the first issue, the names in the tree and the SETS.txt files which you linked are not the same. The tree should be for example like (((Species1,Species),Species3),Outgroup);

As for the second issue, I see that Dsuite took xxx as a species name. This is strange and should not happen. Can you try to delete the line break behind xxx? You have an empty line 9 in the SETS.txt file, probably this is the reason.

All the best Milan