Package: admixtools 2.0.8

Robert Maier

admixtools: Inferring demographic history from genetic data

admixtools is a set of methods used to infer demographic history from genetic data using f-statistics. It was originally implemented as a command line program in C. This is a new implementation of the programs qpDstat, qpAdm, qpGraph, and contains several new features. It is efficient because it precomputes f2-statistics which can be re-used for many analyses.

Authors:Robert Maier [aut, cre], Nick Patterson [aut]

admixtools_2.0.8.tar.gz
admixtools_2.0.8.zip(r-4.5)admixtools_2.0.8.zip(r-4.4)admixtools_2.0.8.zip(r-4.3)
admixtools_2.0.8.tgz(r-4.4-x86_64)admixtools_2.0.8.tgz(r-4.4-arm64)admixtools_2.0.8.tgz(r-4.3-x86_64)admixtools_2.0.8.tgz(r-4.3-arm64)
admixtools_2.0.8.tar.gz(r-4.5-noble)admixtools_2.0.8.tar.gz(r-4.4-noble)
admixtools_2.0.8.tgz(r-4.4-emscripten)admixtools_2.0.8.tgz(r-4.3-emscripten)
|admixtools.html
admixtools/json (API)

# Install 'admixtools' in R:
install.packages('admixtools', repos = c('https://evolecolgroup.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/uqrmaie1/admixtools/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

5.91 score 74 stars 100 scripts 170 exports 64 dependencies

Last updated 17 days agofrom:61bd9e52e7 (on master). Checks:ERROR: 1 WARNING: 8. Indexed: no.

TargetResultDate
Doc / VignettesFAILNov 02 2024
R-4.5-win-x86_64WARNINGNov 02 2024
R-4.5-linux-x86_64WARNINGNov 02 2024
R-4.4-win-x86_64WARNINGNov 02 2024
R-4.4-mac-x86_64WARNINGNov 02 2024
R-4.4-mac-aarch64WARNINGNov 02 2024
R-4.3-win-x86_64WARNINGNov 02 2024
R-4.3-mac-x86_64WARNINGNov 02 2024
R-4.3-mac-aarch64WARNINGNov 02 2024

Exports:afs_to_countsafs_to_f2agraph_to_igraphboo_listcompare_fitscount_snpsdecomposed_tree_neighborsdelete_admixdelete_groupsdelete_leafdesimplify_graphedges_to_igrapheigenstrat_to_afseigenstrat_to_plinkest_to_booest_to_looextract_afsextract_afs_simpleextract_countsextract_f2extract_f2_subsetextract_samplesf2f2_from_genof2_from_msprimef2_from_precompf2dat_f4datf3f3blockdat_from_genof4f4_from_afdatf4_from_f2f4blockdat_from_genof4blockdat_to_f4blocksfind_admixedgesfind_graphsfind_newedgesfind_normedgesflipadmix_randomfstgenerate_all_graphsgenerate_all_treesget_block_lengthsget_leafnamesget_outpopget_rootnamegraph_addleafgraph_equationsgraph_f2_functiongraph_flipadmixgraph_hashgraph_minusonegraph_minusplusgraph_plusonegraph_splittreesgraph_to_afsgraph_to_pcsgraph_to_qpadmgraphmod_pavelgroup_samplesigraph_to_agraphinsert_admixinsert_admix_ninsert_leafis_validisomorphism_classesisomorphism_classes2joint_sfsjoint_spectrumlazadmloo_listloo_to_estmove_admixedge_oncemsprime_genomemsprime_simmutate_nnamedListnewick_to_edgesnumadmixpackedancestrymap_to_afspackedancestrymap_to_plinkparse_dotparse_fstatsparse_qp3pop_outputparse_qpadm_outputparse_qpdstat_outputparse_qpf4ratio_outputparse_qpgraph_graphfileparse_qpgraph_outputpermute_leavesplace_root_randomplink_to_afsplot_comparisonplot_graphplot_graph_mapplot_mapplotly_comparisonplotly_graphpseudo_datesqp3popqp3pop_resample_indsqp3pop_resample_snpsqp3pop_wrapperqpadmqpadm_modelsqpadm_multiqpadm_pqpadm_resample_indsqpadm_resample_snpsqpadm_rotateqpadm_wrapperqpdstatqpdstat_resample_indsqpdstat_resample_snpsqpdstat_wrapperqpf4diffqpf4ratioqpf4ratio_wrapperqpfstatsqpgraphqpgraph_precompute_f3qpgraph_resample_indsqpgraph_resample_multiqpgraph_resample_snpsqpgraph_resample_snps2qpgraph_wrapperqpwaveqpwave_pairsqpwave_resample_indsqpwave_resample_snpsqpwave_wrapperrandom_admixturegraphrandom_datesrandom_newickrandom_simread_eigenstratread_f2read_packedancestrymapread_plinkrotate_modelsrun_shiny_admixtoolssatisfies_constraintssatisfies_eventordersatisfies_nonzerof4satisfies_numadmixsatisfies_zerof4shortest_unique_prefixessimplify_graphsplit_matsplit_multifurcationsspr_allspr_leavessummarize_descendantssummarize_descendants_listsummarize_eventordersummarize_eventorder_listsummarize_fitssummarize_numadmixsummarize_numadmix_listsummarize_proxiessummarize_proxies_listsummarize_zerof4summarize_zerof4_listswap_leavestest_cladalitytree_in_graphtree_neighborsunidentifiable_edgeswrite_dotwrite_f2

Dependencies:abindbitbit64clicliprcodetoolscolorspacecpp11crayoncubelyrdata.treedigestdoParalleldplyrfansifarverforeachfurrrfuturegenericsggplot2globalsgluegtablehmsigraphisobanditeratorslabelinglatticelifecyclelistenvlobstrmagrittrMASSMatrixmgcvmunsellnlmeparallellypillarpkgconfigprettyunitsprogresspurrrquadprogR6RColorBrewerRcppRcppArmadilloreadrrlangscalesstringistringrtibbletidyrtidyselecttzdbutf8vctrsviridisLitevroomwithr

Readme and manuals

Help Manual

Help pageTopics
Tools for inferring demographic history from genetic dataadmixtools
Compute count blocks and write them to diskafs_to_counts
Compute f2 blocks and write them to diskafs_to_f2
Compute all pairwise f2 statisticsafs_to_f2_blocks
Convert agraph to igraphagraph_to_igraph
Generate a list of bootstrap resampled arraysboo_list
Compare the fit of two qpgraph modelscompare_fits
Compare the fit of two qpgraph modelscompare_fits2
Compare the fit of two qpgraph modelscompare_fits4
Count SNPs in an f2-statistics arraycount_snps
Count zero-length edgescount_zero_edges
Find all trees within SPR distance of 1 of all graph component treesdecomposed_tree_neighbors
Delete an admixture edgedelete_admix
Delete groupsdelete_groups
Remove population from graphdelete_leaf
Add two nodes before each admixture nodedesimplify_graph
Convert data frame graph to igraphedges_to_igraph
Read allele frequencies from _EIGENSTRAT_ fileseigenstrat_to_afs
Turn per-block estimates into bootstrap estimatesest_to_boo
Turn per-block estimates into leave-one-out estimatesest_to_loo
Data frame with sample annotationsexample_anno
Blocked f2-statistics for 7 populationsexample_f2_blocks
Admixture graph for 7 populationsexample_graph
Admixture graph for 7 populationsexample_igraph
Data frame with one fitted admixture graphexample_opt
example_graph fitted using qpGraphexample_qpgraph_ref_results
Data frame with population triplesexample_triples
Compute and store blocked allele frequency dataextract_afs
Compute and store blocked allele frequency dataextract_afs_simple
Extract and store data needed to compute blocked f2extract_counts
Compute and store blocked f2 statisticsextract_f2
Compute and store blocked f2 statisticsextract_f2_large
Copy f2-statisticsextract_f2_subset
Extract samples from PLINK filesextract_samples
Estimate f2 statisticsf2
Compute blocked f2 statisticsf2_from_geno
Simulate an admixture graph in msprimef2_from_msprime
Read blocked f2 statistics from diskf2_from_precomp
Turn f2 data to f4 dataf2dat_f4dat
f3 from genotype dataf3blockdat_from_geno
Compute f4 from allele frequenciesf4_from_afdat
Get per-block f4-statisticsf4_from_f2
f4 from genotype dataf4blockdat_from_geno
Turn f4 block data to 3d arrayf4blockdat_to_f4blocks
Find admixture edgesfind_admixedges
Find well fitting admixture graphsfind_graphs
Find well fitting admixture graphsfind_graphs_old
Find possible new edgesfind_newedges
Find drift edgesfind_normedges
Modify a graph flipping the direction of an admixture edgeflipadmix_random
Compute Fstfst
Generate all graphsgenerate_all_graphs
Generate all treesgenerate_all_trees
Find LD-independent blocksget_block_lengths
Turns f2_data into f2_blocksget_f2
Get the population names of a graphget_leafnames
Get the outgroup from a graph (if it exists)get_outpop
Get the root nameget_rootname
Add a population to an admixture graphgraph_addleaf
Pairwise distance estimates for graphsgraph_distances
Find well fitting admixture graphsgraph_equations
Make a function representing a graphgraph_f2_function
Find all valid graphs which result from flipping one admixture edgegraph_flipadmix
Get unique hash of an admixture graphgraph_hash
Find all graphs which result from removing one admixture edgegraph_minusone
Find all graphs which result from adding and removing one admixture edgegraph_minusplus
Find all graphs which result from adding one admixture edgegraph_plusone
Find all trees which are part of the admixture graphgraph_splittrees
Simulate allele frequncies under an admixture graphgraph_to_afs
Simulate PCs under an admixture graphgraph_to_pcs
Get all qpadm models for a graphgraph_to_qpadm
Return all graphs created from permuting a subcladegraphmod_pavel
Group precomputed datagroup_samples
Convert igraph to agraphigraph_to_agraph
Insert a single edge into graphinsert_admix
Insert admixture edges into graphinsert_admix_n
Insert admixture edges into graphinsert_admix_old
Add population to graphinsert_leaf
Test if an admixture graph is validis_valid
Find identical graphsisomorphism_classes
Find identical graphsisomorphism_classes2
Joint site frequency spectrumjoint_sfs
Estimate joint allele frequency spectrumjoint_spectrum
Estimate admixture weightslazadm
Generate a list of leave-one-out arraysloo_list
Turn leave-one-out estimates to per-block estimatesloo_to_est
Modify a graph by moving an admixture edgemove_admixedge_once
Simulate an admixture graph in msprime v1.x.msprime_genome
Simulate an admixture graph in msprime v1.xmsprime_sim
Modify a graph by applying n mutation functionsmutate_n
Turn a newick format tree to a matrix of edgesnewick_to_edges
Count how often each node in graph occurs in other graphsnode_counts
Returns a signature of a graph consisting of the left and right descendent leaf nodes of each internal node (sorted and concatenated)node_signature
Count number of admixture nodesnumadmix
Read allele frequencies from packedancestrymap filespackedancestrymap_to_afs
Convert _EIGENSTRAT_ or _PACKEDANCESTRYMAP_ to _PLINK_eigenstrat_to_plink packedancestrymap_to_plink
Read graph in dot formatparse_dot
Read qp3Pop output fileparse_qp3pop_output
Read qpAdm output fileparse_qpadm_output
Read qpDstat output fileparse_qpdstat_output
Read qpF4ratio output fileparse_qpf4ratio_output
Read qpGraph graph fileparse_qpgraph_graphfile
Read qpGraph output fileparse_qpgraph_output
Modify a graph by permuting leaf nodespermute_leaves
Modify a graph by changing the position of the root nodeplace_root_random
Read allele frequencies from 'PLINK' filesplink_to_afs
Compare two modelsplot_comparison
Plot an admixture graphplot_graph
Plot an admixture graph on a mapplot_graph_map
Plot samples on a mapplot_map
Compare two modelsplotly_comparison
Plot an admixture graph using plotlyplotly_graph
Get pseudo dates for graph nodespseudo_dates
Estimate f3 statisticsf3 qp3pop
Wrapper function around the original qp3Pop programqp3pop_wrapper
Estimate admixture weightsqpadm
Partition a list of populations into left and right populationsqpadm_models
Return all valid qpAdm models for an admixturegraphqpadm_models_old
Run multiple qpadm modelsqpadm_multi
Faster version of 'qpadm' with reduced outputqpadm_p
Compute p-values for many qpadm modelsqpadm_rotate
Wrapper function around the original qpAdm programqpadm_wrapper
Estimate f4 statisticsf4 qpdstat
Wrapper function around the original qpDstat programqpdstat_wrapper
Estimate f4 differencesqpf4diff
Estimate admixture proportions via f4 ratiosqpf4ratio
Wrapper function around the original qpF4ratio programqpf4ratio_wrapper
Get smoothed f2-statisticsqpfstats
Compute the fit of an admixture graphqpgraph
Compute f3-statistics from f2-statistics.qpgraph_precompute_f3
Evaluate a qpgraph models many timesqpgraph_resample_multi
Evaluate a qpgraph model many timesqpgraph_resample_snps2
Wrapper function around the original qpGraph programqpgraph_wrapper
Estimate admixture wavesqpwave
Compute all pairwise qpwave p-valuesqpwave_pairs
Wrapper function around the original qpWave programqpwave_wrapper
Generate a random admixture graphrandom_admixturegraph
Get random dates for graph nodesrandom_dates
Generate a random binary graphrandom_newick
Generate a random graph and simulate it in msprime v1.xrandom_sim
Read genotype data from _EIGENSTRAT_ filesread_eigenstrat
Read blocked f2 estimates from diskread_f2
Read genotype data from packedancestrymap filesread_packedancestrymap
Read genotype data from 'PLINK' filesread_plink
Run models while leaving out individualsqp3pop_resample_inds qpadm_resample_inds qpdstat_resample_inds qpgraph_resample_inds qpwave_resample_inds resample_inds
Run models while leaving out SNP blocksqp3pop_resample_snps qpadm_resample_snps qpdstat_resample_snps qpgraph_resample_snps qpwave_resample_snps resample_snps
Rotate populations between left and rightrotate_models
Launch ADMIXTOOLS 2 GUIrun_shiny_admixtools
Test constraints on a graphsatisfies_constraints
Test f4 constraints on a graphsatisfies_eventorder
Test f4 constraints on a graphsatisfies_nonzerof4
Test admixture constraints on a graphsatisfies_numadmix
Test f4 constraints on a graphsatisfies_zerof4
Return shortest unique prefixesshortest_unique_prefixes
Remove redundant edgessimplify_graph
Split a matrix into blockssplit_mat
Split nodes with more than two edgessplit_multifurcations
Modify a graph by regrafting a subcomponentspr_all
Modify a graph by regrafting a leafspr_leaves
List leaf nodes for all internal nodessummarize_descendants
List leaf nodes for all internal nodes in a list of graphssummarize_descendants_list
List population split events in a graphsummarize_eventorder
List population split events in a list of graphssummarize_eventorder_list
Summarize graph fitssummarize_fits
List number of admixture events for each populationsummarize_numadmix
List number of admixture events for each population in a list of graphssummarize_numadmix_list
Assign proxy populations to admixed populationssummarize_proxies
List proxy populations in graphlistsummarize_proxies_list
Summarize triples across graphssummarize_triples
List clades in a graphsummarize_zerof4
List clades in a list of graphssummarize_zerof4_list
Modify a graph by swapping two leaf nodesswap_leaves
Test if two sets of populations form two cladestest_cladality
Test if a tree is part of a graphtree_in_graph
Find all trees within SPR distance of 1tree_neighbors
Find all unidentifiable edgesunidentifiable_edges
Convert graph to dot formatwrite_dot
Write blocked f2 estimates to diskwrite_f2