distruct2.2.py error IndexError: tuple index out of range

177 views
Skip to first unread message

Maggie Bartkowska

unread,
Sep 21, 2016, 10:06:39 AM9/21/16
to structure-software
Hi, I'm trying to run distruct2.2.py for a dataset with 280 individuals and 14 populations. I obtained mean individual assignment and mean population assignment probability tables using clumpp (attached). 

Here is the code I am trying
python distruct2.2.py -K11 --input=acanadensis --output=test_output_acanadensis.svg --popfile=pop_acanadensis --poporder=acanadensis_pop_order 

Here is the error I am receiving:

  File "distruct2.2.py", line 205, in <module>
    figure = plot_admixture(admixture, population_indices, population_labels, title)
  File "distruct2.2.py", line 56, in plot_admixture
    subplot.bar(lefts, admixture[:,k], width=indiv_width, bottom=bottoms, facecolor=colors[k], edgecolor=colors[k], linewidth=0.4)
IndexError: tuple index out of range

What is going on?
MB
acanadensis.11.meanP
acanadensis.11.meanQ
acanadensis_pop_order
pop_acanadensis

Vikram Chhatre

unread,
Sep 21, 2016, 10:07:44 AM9/21/16
to structure-software
The correct syntax is "-K 11" not "-K11"

Also, you will need to input 11 different color names in the distruct script.

V

--
You received this message because you are subscribed to the Google Groups "structure-software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structure-software+unsub...@googlegroups.com.
To post to this group, send email to structure-software@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages