View source: R/multi_level_best_baps_partition.R
multi_level_best_baps_partition | R Documentation |
Function to partition a given phylogeny, choosing the best partition at each level using the fastbaps approach.
multi_level_best_baps_partition( sparse.data, h, levels = 2, n.cores = 1, quiet = TRUE )
sparse.data |
a sparse SNP data object returned from import_fasta_sparse_nt |
h |
a hclust object representing the hierarchical clustering that is to be cut |
levels |
the number of levels to investigate (default=2) |
n.cores |
the number of cores to use in clustering |
quiet |
whether to print additional information or not (default=TRUE) |
a data.frame representing the final clustering at multiple resolutions
fasta.file.name <- system.file("extdata", "seqs.fa", package = "fastbaps") sparse.data <- import_fasta_sparse_nt(fasta.file.name) d <- snp_dist(sparse.data) d <- as.dist(d/max(d)) h <- hclust(d, method="ward.D2") multi.res.df <- multi_level_best_baps_partition(sparse.data, h, levels=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.