Distributions
MCPhylo.PhyloDist
— TypeThis structure implements a Distribution whos likelihood is calculated
according to Felsensteins algorithm.
MCPhylo.PhyloDist
— Methodfunction PhyloDist(my_tree::T, base_freq::S, substitution_rates::R, rates::R, substitution_model::Function) where {T<:GeneralNode, S<:DenseArray{Float64}, R<:Real}
Convenience function which can work with MCPhylo types.
MCPhylo.generate_constraints!
— Methodgenerate_constraints!(constraints::ConstraintDict, filename::String)
Function that adds further constraints to an existing dictionary of constraints, based on a txt file with a specific format (each line one constraint). See basic generate_constraints function on a file for more info.
MCPhylo.generate_constraints!
— Methodgenerate_constraints!(
constraints::Dict;
mono::Vector{Vector{S}}=Vector{String}[],
not_mono::Vector{Vector{S}}=Vector{String}[],
exc::Vector{Tuple{Vector{S}, Vector{S}}}=Vector{Tuple{Vector{String}, Vector{String}}}[]
)::ConstraintDict where S<:AbstractString
Function that adds further constraints to an existing dictionary of constraints. See basic generate_constraints function for more info.
MCPhylo.generate_constraints
— Methodgenerate_constraints(filename::String)
Function that creates a dictionary of constraints, based on a txt file with a specific format, i.e.:
lines starting with '#' will be ignored
multiple constraints per line allowed
mono: A,B; C,D; mono: E,F;
final semicolon is optional
not_mono: C,D,E exc : E,F!G;
See basic generate_constraints function for more info.
MCPhylo.generate_constraints
— Methodgenerate_constraints(
; mono::Vector{Vector{S}}=Vector{String}[],
not_mono::Vector{Vector{S}}=Vector{String}[],
exc::Vector{Tuple{Vector{S}, Vector{S}}}=Vector{Tuple{Vector{String}, Vector{String}}}[]
)::ConstraintDict where S<:AbstractString
Generate a dictionary of constraints based on the given arguments. Mono for all monophyletic groups. not_mono for leafs that are not allowed to form a monophletic group. And exc for a partial constraint, where one or more leafs are not allowed to be part of a specific clade.
e.g.: generate_constraints(mono=[["a", "b"], ["a", "c"]], exc=[(["b", "c"],["d"]])
MCPhylo.parse_constraints
— Methodparse_constraints(filename::S
)::Tuple{
Vector{Vector{S}},
Vector{Vector{S}},
Vector{Tuple{Vector{S}, Vector{S}}}
} where S<:AbstractString
–- INTERNAL –- Helper function that reads constraints out of a file