Skip to contents

This function reads .Q matrix files generated by external clustering algorithms (such as ADMIXTURE) and transforms them into q_matrix or q_matrix_list objects for plotting.

Usage

q_matrix(x)

Arguments

x

can be:

  • a path to a directory containing .Q files

  • a path to a single .Q file

  • a matrix

  • a dataframe

  • a list of dataframes or matrices

Value

either:

  • a single q_matrix object

  • a q_matrix_list object containing a list of Q matrices and a list of indices for each Q matrix separated by K