tracts.driver_utils.plot_admixture#

plot_admixture(ancestry_per_individual, labels, colors, ax=None)#

Stacked bar chart of ancestry proportions in ADMIXTURE style. AI-generated with review.

Parameters:
  • ancestry_per_individual (dict) – {individual: [prop_1, …, prop_n]}

  • labels (list[str]) – Population name for each proportion column.

  • colors (list[str]) – Hex colour for each population.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw on; a new figure is created if None.

Return type:

fig, ax