-
Notifications
You must be signed in to change notification settings - Fork 1
/
treedist_cmp.R
24 lines (17 loc) · 1.02 KB
/
treedist_cmp.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ggplot2)
spedist<-read.table("spetredist3.txt", header = T)
head(spedist)
ggplot(spedist, aes(x=reorder(name, TT), y=TT)) + geom_point(size = 3) +
theme(axis.text.x = element_text(angle=60, hjust=1), panel.grid.major.y = element_blank()) +
ylab ("Normalized Triple Distance") + xlab("tree pairs") + ylim(0, 0.08)
ggsave("spetredist3.tiff", dpi = 300)
dist<-read.csv("/Users/Xin/Documents/Ratsnake_project/input/dist_sum.csv", header = T)
head(dist)
ggplot(dist, aes(x=median, fill=type)) +
geom_histogram(position="identity", alpha=0.4, binwidth = 0.005)+scale_fill_discrete(name="gene-tree type",
breaks=c("bsdist", "ppdist"),
labels=c("BS", "PP")) +
geom_vline(xintercept = 0.55, color = "coral3", linetype = "longdash") +
geom_vline(xintercept = 0.42, color = "dodgerblue", linetype = "longdash") +
xlab("Normalized within-loci tree distances") + ylab("Density")
ggsave("/Users/Xin/Documents/Ratsnake_project/manuscript/plylo+div/bs_pp_dist.tiff", dpi = 300)