gt_clumppling.RdThis function runs the clumppling algorithm.
gt_clumppling(
input_path,
output_path = tempfile("clump_out"),
input_format = "admixture",
use_rep = TRUE,
merge = TRUE,
cd_method = "louvain",
use_best_pair = TRUE,
extension = ".Q"
)the path where the Q files are stored, either a directory
or a zip archive, or a q_matrix_list object
(optional) the clumppling functions in python save
everything to file. By default, R stores the information in objects in the
environment, and sends those files to a temporary directory that will be
cleared at the end of a session. output_path allows to change the
location of those files. This is only useful to those interested in
recovering the same files as created by the python clumppling module, or
for debugging.
a string defining the format of the input files, one of 'admixture' (default),'structure','fastStructure' or 'generalQ'
boolean, whether to use representative modes (alternative: average), defaults to TRUE
boolean, whether to merge two clusters when aligning K+1 to K, defaults to TRUE
the community detection method to use, one of 'louvain' (default), 'leiden', 'infomap', 'markov_clustering', 'label_propagation', 'walktrap', 'custom'
boolean, whether to use best pair as anchor for across-K alignment (alternative: major), defaults to TRUE
(optional) if loading from files rather than a
q_matrix_list object specify the extension e.g. ".Q" or ".indivq"
a list of class gt_clumppling containing:
N: number of individuals
K_range: vector of K values analyzed
mode_replicates: a list of replicate indices for each mode
cost_acrossK: a named list of costs for each pairwise K alignment
aligned_modes: a list of data.frames, each data.frame is a Q-matrix
If you would like to generate an annotated autoplot from your gt_clumppling object, ensure that all individuals from the same population are adjacent to one another in the Q-matrix or gt_admix object supplied to gt_clumppling. Autoplot 'group' argument requires that all individuals from the same group are adjacent.