faststructure distruct popfile

527 views
Skip to first unread message

Liliam Martinez

unread,
May 23, 2016, 1:43:40 PM5/23/16
to structure-software
Hi:
So, I ran structure for K=2 to K=10, then ran chooseK.py and chose the optimal range of K. How do I generate the popfile of distruct?. I already read about it in https://github.com/cryptic0/distruct2 but honestly I can't understand how to generate the popfile from my data. My optimal K=3 to 5 and I want to get the distruct plot for those K. How do I generate my popfile from these data? (This is my meanQ file output)
 
0.651313 0.000018 0.037936 0.06268 0.248053
0.35459 0.000018 0.000018 0.645356 0.000018
0.000017 0.000017 0.000017 0.000017 0.999932
0.999927 0.000018 0.000018 0.000018 0.000018
0.000018 0.999927 0.000018 0.000018 0.000018
0.000023 0.000023 0.000023 0.627159 0.372771
0.000017 0.000017 0.000017 0.000017 0.999932
0.000018 0.000018 0.000018 0.000018 0.99993
0.000017 0.999924 0.000017 0.000017 0.000025
0.000018 0.000018 0.000018 0.000018 0.999927
0.000018 0.916303 0.000019 0.046466 0.037194
0.000017 0.000017 0.000017 0.000017 0.999931
0.000018 0.000018 0.000018 0.226369 0.773577
0.355848 0.000018 0.000018 0.000018 0.644099
0.000017 0.083603 0.000017 0.916346 0.000017
0.000017 0.999933 0.000017 0.000017 0.000016
0.000017 0.000017 0.000017 0.000017 0.999932
0.000017 0.000017 0.000017 0.999932 0.000017
0.000017 0.107467 0.000017 0.000017 0.892482
0.000031 0.248757 0.000017 0.751178 0.000017
0.000022 0.139684 0.000017 0.86026 0.000017
0.000017 0.999933 0.000017 0.000017 0.000017
0.000017 0.000017 0.000017 0.000017 0.999931
0.000025 0.140855 0.000017 0.818591 0.040512
0.000021 0.454389 0.000021 0.000021 0.545548
0.00002 0.00002 0.00002 0.00002 0.999921
0.000017 0.999933 0.000017 0.000017 0.000017
0.000017 0.000017 0.000017 0.000017 0.999932
0.000018 0.078914 0.000018 0.000018 0.921031
0.000017 0.904865 0.000017 0.000017 0.095083
0.000017 0.011895 0.000017 0.000017 0.988054
0.000017 0.977358 0.000017 0.000017 0.02259
0.000017 0.000017 0.000017 0.000017 0.999932
0.000019 0.000019 0.000019 0.000019 0.999926
0.392674 0.00002 0.00002 0.00002 0.607267
0.00006 0.208746 0.091919 0.151379 0.547896
Thanks a lot!

Vikram Chhatre

unread,
May 23, 2016, 2:41:56 PM5/23/16
to structure-software
Liliam,

I recommend against using that version of distruct from github; there are notes on github to that effect.  I have updated that script and it has been moved back to my website.  http://distruct2.popgen.org.

As for popfile, it contains just a list, one column, with one row per individual, filled with population id.  For example:

pop1
pop1
pop1
pop2
pop2
pop3
pop3
pop3

The distruct2 archive should have example files.

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-softw...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

Liliam Martinez

unread,
May 23, 2016, 4:09:55 PM5/23/16
to structure-software
Yes but how can I get those for my data?. I mean how do I know which ones belong to which population?.
Thanks!
Liliam
To unsubscribe from this group and stop receiving emails from it, send an email to structure-software+unsub...@googlegroups.com.

Vikram Chhatre

unread,
May 24, 2016, 8:58:34 AM5/24/16
to structure-software
You can choose to not include a popfile, but then your plot will be sorted by K.



To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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-softw...@googlegroups.com.

Liliam Martinez

unread,
May 24, 2016, 10:40:38 AM5/24/16
to structure-software
Well but I would really like to sort my data by population. How can I get which individuals belong to a specific population so I can create my popfile?
Thanks
Liliam
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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.

Vikram Chhatre

unread,
May 24, 2016, 10:51:21 AM5/24/16
to structure-software
A 'population' can be an arbitrary designation that we assign to individuals depending upon how we collected samples.  

'K' is also a population, but not arbitrarily assigned.  It is a genetic cluster inferred from allele frequency data where individuals within a given K cluster more or less conform to HWE.

V

To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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-softw...@googlegroups.com.

To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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-softw...@googlegroups.com.

Liliam Martinez

unread,
May 24, 2016, 2:37:29 PM5/24/16
to structure-software
ok, but you do need a poporder file for distruct2 right?. How can you create the poporder file?. If you have K=5 that means you have "pop1, pop2, pop3, pop4 and admixed" or "pop1, pop2, pop3, pop4, pop5 and admixed"
thanks!
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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.

Vikram Chhatre

unread,
May 24, 2016, 2:41:18 PM5/24/16
to structure-software
The only reason to use distruct2 instead of the original distruct that comes with fastSTR is to be able to order populations.  If you don't need that functionality, use the original script.  An example for poporder file is provided with the script.



To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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-softw...@googlegroups.com.

To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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-softw...@googlegroups.com.

To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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-softw...@googlegroups.com.

Liliam Martinez

unread,
May 24, 2016, 4:42:57 PM5/24/16
to structure-software
Thanks for all your help but I still need to solve something. I already managed to produce the plots and they look great. I already ran chooseK and I got the optimal K range. I have 264 genotypes from the same specie but different subspecies and I would like to know which individuals were assigned to each cluster.
Thanks for your patience!
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
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.

Otyama Paul

unread,
Dec 19, 2016, 3:48:09 PM12/19/16
to structure-software
Hi Liliam Martinez,

Did you ever find a solution to your problem? I want to do the same thing but don't know how to go about it. I simply want to know which individuals were assigned to each cluster without having to manually call them (which can be tedious and error prone but above all not replicable)

Thanks,

Paul
Reply all
Reply to author
Forward
0 new messages