Hello i was looking for the same question. I found multiple unanswered posts over this. Thank you for your answer but i am unable to reach the link provided by you 'this website'. you may please guide again. Thank you
I am new to the program ADMIXTURE.
I am running it from K=1 to K=20 on a set of 2033 individuals and 276,899 SNPs post-LD-pruning. The sample order is based on the default order in the dataset I downloaded, so population members are not necessarily back-to-back and related populations are not necessarily listed near each other.
Ideally, in the morning I will have a set of 40 *.Q files (20 with CV and bootstrap and 20 without), so in preparation I am trying to figure out how to graph them with the bars in a meaningful order. I was wondering if anyone had suggestions on how to this (or general suggestions about managing ADMIXTURE output).
Thanks!
1 answer
I found this website explaining how to do the full analysis. Basically, you have to look in the .fam file. You can import this file in R like this: fam = read.table("~/path-to-the-file/my_analysis.fam"). After that I was reusing the first column and rename the rows of your .Q file: tbl = read.table("~/path-to-the-file/my_analysis.Q"). Use this dataset to print your barplot!
I updated the website to this: https://www.discovermagazine.com/the-sciences/analyzing-ancestry-with-admixture-step-by-step. Seems to work.
Thank you. I will check it out
Hi, I am also using ADMIXTURE and found this marvelous tutorial that includes an Rscript that will plot the admixture output. The only thing you need to provide is a two column file including in the first column your sample IDs (in the same order that are found in the .fam file) and second column the population. The script will sort the samples by population and plot them in the columns and show different K in the rows. Hope it helps!
Log in to answer this question.
I have the exact same question! Here is a similar one: Can't figure out order of output rows in ADMIXTURE