clade
- Clade
... : | String (pass by const reference) |
Taxon names as string values. | |
... : | String[] (pass by const reference) |
Taxon names as a vector of string values. | |
... : | Clade (pass by const reference) |
Taxa as clade objects. | |
... : | Taxon (pass by const reference) |
Taxon names as taxon values | |
... : | Taxon[] (pass by const reference) |
Taxon names as a vector of taxons | |
age : | RealPos (pass by value) |
The age of the clade (optional). | |
Default : NULL | |
name : | String (pass by value) |
The name of the clade (optional). | |
Default : NULL | |
missing : | Natural (pass by value) |
Number of missing taxa in the clade (optional). | |
Default : NULL | |
negative : | Bool (pass by value) |
Is this a negative clade constraint? | |
Default : FALSE | |
optional_match : | Bool (pass by value) |
Clade constraint satisfied when any Clade argument matched | |
Default : FALSE |
# read in a tree
phy = readTrees("primates.tre")[1]
# get taxa from the tree
taxa = phy.taxa()
# create a clade for (1,2) using taxon objects
clade_12 = clade( taxa[1], taxa[2] )
# create a clade for (1,2,3)
clade_123 = clade( taxa[3], clade_12 )
# create a clade for (4,5) using taxon names
clade_45 = clade( "Taxon_4", "Taxon_5" )
# create a negative clade constraint
clade_not_23 = clade( taxa[2], taxa[3], negative=true )
# create an optional clade constraint
clade_67 = clade( taxa[6], taxa[7] )
clade_68 = clade( taxa[6], taxa[8] )
clade_67_or_68 = clade( clade_67, clade_68, optional_match=true )