Miscellaneous#

admix.cli.prune(pfile: str, out: str, indep_pairwise_params: List | None = None)[source]#

Prune a pfile based on indep_pairwise_params

Parameters:
  • pfile (str) – pfile

  • out (str) – out_prefix

  • indep_pairwise_params ([type], optional) – if None, use the default [100 5 0.1]

Returns:

out.[pgen|pvar|psam] will be created

admix.cli.lanc(pfile: str, ref_pfile: str, ref_pop_col: str, ref_pops: str, out: str)[source]#
admix.cli.get_1kg_ref(dir: str, build: str, verbose: bool = False, memory: int = 16000)[source]#

Get the 1,000 reference genome in plink2 format.

Parameters:
  • dir (str) – Directory where the reference genome is stored. The following files will be downloaded and stored in this directory: - ${dir}/pgen: containing plink2 files - ${dir}/metadata: containing metadata files

  • build (str) – Build of the reference genome. hg38 or hg19.

  • verbose (bool) – Whether to print out the progress of the download.

  • memory (int) – Memory in MB to use for PLINK command. Default is 16000 (~16GB).

Examples

admix get-1kg-ref --dir=/path/to/1kg --build hg38
admix.cli.select_admix_indiv(ref_pfile: str, pca_prefix: str, superpop1: str, superpop2: str, out: str, exclude_pop1: str | None = None, exclude_pop2: str | None = None, n_pc: int = 4, sample_t_range: Tuple[float, float] = (0.05, 0.95), sample_dist_max: float = 1.5)[source]#

Select admixed individuals based on joint PCA analysis results of (1) reference dataset (2) sample dataset

Parameters:
  • ref_pfile (str) – reference panel pfile prefix

  • pca_prefix (str) – joint pca results prefix. {pca_prefix}.eigenvec, {pca_prefix}.eigenval will be read

  • out (str) – output prefix

  • superpop1 (str) – superpopulation 1

  • superpop2 (str) – superpopulation 2

  • exclude_pop1 (str, optional) – exclude individuals from superpopulation 1, by default None

  • exclude_pop2 (str, optional) – exclude individuals from superpopulation 2, by default None