PhyloSpec aims to start a conversation about standard model components, common assumptions, and best practices in the field of phylogenetics. The result of this will be the Core Component Library, a set of model components which are considered to be common and well-established.
The following represents Draft 12.2025 of the core components. The prototype tools implement most of these core components.
Add your feedback in the GitHub Discussion of this draft!
Logical value
Text value
Real-valued number
Non-negative real number (>= 0)
RealPositive real number (> 0)
NonNegativeRealProbability value [0,1]
NonNegativeRealA rate (a positive real number)
PositiveRealAn age (a non-negative number)
NonNegativeRealInteger-valued number
Non-negative integer (>= 0)
IntegerPositive integer (> 0)
NonNegativeIntegerNon-negative integer (>= 0)
NonNegativeIntegerGeneric map of key-value pairs
Generic ordered collection of elements
Generic two-dimensional grid of values
Square matrix with equal number of rows and columns
MatrixProbability vector with elements that sum to 1.0
Vector<Probability>Rate matrix for substitution models
SquareMatrix<Real>Stochastic matrix - probability transition matrix
Matrix<Probability>DNA/RNA nucleotide alphabet
Standard amino acid alphabet
Biological sequence with elements from alphabet A
Vector<A>Phylogenetic tree structure
Abstract type representing a probability distribution
Population function mapping an age to the effective population size
Taxonomic unit
A set of taxa
Vector<Taxon>Multiple sequence alignment with extractable properties
Description of how to parse a value from a string
Natural logarithm
Realx: PositiveReal (required) - Input valuebase: Integer (optional) - Base valueExponential function
PositiveRealx: Real (required) - Input valueSquare root function
NonNegativeRealx: NonNegativeReal (required) - Input valueGenerate a vector of evenly spaced values over a specified interval
Vector<Real>start: Real (required) - Starting valueend: Real (required) - Ending valuenum: PositiveInteger (required) - Number of values to generateGenerate a vector of consecutive integers
Vector<Integer>start: Integer (required) - Starting valueend: Integer (required) - Ending value (inclusive)Create a vector by repeating a value n times
Vector<T>value: T (required) - Value to repeatnum: PositiveInteger (required) - Number of times to repeatLoad an alignment from Nexus file
Alignmentfile: String (required) - Path to Nexus fileage: Parser (optional) - How to parse the taxon ages from the taxon namesspeciesName: Parser (optional) - How to parse the species names from the taxon namesLoad an alignment from Nexus file
Alignmentfile: String (required) - Path to Nexus filedate: Parser (optional) - How to parse the absolute taxon dates from the taxon namesspeciesName: Parser (optional) - How to parse the species names from the taxon namesLoad alignment from FASTA file
Alignmentfile: String (required) - Path to FASTA fileage: Parser (optional) - How to parse the taxon ages from the taxon namesspeciesName: Parser (optional) - How to parse the species names from the taxon namesLoad alignment from FASTA file
Alignmentfile: String (required) - Path to FASTA filedate: Parser (optional) - How to parse the absolute taxon dates from the taxon namesspeciesName: Parser (optional) - How to parse the species names from the taxon namesLoad a phylogenetic tree from Newick or Nexus file
Treefile: String (required) - Path to tree fileLoad a CSV file
Vector<Map<String, String>>file: String (required) - Path to csv filedelimiter: String (optional) [default: ,] - Path to csv fileheaders: Vector<String> (optional) - Headers to use instead of the first rowRetrieves an alignment with a single trait from taxa names.
Alignmenttaxa: Taxa (required) - The taxa to extract the traits fromtrait: Parser (required) - How to parse the trait from the taxon namesReads an env variable.
Stringvariable: String (required) - Name of the environment variableParse a phylogenetic tree from Newick string
TreenewickString: String (required) - Newick format tree stringCreates a parser to extract information out of a delimited string
Parserdelimiter: String (required) - The delimiter to separate parts of the input stringpart: PositiveInteger (required) - Which part to take from the delimited input string (one-based)Creates a parser to extract information out of a string using regex
Parserregex: String (required) - The regex pattern with a capturing groupExtract taxa from an alignment
Taxaalignment: Alignment (required) - Input alignmentExtract taxa from a tree
Taxatree: Tree (required) - Input treeCreate a taxon from a name, an optional species name and an optional age
Taxonname: String (required) - Taxon namespecies: String (optional) - Species nameage: Age (optional) [default: 0] - The age of the sample of this taxonExtract a subset of sites from an alignment
Alignmentalignment: Alignment (required) - Input alignmentstart: PositiveInteger (optional) - Starting site positionend: PositiveInteger (optional) - Ending site position (inclusive)codonPosition: PositiveInteger (optional) - Codon position to extract (1, 2, or 3)Count the number of branches in a tree
PositiveIntegertree: Tree (required) - Input treeCount the number of taxa in an alignment
PositiveIntegeralignment: Alignment (required) - Input alignmentCount the number of taxa in a tree
PositiveIntegertree: Tree (required) - Input treeCount the number of sites in an alignment
PositiveIntegeralignment: Alignment (required) - Input alignmentCount the number of sites in a sequence
PositiveIntegersequence: Sequence<A> (required) - Input sequenceCount the number of elements in a vector
NonNegativeIntegervector: Vector<T> (required) - Input vectorGet the age of the root node in a tree
Agetree: Tree (required) - Input treeGet the age of a taxon in a tree
Agenode: String (required) - Taxon name or species nametree: Tree (required) - Input treeGet the age of a taxon
Agetaxon: Taxon (required) - Input taxonGet the age of the most common recent ancestor of a clade in the tree
Ageclade: Vector<String> (required) - Vector with the taxon or species names of the cladetree: Tree (required) - Input treeCount the number of rows in a matrix
PositiveIntegermatrix: Matrix<T> (required) - Input matrixCount the number of columns in a matrix
PositiveIntegermatrix: Matrix<T> (required) - Input matrixSum all elements in a vector of real numbers
Realvector: Vector<Real> (required) - Input vectorSum all elements in a vector of integers
Integervector: Vector<Integer> (required) - Input vectorGet the name of a taxon
Stringtaxon: Taxon (required) - Input taxonGet the species name of a taxon
Stringtaxon: Taxon (required) - Input taxonVector of independent and identically distributed random variables
Distribution<Vector<T>>base: Distribution<T> (required) - Base distribution for each componentnum: PositiveInteger (required) - Number of independent drawsMixture of distributions with the same return type
Distribution<T>components: Vector<Distribution<T>> (required) - Component distributions that all generate type Tweights: Simplex (required) - Mixture weights for each componentTruncated version of the given distribution on reals
Distribution<T>base: Distribution<Real> (required) - The base distribution to truncatelower: T (optional) [default: -Inf] - Lower boundupper: T (optional) [default: +Inf] - Upper boundOffset version of the given distribution on reals
Distribution<Real>base: Distribution<Real> (required) - The base distribution to offsetoffset: Real (required) - How much to offset the distributionNormal (Gaussian) distribution
Distribution<Real>mean: Real (required) - Mean of the distributionsd: PositiveReal (required) - Standard deviationLog-normal distribution for positive real values
Distribution<PositiveReal>logMean: Real (required) - Mean of the distribution in log spacelogSd: PositiveReal (required) - Standard deviation in log spaceGamma distribution for positive real values
Distribution<PositiveReal>shape: PositiveReal (required) - Shape parameterrate: PositiveReal (required) - Rate parameterDiscrete gamma-distributed variable with mean 1.0 (equal shape and rate)
Distribution<Real>shape: PositiveReal (required) - Shape parameternumCategories: PositiveInteger (required) - Number of discrete categoriesBeta distribution for values in (0,1)
Distribution<Probability>alpha: PositiveReal (required) - Alpha parameterbeta: PositiveReal (required) - Beta parameterExponential distribution for rate parameters
Distribution<PositiveReal>rate: Rate (required) - Rate parameterUniform distribution for bounded values
Distribution<Real>lower: Real (required) - Lower boundupper: Real (required) - Upper boundUniform distribution of integers for bounded values
Distribution<Integer>lower: Integer (required) - Lower boundupper: Integer (required) - Upper boundCauchy distribution
Distribution<Real>location: Real (required) - location parameterscale: PositiveReal (required) - scale parameterDirichlet distribution for probability vectors
Distribution<Simplex>concentration: Vector<Real> (required) - Concentration parametersMultivariate normal for correlated values
Distribution<Vector<Real>>mean: Vector<Real> (required) - Mean vectorcovariance: Matrix<Real> (required) - Covariance matrixBernoulli distribution (either 0 or 1)
Distribution<NonNegativeInteger>p: Real (required) - Probability of successCategorical distribution
Distribution<PositiveInteger>probabilities: Simplex (required) - Success probabilitiesBinomial distribution (number of successes)
Distribution<NonNegativeInteger>numTrials: NonNegativeInteger (required) - Number of trialsp: Probability (required) - Probability of successMultinomial distribution
Distribution<NonNegativeInteger>numTrials: NonNegativeInteger (required) - Number of trialsnumEvents: PositiveInteger (required) - Number of possible eventsprobabilities: Simplex (required) - The probabilities of each eventGeometric distribution (number of failures before the first success)
Distribution<NonNegativeInteger>p: Probability (required) - Probability of successPoisson distribution
Distribution<NonNegativeReal>rate: Rate (required) - Rate parameterGenerates a chain of auto-correlated random variables
Distribution<Vector<Real>>initialMean: Real (required) - The mean of the exponential for the first value of the chainnumValues: Count (required) - The length of the returned chainYule pure-birth process for trees conditioned on the number of taxa
Distribution<Tree>birthRate: Rate (required) [default: 1] - Birth rate parametertaxa: Taxa (required) - Taxa for the treeYule pure-birth process for trees conditioned on the root age
Distribution<Tree>birthRate: Rate (required) [default: 1] - Birth rate parameterrootAge: Age (required) - The age of the roottaxa: Taxa (required) - Taxa for the treeBirth-death process for trees of extant taxa. Conditioned on the root age if given, otherwise conditioned on the number of extant taxa
Distribution<Tree>birthRate: Rate (required) - Birth rate parameterdeathRate: Rate (required) - Death rate parametersamplingProbability: Probability (optional) [default: 1] - The proportion of extant taxa sampled at the presenttaxa: Taxa (required) - Taxa for the treerootAge: Age (optional) - The age of the rootBirth-death process for trees of extant taxa. Conditioned on the root age if given, otherwise conditioned on the number of extant taxa
Distribution<Tree>diversificationRate: Rate (required) - Diversification rate parameterturnover: Rate (required) - Turnover parametersamplingProbability: Probability (optional) [default: 1] - The proportion of extant taxa sampled at the presentrootAge: Age (optional) - The age of the roottaxa: Taxa (required) - Taxa for the treeCoalescent process for population genetics
Distribution<Tree>populationSize: PositiveReal (required) - Effective population sizetaxa: Taxa (required) - Taxa for the treeCoalescent process for population genetics
Distribution<Tree>populationSize: PopulationFunction (required) - Population size functiontaxa: Taxa (required) - Taxa for the treeSkyline coalescent process with piecewise-constant population sizes
Distribution<Tree>populationSizes: Vector<PositiveReal> (required) - Effective population sizes for each epochchangeTimes: Vector<PositiveReal> (required) - Times at which population size changes occur (ages backward in time)groupSizes: Vector<PositiveInteger> (optional) - Number of coalescent events for each epochtaxa: Taxa (required) - Taxa for the treeFossilized birth-death process for trees with fossil taxa, conditioned on the number of taxa and root age
Distribution<Tree>speciationRate: Rate (required) - Birth (speciation) rateextinctionRate: Rate (required) - Death (extinction) rateserialSamplingRate: Rate (required) - Fossil sampling rate through timesamplingProbability: Probability (optional) [default: 1] - Probability of sampling extant taxa at the presentrootAge: Age (optional) - The age of the roottaxa: Taxa (required) - Taxa for the tree (including fossils)Fossilized birth-death process for trees with fossil taxa, conditioned on the number of taxa and root age
Distribution<Tree>diversificationRate: Rate (required) - Diversification rate parameterturnover: Rate (required) - Turnover rate parameterserialSamplingRate: Rate (required) - Fossil sampling rate through timesamplingProbability: Probability (optional) [default: 1] - Probability of sampling extant taxa at the presentrootAge: Age (optional) - The age of the roottaxa: Taxa (required) - Taxa for the tree (including fossils)Phylogenetic continuous-time Markov chain
Distribution<Alignment>tree: Tree (required) - Phylogenetic treeqMatrix: QMatrix (required) - Q MatrixsiteRates: Vector<Real> (optional) - Rate heterogeneity across sitesbranchRates: Vector<Real> (optional) - Rate heterogeneity across branchesPhylogenetic continuous-time Markov chain
Distribution<Alignment>tree: Tree (required) - Phylogenetic treesiteQMatrices: Vector<QMatrix> (required) - Q Matrix per sitesiteRates: Vector<Real> (optional) - Rate heterogeneity across sitesbranchRates: Vector<Real> (optional) - Rate heterogeneity across branchesPhylogenetic Brownian motion for the evolution of continuous traits
Distribution<Alignment<Real>>tree: Tree (required) - Phylogenetic treebranchRates: Vector<Rate> (required) - Rate-heterogeneity across branchessiteRates: Vector<Rate> (required) - Rate-heterogeneity across sitesrootValues: Vector<Real> (optional) - Trait values across sitesPhylogenetic Ornstein-Uhlenbeck process for univariate traits with selection
Distribution<Alignment<Real>>tree: Tree (required) - Phylogenetic treesiteVariances: Vector<PositiveReal> (required) - The rate of random evolution per site (sigma^2)selectionStrength: PositiveReal (required) [default: 1] - Selection strength (alpha)siteOptima: Vector<Real> (required) [default: 0] - Optimal trait values per siterootValues: Vector<Real> (optional) - Trait values at the root per siteStrict clock model for branch rates
Distribution<Vector<Real>>clockRate: Rate (optional) [default: 1] - The base ratetree: Tree (required) - Phylogenetic treeRelaxed clock model for branch rates
Distribution<Vector<Real>>base: Distribution<Rate> (required) - The distribution with mean 1.0 to draw branch-wise rates fromclockRate: Rate (required) - The distribution to draw the mean clock rate fromtree: Tree (required) - Phylogenetic treeDiscrete gamma site rates with a proportion of invariant sites
Distribution<Vector<Real>>shape: PositiveReal (required) - The shape parameter of the gamma distributionnumCategories: PositiveInteger (required) - Number of discrete categoriesinvariantProportion: Probability (optional) [default: 0] - Proportion of invariant sitesnumSites: NonNegativeInteger (required) - Number of sitesJukes-Cantor model (equal rates)
QMatrixKimura 2-parameter model
QMatrixkappa: PositiveReal (required) - Transition/transversion ratioFelsenstein 81 model
QMatrixbaseFrequencies: Simplex (required) - Nucleotide frequenciesHasegawa-Kishino-Yano model
QMatrixkappa: PositiveReal (required) - Transition/transversion ratiobaseFrequencies: Simplex (required) - Nucleotide frequenciesGeneral Time-Reversible model
QMatrixrateAC: Rate (required) - Substitution rate for A to CrateAG: Rate (required) - Substitution rate for A to GrateAT: Rate (required) - Substitution rate for A to TrateCG: Rate (required) - Substitution rate for C to GrateCT: Rate (required) - Substitution rate for C to TrateGT: Rate (required) - Substitution rate for G to TbaseFrequencies: Simplex (required) - Nucleotide frequenciesWhelan And Goldman model
QMatrixbaseFrequencies: Simplex (optional) - Amino acid frequenciesJones-Taylor-Thornton model
QMatrixbaseFrequencies: Simplex (optional) - Amino acid frequenciesLe-Gascuel model
QMatrixbaseFrequencies: Simplex (optional) - Amino acid frequenciesThe M0 (GY94) codon substitution model
QMatrixkappa: PositiveReal (required) - The transition-transversion rate ratioomega: PositiveReal (required) - The dN / dS rate ratiobaseFrequencies: Simplex (required) - Stationary codon frequenciesThe Lewis-Mk model for discrete traits
QMatrixrate: PositiveReal (optional) [default: 1] - The expected rate of changeA population function of a constant population
PopulationFunctionpopulationSize: PositiveReal (required) - Effective population sizeA population function of a exponentially growing population
PopulationFunctionpopulationSize: PositiveReal (required) - Present-day population sizegrowthRate: Real (required) - The exponent of the exponential growthA population function of a logistically growing population
PopulationFunctioninflectionAge: Age (required) - The age of the inflection point t50carryingCapacity: PositiveReal (required) - The carrying capacity KgrowthRate: Real (required) - The logistic growth rateCombines several population functions in a piece-wise manner
PopulationFunctionfunctions: Vector<PopulationFunction> (required) - The population functions to combinechangeTimes: Vector<PositiveReal> (required) - The change times