fast_baps: fast_baps

View source: R/fast_baps.R

fast_bapsR Documentation

fast_baps

Description

Function to perform Bayesian hierarchical clustering of population structure.

Usage

fast_baps(
  sparse.data,
  k.init = NULL,
  hc.method = "ward",
  n.cores = 1,
  quiet = FALSE
)

Arguments

sparse.data

a sparse SNP data object returned from import_fasta_sparse_nt

k.init

the initial number of clusters to start the bayesian hierarchical clustering from. Defaults to (number of sequences)/4

hc.method

the type of initial hierarchical clustering to use. Can be with 'ward' or 'genie' (default='ward')

n.cores

the number of cores to use in clustering

quiet

whether or not to print progress information (default=FALSE)

Value

a final hierarchical clustering clustering as a hclust object.

Examples


fasta.file.name <- system.file("extdata", "seqs.fa", package = "fastbaps")
sparse.data <- import_fasta_sparse_nt(fasta.file.name)
system.time({baps.hc <- fast_baps(sparse.data)})


gtonkinhill/fastbaps documentation built on Sept. 25, 2022, 1:56 p.m.