Learn R Programming

tidypopgen (version 0.4.3)

read_q_files: Read and structure .Q files or existing matrices as q_matrix or gt_admix objects.

Description

This function reads .Q matrix files generated by external clustering algorithms (such as ADMIXTURE) and transforms them into gt_admix objects.

Usage

read_q_files(x)

Value

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

Arguments

x

can be:

  • a path to a directory containing .Q files

Examples

Run this code
q_files_path <- system.file("extdata", "anolis", package = "tidypopgen")

admix_obj <- read_q_files(q_files_path)
summary(admix_obj)

Run the code above in your browser using DataLab