This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Phylogenetic tree in Adegenet

I am using a R package called adegenet to plot the nj tree from plink files. In my plink file (input.raw) FID and IID are the same. So i have 3 questions here 1)Should FID be replaced with population name in the raw file? 2)Is there a way of providing population name separately in adegenet? 3)How can I color the clusters in a tree with different colours?

I did this

tre<-nj(D)
plot(tre, type = "unr", show.tip.lab = TRUE, cex=0.3, font=1, edge.col="Blue")

So all the edges turn blue. But i want edge color according to clusters. Is there a way?Ill appreciate any help.TIA!

adegenet phylogenetic tree plink

This is one way of doing it

  plot(tre, type = "unr", show.tip.lab = TRUE, cex=0.3, font=1, edge.col=c("Blue", "Red", "Green", "Yellow")[D$pop])

0 answers

No answers yet.

Log in to answer this question.