phylogeny

Change Dendrogram leaves

与世无争的帅哥 提交于 2019-11-29 00:13:56
I want to modify the properties of the leaves in a dendrogram produced from plot of an hclust object. Minimally, I want to change the colors, but any help you can provide will be appreciated. I did try to google the answer, but but every solution that I saw seemed alot harder than what I would have guessed. A while ago, Joris Meys kindly provided me with this snippet of code that changes the color of leaves. Modify it to reflect your attributes. clusDendro <- as.dendrogram(Clustering) labelColors <- c("red", "blue", "darkgreen", "darkgrey", "purple") ## function to get colorlabels colLab <-

How to plot Pie charts in haploNet Haplotype Networks {pegas}

怎甘沉沦 提交于 2019-11-28 09:32:26
I'm trying to use haploNet function of {pegas} to plot a haplotype network, but i`m having trouble putting equal haplotypes from different populations in a same piechart. I can build a haplotype net with the following script: x <- read.dna(file="x.fas",format="fasta") h <- haplotype(x) net <- haploNet(h) plot(net) I'd like to set in the dnabin data the label of the original population of each taxa, so i could have piecharts of different colors (of haplotypes from different populations) in the resulting network. I'd like also to remove overlapping circles in the resulting haplotype network.

Change Dendrogram leaves

落花浮王杯 提交于 2019-11-27 15:31:11
问题 I want to modify the properties of the leaves in a dendrogram produced from plot of an hclust object. Minimally, I want to change the colors, but any help you can provide will be appreciated. I did try to google the answer, but but every solution that I saw seemed alot harder than what I would have guessed. 回答1: A while ago, Joris Meys kindly provided me with this snippet of code that changes the color of leaves. Modify it to reflect your attributes. clusDendro <- as.dendrogram(Clustering)

How to plot Pie charts in haploNet Haplotype Networks {pegas}

霸气de小男生 提交于 2019-11-27 02:59:58
问题 I'm trying to use haploNet function of {pegas} to plot a haplotype network, but i`m having trouble putting equal haplotypes from different populations in a same piechart. I can build a haplotype net with the following script: x <- read.dna(file="x.fas",format="fasta") h <- haplotype(x) net <- haploNet(h) plot(net) I'd like to set in the dnabin data the label of the original population of each taxa, so i could have piecharts of different colors (of haplotypes from different populations) in the