Skip to content
RMP-debPublic

About

Filter ANGSD and ABBA-BABA D-statistic tables to retain valid H1/H2 trio arrangements consistent with a rooted species tree.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

introTree

DOI

Tools such as 'ANGSD' report D-statistics for every trio arrangement, but only arrangements whose H1 and H2 pairing agrees with a rooted species tree are interpretable in that tree context. introTree filters D-statistic (ABBA-BABA allele-sharing) tables to retain those trios. P-values and Benjamini-Hochberg adjusted p-values are reported for information only; significance is based on the Z-score threshold.

Install

install.packages("remotes")
remotes::install_github("RMP-deb/introTree")

install.packages("introTree")

Use

library(introTree)

f <- DStatFilter$new()
tree_file <- system.file("extdata", "example_tree.treefile", package = "introTree")
table_file <- system.file("extdata", "example_dstats.txt", package = "introTree")
f$loadTree(tree_file, "outgroup")
f$loadTable(table_file)
f$filter()
f                                  # summary
f$saveResult("dstat_clean.csv")

Limits

A D-statistic alone does not establish that gene flow occurred or determine its direction.

Citation

If you use introTree, please cite it:

citation("introTree")

Muller-Perol, R. (2026). introTree: Tree-Aware Filtering of D-Statistic Tables. R package. https://doi.org/10.5281/zenodo.24698549

Licence

GPL-3.0 license See LICENSE.

About

Filter ANGSD and ABBA-BABA D-statistic tables to retain valid H1/H2 trio arrangements consistent with a rooted species tree.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages