Convert Admixture Q Outputs Into Dendograms
3
2
Entering edit mode
13.0 years ago
Tonig ▴ 440

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

phylogenetics • 7.5k views
ADD COMMENT
2
Entering edit mode
13.0 years ago
Caddymob ★ 1.0k

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.

alt text

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
13.0 years ago

If you are interested I have a [R] script to automatically make ggplot barplots for the admixture across different K values.

ADD COMMENT
1
Entering edit mode

yes i'm interested, could you send me or show me pleas?

ADD REPLY
2
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Hey @Zev.Kronenberg any chance you could send me that script as well?

ADD REPLY
0
Entering edit mode
11.1 years ago
Javier2013 ▴ 90

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

ADD COMMENT

Login before adding your answer.

Traffic: 1909 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6