PhyloDiamond.phylo_diamond — Function
phylo_diamond(cf::DataFrame, m::Int64, output_filename::String="phylo_diamond.txt")

Estimate the m best-fitting networks with one 4-node hybridization cycle from a table of concordance factors (CFs), using phylogenetic invariants (Wu and Solís-Lemus, 2024).

cf must have 7 columns, used by position: the names of 4 taxa a, b, c, d, then the CFs of ab|cd, ac|bd and ad|bc. It needs a row for every set of 4 taxa, and at least 6 taxa. cf itself is not modified.

The report is printed and added at the end of output_filename. Returns a Dict from rank (1 = best) to the network in extended newick format. Only the clades are estimated: branch lengths and inheritance probabilities in the newick strings are placeholders.

See also generate_cf_from_gene_trees.

Example

df = generate_cf_from_gene_trees("genetrees.tre")
res = phylo_diamond(df, 5)
res[1] # best network
source
PhyloDiamond.phylo_diamond — Function
phylo_diamond(gene_trees_filename::String, m::Int64, output_filename::String="phylo_diamond.txt")

Estimate the m best-fitting networks with one 4-node hybridization cycle from a file of gene trees (one newick tree per line), using phylogenetic invariants (Wu and Solís-Lemus, 2024). The gene trees are first summarized into concordance factors with generate_cf_from_gene_trees. There must be at least 6 taxa.

The report is printed and added at the end of output_filename. Returns a Dict from rank (1 = best) to the network in extended newick format. Only the clades are estimated: branch lengths and inheritance probabilities in the newick strings are placeholders.

Example

res = phylo_diamond("genetrees.tre", 5)
res[1] # best network
source
PhyloDiamond.generate_cf_from_gene_trees — Function
generate_cf_from_gene_trees(filename_genetrees)

Read gene trees from a file (one newick tree per line) and return a DataFrame of concordance factors: for each set of 4 taxa, the proportion of gene trees with each of the 3 quartet topologies. The columns are t1, t2, t3, t4, CF12_34, CF13_24, CF14_23, the format that phylo_diamond takes.

source