admix.io.read_dataset#

admix.io.read_dataset(pfile: str, lanc_file: str | None = None, snp_info_file: str | None = None, indiv_info_file: str | None = None, n_anc: int | None = None, snp_chunk: int = 1024) Dataset[source]#

Read a dataset from a directory.

Parameters:
  • pfile (str) – PLINK2 file prefix, pfile.snp_info will also be read and combined with .pvar

  • lanc_file (str) – local ancestry file, if not provided, read_dataset will attempt to find it with <pfile>.lanc

  • snp_info_file (str) – SNP info file, if not provided, read_dataset will attempt to find it with <pfile>.snp_info

  • indiv_info_file (str) – individual info file, if not provided, read_dataset will attempt to find it with <pfile>.indiv_info

  • n_anc (int) – number of ancestries, if not provided, read_dataset will attempt to infer from the local ancestry file

  • snp_chunk (int) – chunk size for reading the SNP info file (default: 1024)

Returns:

Dataset