Distruct (Cluster alignment + indivq labels printing)

575 views
Skip to first unread message

FloCPH

unread,
Feb 5, 2014, 9:52:09 AM2/5/14
to structure...@googlegroups.com
Dear all,

For GWAS purposes I need to study my population strucure.
After running STRUCTURE, then CLUMPP, I have all my input files for DISTRUCT plotting.

I have 2 simple problems, my inputs parameters are K 4, NUMINDS 248 and NUMPOPS 1.

         - The graphs that I produced did not order the cluster properly. I have only one population, but for K=4 I cannot plot a graph which align the 4 groups as I want. The only side track that I found, is to order my indivq by their coefficient group belongings. Did I miss something in the drawparams file ?

         - My second problem is that only my first label from my file.names is printed. So I guess my input file format is not correct but I tested different kind of configuration. "space" separated, "tab"... Can someone enlighten me ?


Please find in attached file the kind of plot that I got with (K=2 but same problems).
Thanks in advance for you help.

Best regards.

Florian.
K2.pdf

Julie Hebert

unread,
Feb 6, 2014, 10:03:04 AM2/6/14
to structure...@googlegroups.com
Florian,
It is hard to know what your problem might be just based on your description and your figure. You should be able to order the groups using your .perm file. Just change the order and labels there. Could you post or email your drawparams, .perm, and .names files?
Julie

FloCPH

unread,
Feb 10, 2014, 6:35:24 AM2/10/14
to structure...@googlegroups.com
Julie,

First thanks for your reply and sorry for the bad explanation of my problem.
So few explanation of the main target of my Structure problem :
I have : 1 population of 248 individuals (248 winter barley varieties). I want to know more about my population structuration for GWAS applications.

I have no problems running Structure and CLUMPP. I determined my population structure with K=2 (for this example).

With Distruct, I would like to plot the whole population, have the name of each individuals below the chart and if possible group automatically individuals by cluster
           
So far in the zip fiel K=2_1, I included the files that I used for Distruct using indivq file. However, first the individuals are not ordered by cluster and furthernore the name of each individuals are not plotted on the chart except the first of the list.

In the second zip file K=2_2, I made the popq file using the data from indivq file. I ordered manually my K2.names by cluster and I obtained the chart that I want. But first it means that I use each individuals as one pop and that I should order my individuals manually.

Are there other way to do it automatically and using indivq file.

Thanks again.
Regards.
K=2_1.zip
K=2_2.zip

Julie Hebert

unread,
Feb 11, 2014, 10:56:01 AM2/11/14
to structure...@googlegroups.com
In my experience, if you want to put the labels for each individual, you did exactly what you have to do (which is create the popq file by hand). You can save some time ordering the individuals by opening the indivq file in Excel then sorting by one of the K columns. (This will order by the groupings.) However, if you have any additional clustering you want in there, you'll need to do that sorting using whatever other values you sort by. The other thing you can do, if you want to keep the same general order as your indivq file, but just sort by K, is to assign each of them to population 1 or population 2, then sort by that. I know it is a pain, but it is doable.
A note on editing the indivq file in Excel: it likes to delete the parentheses. To keep it from doing that, either convert the cells with parentheses to text cells, or add a ' before the parentheses which tells it that it is text so that it won't delete them when you save it as a file to open in a text editor.
One thing I end up doing to clean it up afterwards is to open the postscript file using the suggested applications in the manual (gsview and ghostscript), then export a jpeg so I can crop it down to the figure I want to look at. Rather than a lot of empty space.
Julie

Julie Hebert

unread,
Feb 11, 2014, 11:56:27 AM2/11/14
to structure...@googlegroups.com
One more note: I tried to get it to do both individual names and group names without having to repeat the groups, but no luck. Here is the data ordered by group just so you have it.
Julie

On Monday, February 10, 2014 6:35:24 AM UTC-5, FloCPH wrote:
bygroups.zip

FloCPH

unread,
Feb 13, 2014, 3:56:28 AM2/13/14
to structure...@googlegroups.com
Thanks a lot Julie,

I was actually afraid of your answer ! I struggeled with the software trying to find a smart solution.
However you confirm that I should do the ordering process by hand.

Once again, thank you for the files that you modified and the good advices, it will help to be faster in the data treatment.
Have you tried StructHDP from Sailing Laboratory (just to know if it makes sense to spend time on it) ?

Regards.
Reply all
Reply to author
Forward
0 new messages