-
Notifications
You must be signed in to change notification settings - Fork 1
/
Fst_dendro.R
26 lines (20 loc) · 1.31 KB
/
Fst_dendro.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
25
26
# Copyright 2021 Francisco Pina Martins <[email protected]>
# This file is part of Population structure in Quercus suber L. revealed by nuclear microsatellite markers.
# Fst_dendro.R is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Fst_dendro.R is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Fst_dendro.R. If not, see <http://www.gnu.org/licenses/>.
fst_orig = read.csv("fsts-dist.csv", header=T, sep="\t", row.names=1)
fst_dist = as.dist(fst_orig)
svg("fsts-dists-tri.svg")
plot(as.dendrogram(hclust(fst_dist, method="average")), xlab="Distance", ylab="", horiz=T, edgePar=list(col="forestgreen", lwd=3), main="Pairwise Fst distance dendrogram", type="tr")
dev.off()
svg("fsts-dists-rec.svg")
plot(as.dendrogram(hclust(fst_dist, method="average")), xlab="Distance", ylab="", horiz=T, edgePar=list(col="forestgreen", lwd=3), main="Pairwise Fst distance dendrogram", type="rec")
dev.off()