Structure improvements

  • Allow different ploidy in outgroup (typically if there is only one outgroup sequence). Statistics requiring a consistent ploidy in the outgroup should be silently skipped.
    • All the architecture is designed to enforce a constant ploidy so allowing varying ploidy within the ingroup is likely to cause nasty side-effects for little benefit.
  • Specify outgroup with struct_from_iterable (e.g. using a special markup instead of the population label).
  • Ploidy option with struct_from_iterable.
  • Add new function: struct_from_mapping
    • Signature: struct_from_mapping(indivs, ploidy=1[, pop[, clusters[, otg]]])
    • Example1: struct = struct_from_mapping(['A', 'B', 'C', 'D'], ploidy=2, {'pop1': ['A', 'B'], {'pop2': ['C', 'D']})
    • Example2: struct = struct_from_mapping('AABBCCDDE', {'pop1': ['A', 'B'], {'pop2': ['C', 'D']}, outgroup=['E'])
Edited Jan 20, 2026 by Stéphane De Mita
Assignee Loading
Time tracking Loading