Take a look at the following steps:
- First, let's define our k (a number of ancestral populations) range of interest, as follows:
k_range = range(2, 10) # 2..9
- Let's run admixture for all our ks (alternatively, you can skip this step and use the example data provided):
for k in k_range: os.system('admixture --cv=10 hapmap10_auto_noofs_ld.bed %d > admix.%d' % (k, k))