Entering edit mode
7.9 years ago
beausoleilmo
▴
600
I created an ancestry plot in R from an Admixture analysis. But my order in is very bizarre.
This is the command I used for the plot (with K = 4):
tbl = read.table("~/path-to/my_admixture_analysis.4.Q")
ord = tbl[order(tbl$V1,tbl$V2,tbl$V3,tbl$V4),]
bp = barplot(t(as.matrix(ord)),
space = c(0.2),
col=rainbow(4),
xlab="Individual #",
ylab="Ancestry",
border=NA)
As you can see, the purple bar is not lining properly and a couple of other bars are not OK. How can I fix that?