# NOT RUN {
#The following data is from Chavda et al 2016 which phylotyped Enterobacter genomes
# Our example uses the data underpinning the tree shown in Figure 2
# Also included is a ranking file to prioritize closed Enterobactor genomes
#Loading the tree
library(ggrasp);
tree.file <- system.file("extdata", "Enter.kSNP.tree", package="ggrasp")
rank.file.in <- system.file("extdata", "Enter.kSNP.ranks", package="ggrasp")
Enter.tree <- ggrasp.load(tree.file, file.format = "tree", rank.file = rank.file.in)
#Clustering the tree using a threshold estimated by Gaussian Mixture Models (GMMs)
# }
# NOT RUN {
Enter.tree.cluster <- ggrasp.cluster(Enter.tree)
# }
# NOT RUN {
#Use print to get a list of the medoids selected
# }
# NOT RUN {
print(Enter.tree.cluster)
# }
# NOT RUN {
#Re-clustering the tree using a threshold estimated by the GMMs but without the distribution
#cleaning (i.e. removing the overlapping and low count distributions)
# }
# NOT RUN {
Enter.tree.reclust <- ggrasp.recluster(Enter.tree.cluster, z.limit=0, min.lambda = 0)
# }
# NOT RUN {
#Use plot to examine the tree with the clusters highlighted and the medoid genome names on the edge
# }
# NOT RUN {
plot(Enter.tree.cluster)
# }
# NOT RUN {
#Additional printing and plotting options are availible with plot() and print().
#For more information refer to ?plot.ggrasp and ?print.ggrasp
# }
Run the code above in your browser using DataLab