ADMIXTOOLS programs

qp3pop()

Estimate f3 statistics

qpdstat()

Estimate f4 statistics

qpf4ratio()

Estimate admixture proportions via f4 ratios

qpwave()

Estimate admixture waves

qpadm()

Estimate admixture weights

qpgraph()

Compute the fit of an admixture graph

Wrapper functions

qp3pop_wrapper()

Wrapper function around the original qp3Pop program

qpadm_wrapper()

Wrapper function around the original qpAdm program

qpdstat_wrapper()

Wrapper function around the original qpDstat program

qpf4ratio_wrapper()

Wrapper function around the original qpF4ratio program

qpgraph_wrapper()

Wrapper function around the original qpGraph program

qpwave_wrapper()

Wrapper function around the original qpWave program

Parsing functions

parse_dot()

Read graph in dot format

parse_qp3pop_output()

Read qp3Pop output file

parse_qpadm_output()

Read qpAdm output file

parse_qpdstat_output()

Read qpDstat output file

parse_qpf4ratio_output()

Read qpF4ratio output file

parse_qpgraph_graphfile()

Read qpGraph graph file

parse_qpgraph_output()

Read qpGraph output file

Plotting functions

plot_comparison()

Compare two models

plot_graph()

Plot an admixture graph

plot_graph_map()

Plot an admixture graph on a map

plot_map()

Plot samples on a map

plotly_comparison()

Compare two models

plotly_graph()

Plot an admixture graph using plotly

Resampling functions

qp3pop_resample_inds() qpdstat_resample_inds() qpwave_resample_inds() qpadm_resample_inds() qpgraph_resample_inds()

Run models while leaving out individuals

qp3pop_resample_snps() qpdstat_resample_snps() qpwave_resample_snps() qpadm_resample_snps() qpgraph_resample_snps()

Run models while leaving out SNP blocks

Reading and writing

extract_f2()

Compute and store blocked f2 statistics

extract_counts()

Extract and store data needed to compute blocked f2

f2_from_precomp()

Read blocked f2 statistics from disk

read_packedancestrymap()

Read genotype data from packedancestrymap files

read_plink()

Read genotype data from PLINK files

packedancestrymap_to_afs()

Read allele frequencies from packedancestrymap files

plink_to_afs()

Read allele frequencies from PLINK files

packedancestrymap_to_plink()

Convert EIGENSTRAT or PACKEDANCESTRYMAP to PLINK

Model exploration

find_graphs()

Find well fitting admixture graphs

qpwave_pairs()

Compute all pairwise qpwave p-values

qpadm_rotate()

Compute p-values for many qpadm models

Everything

admixtools

Tools for inferring demographic history from genetic data

afs_to_counts()

Compute count blocks and write them to disk

afs_to_f2()

Compute f2 blocks and write them to disk

afs_to_f2_blocks()

Compute all pairwise f2 statistics

agraph_to_igraph()

Convert agraph to igraph

boo_list()

Generate a list of bootstrap resampled arrays

compare_fits()

Compare the fit of two qpgraph models

compare_fits2()

Compare the fit of two qpgraph models

compare_fits4()

Compare the fit of two qpgraph models

count_snps()

Count SNPs in an f2-statistics array

count_zero_edges()

Count zero-length edges

decomposed_tree_neighbors()

Find all trees within SPR distance of 1 of all graph component trees

delete_admix()

Delete an admixture edge

delete_groups()

Delete groups

delete_leaf()

Remove population from graph

desimplify_graph()

Add two nodes before each admixture node

edges_to_igraph()

Convert data frame graph to igraph

eigenstrat_to_afs()

Read allele frequencies from EIGENSTRAT files

est_to_boo()

Turn per-block estimates into bootstrap estimates

est_to_loo()

Turn per-block estimates into leave-one-out estimates

example_anno

Data frame with sample annotations

example_f2_blocks

Blocked f2-statistics for 7 populations

example_graph

Admixture graph for 7 populations

example_igraph

Admixture graph for 7 populations

example_opt

Data frame with one fitted admixture graph

example_qpgraph_ref_results

example_graph fitted using qpGraph

example_triples

Data frame with population triples

extract_afs()

Compute and store blocked allele frequency data

extract_afs_simple()

Compute and store blocked allele frequency data

extract_counts()

Extract and store data needed to compute blocked f2

extract_f2()

Compute and store blocked f2 statistics

extract_f2_large()

Compute and store blocked f2 statistics

extract_f2_subset()

Copy f2-statistics

extract_samples()

Extract samples from PLINK files

f2()

Estimate f2 statistics

f2_from_geno()

Compute blocked f2 statistics

f2_from_msprime()

Simulate an admixture graph in msprime

f2_from_precomp()

Read blocked f2 statistics from disk

f2dat_f4dat()

Turn f2 data to f4 data

f3blockdat_from_geno()

f3 from genotype data

f4_from_afdat()

Compute f4 from allele frequencies

f4_from_f2()

Get per-block f4-statistics

f4blockdat_from_geno()

f4 from genotype data

f4blockdat_to_f4blocks()

Turn f4 block data to 3d array

find_admixedges()

Find admixture edges

find_graphs()

Find well fitting admixture graphs

find_graphs_old()

Find well fitting admixture graphs

find_newedges()

Find possible new edges

find_normedges()

Find drift edges

flipadmix_random()

Modify a graph flipping the direction of an admixture edge

fst()

Compute Fst

generate_all_graphs()

Generate all graphs

generate_all_trees()

Generate all trees

get_block_lengths()

Find LD-independent blocks

get_f2()

Turns f2_data into f2_blocks

get_leafnames()

Get the population names of a graph

get_outpop()

Get the outgroup from a graph (if it exists)

get_rootname()

Get the root name

graph_addleaf()

Add a population to an admixture graph

graph_distances()

Pairwise distance estimates for graphs

graph_equations()

Find well fitting admixture graphs

graph_f2_function()

Make a function representing a graph

graph_flipadmix()

Find all valid graphs which result from flipping one admixture edge

graph_hash()

Get unique hash of an admixture graph

graph_minusone()

Find all graphs which result from removing one admixture edge

graph_minusplus()

Find all graphs which result from adding and removing one admixture edge

graph_plusone()

Find all graphs which result from adding one admixture edge

graph_splittrees()

Find all trees which are part of the admixture graph

graph_to_afs()

Simulate allele frequncies under an admixture graph

graph_to_pcs()

Simulate PCs under an admixture graph

graph_to_qpadm()

Get all qpadm models for a graph

graphmod_pavel()

Return all graphs created from permuting a subclade

group_samples()

Group precomputed data

igraph_to_agraph()

Convert igraph to agraph

insert_admix()

Insert a single edge into graph

insert_admix_n()

Insert admixture edges into graph

insert_admix_old()

Insert admixture edges into graph

insert_leaf()

Add population to graph

is_valid()

Test if an admixture graph is valid

isomorphism_classes()

Find identical graphs

isomorphism_classes2()

Find identical graphs

joint_sfs()

Joint site frequency spectrum

joint_spectrum()

Estimate joint allele frequency spectrum

lazadm()

Estimate admixture weights

loo_list()

Generate a list of leave-one-out arrays

loo_to_est()

Turn leave-one-out estimates to per-block estimates

move_admixedge_once()

Modify a graph by moving an admixture edge

msprime_genome()

Simulate an admixture graph in msprime v1.x.

msprime_sim()

Simulate an admixture graph in msprime v1.x

mutate_n()

Modify a graph by applying n mutation functions

newick_to_edges()

Turn a newick format tree to a matrix of edges

node_counts()

Count how often each node in graph occurs in other graphs

node_signature()

Returns a signature of a graph consisting of the left and right descendent leaf nodes of each internal node (sorted and concatenated)

numadmix()

Count number of admixture nodes

packedancestrymap_to_afs()

Read allele frequencies from packedancestrymap files

packedancestrymap_to_plink()

Convert EIGENSTRAT or PACKEDANCESTRYMAP to PLINK

parse_dot()

Read graph in dot format

parse_qp3pop_output()

Read qp3Pop output file

parse_qpadm_output()

Read qpAdm output file

parse_qpdstat_output()

Read qpDstat output file

parse_qpf4ratio_output()

Read qpF4ratio output file

parse_qpgraph_graphfile()

Read qpGraph graph file

parse_qpgraph_output()

Read qpGraph output file

permute_leaves()

Modify a graph by permuting leaf nodes

place_root_random()

Modify a graph by changing the position of the root node

plink_to_afs()

Read allele frequencies from PLINK files

plot_comparison()

Compare two models

plot_graph()

Plot an admixture graph

plot_graph_map()

Plot an admixture graph on a map

plot_map()

Plot samples on a map

plotly_comparison()

Compare two models

plotly_graph()

Plot an admixture graph using plotly

pseudo_dates()

Get pseudo dates for graph nodes

qp3pop()

Estimate f3 statistics

qp3pop_wrapper()

Wrapper function around the original qp3Pop program

qpadm()

Estimate admixture weights

qpadm_models()

Partition a list of populations into left and right populations

qpadm_models_old()

Return all valid qpAdm models for an admixturegraph

qpadm_multi()

Run multiple qpadm models

qpadm_p()

Faster version of qpadm with reduced output

qpadm_rotate()

Compute p-values for many qpadm models

qpadm_wrapper()

Wrapper function around the original qpAdm program

qpdstat()

Estimate f4 statistics

qpdstat_wrapper()

Wrapper function around the original qpDstat program

qpf4diff()

Estimate f4 differences

qpf4ratio()

Estimate admixture proportions via f4 ratios

qpf4ratio_wrapper()

Wrapper function around the original qpF4ratio program

qpfstats()

Get smoothed f2-statistics

qpgraph()

Compute the fit of an admixture graph

qpgraph_precompute_f3()

Compute f3-statistics from f2-statistics.

qpgraph_resample_multi()

Evaluate a qpgraph models many times

qpgraph_resample_snps2()

Evaluate a qpgraph model many times

qpgraph_wrapper()

Wrapper function around the original qpGraph program

qpwave()

Estimate admixture waves

qpwave_pairs()

Compute all pairwise qpwave p-values

qpwave_wrapper()

Wrapper function around the original qpWave program

random_admixturegraph()

Generate a random admixture graph

random_dates()

Get random dates for graph nodes

random_newick()

Generate a random binary graph

random_sim()

Generate a random graph and simulate it in msprime v1.x

read_eigenstrat()

Read genotype data from EIGENSTRAT files

read_f2()

Read blocked f2 estimates from disk

read_packedancestrymap()

Read genotype data from packedancestrymap files

read_plink()

Read genotype data from PLINK files

qp3pop_resample_inds() qpdstat_resample_inds() qpwave_resample_inds() qpadm_resample_inds() qpgraph_resample_inds()

Run models while leaving out individuals

qp3pop_resample_snps() qpdstat_resample_snps() qpwave_resample_snps() qpadm_resample_snps() qpgraph_resample_snps()

Run models while leaving out SNP blocks

rotate_models()

Rotate populations between left and right

run_shiny_admixtools()

Launch ADMIXTOOLS 2 GUI

satisfies_constraints()

Test constraints on a graph

satisfies_eventorder()

Test f4 constraints on a graph

satisfies_nonzerof4()

Test f4 constraints on a graph

satisfies_numadmix()

Test admixture constraints on a graph

satisfies_zerof4()

Test f4 constraints on a graph

shortest_unique_prefixes()

Return shortest unique prefixes

simplify_graph()

Remove redundant edges

split_mat()

Split a matrix into blocks

split_multifurcations()

Split nodes with more than two edges

spr_all()

Modify a graph by regrafting a subcomponent

spr_leaves()

Modify a graph by regrafting a leaf

summarize_descendants()

List leaf nodes for all internal nodes

summarize_descendants_list()

List leaf nodes for all internal nodes in a list of graphs

summarize_eventorder()

List population split events in a graph

summarize_eventorder_list()

List population split events in a list of graphs

summarize_fits()

Summarize graph fits

summarize_numadmix()

List number of admixture events for each population

summarize_numadmix_list()

List number of admixture events for each population in a list of graphs

summarize_proxies()

Assign proxy populations to admixed populations

summarize_proxies_list()

List proxy populations in graphlist

summarize_triples()

Summarize triples across graphs

summarize_zerof4()

List clades in a graph

summarize_zerof4_list()

List clades in a list of graphs

swap_leaves()

Modify a graph by swapping two leaf nodes

test_cladality()

Test if two sets of populations form two clades

tree_in_graph()

Test if a tree is part of a graph

tree_neighbors()

Find all trees within SPR distance of 1

unidentifiable_edges()

Find all unidentifiable edges

write_dot()

Convert graph to dot format

write_f2()

Write blocked f2 estimates to disk