Author: Wandrille Duchemin
Code and data for the permutation tests to test the grouping of three character : continent of origin, growth habit, and historical group.
- Figure 2A
script to list all clades in a tree Code:
- hexaploid wheat phylogenetic tree ( eg. this tree )
prints to screen the list of clades in the unrooted tree. One line per clade, leaf names separated by ";".
See allHexaClades.txt.
2. Determining the most structuring character, using proportion of monophyletic clades and permutation tests
- Phylogenetic clades to test allHexaClades.txt
- Genotype metadata Sup_487samples.csv
- Character trait i.e. name of the column to use as a trait from the second file:
"Growth habit"
Group
Continent
- Number of permutations
- Filename to direct output to e.g.
allHexaClades.txt.Growth_habit.PermutsPmonophyletic.100
Prints to screen the proportion of clades which are monophyletic for the given character in the original data, as well as the number (and proportion) of sampled permutations which show a higher proportion of monophyletic clades.
Also writes a file (e.g. allHexaClades.txt.Growth_habit.PermutsPmonophyletic.100
) containing the proportions of monophyletic clades of the sampled permutations (1 floating number per line).
Command example, 100
permutations for the Growth Habit
character trait :
python computeMonophyly.py allHexaClades.txt Sup_487samples.csv "Growth habit" 100 allHexaClades.txt.Growth_habit.PermutsPmonophyletic.100
prints to screen:
proportion of monophyletic : 0.31870669746
original data shows more monophyletic clades than 100.0 ( 1.0 ) permutations.
and creates a file named allHexaClades.txt.Growth_habit.PermutsPmonophyletic.100
which contains 100 floating numbers.
- Growth habit : proportion of monophyletic : 0.31870669746
- Group : proportion of monophyletic : 0.322748267898
- Continent : proportion of monophyletic : 0.384526558891
We performed 10 000 000 permutations each for each character.
allHexaClades.txt.Growth_habit.PermutsPmonophyletic.txt.10M
no permutation with a proportion > 0.31870669746 -> p-value < 10-7allHexaClades.txt.Group.PermutsPmonophyletic.txt.10M
no permutation with a proportion > 0.322748267898 -> p-value < 10-7allHexaClades.txt.Continent.PermutsPmonophyletic.txt.10M
no permutation with a proportion > 0.384526558891 -> p-value < 10-7