thanks, more or less this is what i'm looking for. The point is to use admixture values as distances, isn't it? I guess dist function is calculating the euclidena distances between admxture values
Hi, I am using ADMIXTURE to analyze some WGAS data. I read this blog
http://blogs.discovermagazine.com/gnxp/2011/03/analyzing-ancestry-with-admixture-step-by-step/
and it is really easy to use R to show barplots, but what I need is transform the P and Q output files into a phylogenetic tree to see the populations . It its possible to use in PHYLIP or other related program?
Thanks
3 answers
I use ADMIXTURE frequently but have not done a dendrogram. I pulled up some test data for K=3 and did this in R on the Q values.
admix <- read.table('test.3.Q',header=TRUE,row.names=1)
d <- dist(admix)
h <- hclust(d)
dend <- as.dendrogram(h)
plot(dend)
This is quick and dirty, you can play with the dist, hclust, as.dendrogram and plot functions.

If you are interested I have a [R] script to automatically make ggplot barplots for the admixture across different K values.
yes i'm interested, could you send me or show me pleas?
@Zev Yes, please share your script, even if it's just the essential snippets. If you paste it into this answer and it's useful you will surely get upvotes.
Hey @Zev.Kronenberg any chance you could send me that script as well?
Hi Tonig:
If you want to create a phylogenetic tree using your GWAS data I would highly recommend you to use a standard genetic distance for the distance matrix and not just an euclidian distance. For example, you could calculate Fst values (between your populations or individuals) and then use this matrix to create your tree using PHYLIP or any other program (MEGA is also very easy to use).
Fst values to compute NJ trees when using GWAS data is what most authors do.
Best,
Javier
Log in to answer this question.