Phylogenetics
In the Diversity.Phylogenetics submodule, we generate Phylogenetic diversity measures, based on Faith PD and extended by Chao.
Usage
Using the functionality in the package is simple:
- Create a tree (using our Phylo package)
- Create a PhyloTypes (AbstractTypes subtype) object from it
- Create a Metacommunity from that
- Calculate diversity!
julia> using Phylo, Diversity, Diversity.Phylogenetics julia> species = ["Dog", "Cat", "Human", "Potato"]; julia> community = [4, 1, 3, 2] / 10; julia> nt = rand(Nonultrametric(species)) NamedTree phylogenetic tree with 7 nodes and 6 branches Leaf names: String["Dog", "Cat", "Human", "Potato"] julia> collect(getbranches(nt)) 6-element Array{Pair{Int64,Phylo.Branch{String}},1}: [node "Node 2"]-->[0.43833500493556077 length branch 4]-->[node "Dog"] [node "Node 1"]-->[0.3488621822941236 length branch 2]-->[node "Cat"] [node "Node 2"]-->[0.46822991782974444 length branch 3]-->[node "Potato"] [node "Node 3"]-->[0.6558953328300103 length branch 5]-->[node "Node 1"] [node "Node 3"]-->[0.6667039144666622 length branch 6]-->[node "Node 2"] [node "Node 1"]-->[0.3165255563433085 length branch 1]-->[node "Human"] julia> ph = PhyloTypes(nt); julia> metaphylo = Metacommunity(community, ph); julia> leafnames = gettypenames(metaphylo, true) 4-element Array{String,1}: "Dog" "Cat" "Human" "Potato" julia> meta_gamma(metaphylo, 0) 1×7 DataFrames.DataFrame │ Row │ measure │ q │ type_level │ type_name │ partition_level │ ├─────┼─────────┼───┼────────────┼───────────┼─────────────────┤ │ 1 │ "Gamma" │ 0 │ "types" │ "" │ "metacommunity" │ │ Row │ partition_name │ diversity │ ├─────┼────────────────┼───────────┤ │ 1 │ "" │ 2.72761 │
Diversity.API
Diversity.Ecology
Diversity.Hill
Diversity.Jost
Diversity.individualDiversity
Diversity.metacommunityDiversity
Diversity.subcommunityDiversity
Diversity.API.AbstractMetacommunity
Diversity.API.AbstractPartition
Diversity.API.AbstractTypes
Diversity.DiversityLevel
Diversity.DiversityMeasure
Diversity.Gamma
Diversity.GeneralTypes
Diversity.Metacommunity
Diversity.NormalisedAlpha
Diversity.NormalisedBeta
Diversity.NormalisedRho
Diversity.Onecommunity
Diversity.PowerMeanMeasure
Diversity.RawAlpha
Diversity.RawBeta
Diversity.RawRho
Diversity.RelativeEntropyMeasure
Diversity.Species
Diversity.Subcommunities
Diversity.Taxonomy
Diversity.UniqueTypes
Diversity.API._calcabundance
Diversity.API._calcordinariness
Diversity.API._calcsimilarity
Diversity.API._countsubcommunities
Diversity.API._counttypes
Diversity.API._getabundance
Diversity.API._getmetaabundance
Diversity.API._getmetaordinariness!
Diversity.API._getordinariness!
Diversity.API._getpartition
Diversity.API._getscale
Diversity.API._getsubcommunitynames
Diversity.API._gettypenames
Diversity.API._gettypes
Diversity.API._getweight
Diversity.API.floattypes
Diversity.API.mcmatch
Diversity.API.typematch
Diversity.Ecology.generalisedjaccard
Diversity.Ecology.generalisedrichness
Diversity.Ecology.generalisedshannon
Diversity.Ecology.generalisedsimpson
Diversity.Ecology.jaccard
Diversity.Ecology.richness
Diversity.Ecology.shannon
Diversity.Ecology.simpson
Diversity.Hill.hillnumber
Diversity.Jost.jostalpha
Diversity.Jost.jostbeta
Diversity.calcsimilarity
Diversity.countsubcommunities
Diversity.counttypes
Diversity.diversity
Diversity.getASCIIName
Diversity.getFullName
Diversity.getName
Diversity.getabundance
Diversity.getmetaabundance
Diversity.getmetaordinariness!
Diversity.getordinariness!
Diversity.getpartition
Diversity.getsubcommunitynames
Diversity.gettypenames
Diversity.gettypenames
Diversity.gettypes
Diversity.getweight
Diversity.inddiv
Diversity.metadiv
Diversity.qD
Diversity.qDZ
Diversity.subdiv