Python API#

Import admix-kit as:

import admix

Association testing#

admix.assoc.marginal

Marginal association testing for one SNP at a time

Genetic correlation across local ancestry#

Note

For genetic correlation analyis, because of involvement of multiple steps, it is recommended to use the command line interface admix genet-cor to perform the analysis. See here for details.

admix.cli.admix_grm

Calculate the admix GRM for a given pfile

admix.cli.admix_grm_merge

Merge multiple GRM matrices

admix.cli.genet_cor

Estimate genetic correlation

Polygenic scoring#

admix.data.calc_partial_pgs

Given a vector of polygenic score weights, calculate polygenic scores with regard to every ancestry backgrounds for each individual.

Data structures: admix.Dataset#

admix.Dataset

Data structure to contain genotype and local ancestry.

Simulation: admix.simulate#

admix.simulate.admix_geno

Simulate admixed genotype

admix.simulate.quant_pheno

Simulate continuous phenotype of admixed individuals [continuous]

admix.simulate.binary_pheno

Simulate under liability threshold.

admix.simulate.quant_pheno_1pop

Simulate quantative phenotype for a single population [continuous]

admix.simulate.quant_pheno_grm

Simulate continuous phenotype of admixed individuals [continuous] using GRM

Data management: admix.data#

admix.data.allele_per_anc

Get allele count per ancestry

admix.data.af_per_anc

Calculate allele frequency per ancestry

Input and output: admix.io#

admix.io.read_dataset

Read a dataset from a directory.

admix.io.read_lanc

Read local ancestry with .lanc format

admix.io.read_rfmix

Assign local ancestry to a dataset.

External tools: admix.tools#

admix.tools.plink2.lift_over

Lift over a plink file to another genome.

Plot: admix.plot#

admix.plot.lanc

Plot local ancestry.

admix.plot.admixture

Plot admixture.

admix.plot.manhattan

Manhatton plot of p-values

admix.plot.qq

qq plot of p-values