JSDtree: Jensen-Shannon distance between phylogenies

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/JSDtree.R

Description

Computes the Jensen-Shannon distance metric between spectral density profiles of phylogenies.

Usage

1
JSDtree(phylo,meth=c("standard"))

Arguments

phylo

a list of objects of type 'phylo' (see ape documentation)

meth

the method used to compute the spectral density, which can either be "standard", "normal1", or "normal2". if set to "normal1", computes the spectral density normalized to the degree matrix. if set to "normal2", computes the spectral density normalized to the number of eigenvalues. if set to "standard", computes the unnormalized version of the spectral density (see the associated paper for an explanation)

Value

a matrix providing the Jensen-Shannon distance values between phylogeny pairs

Author(s)

E Lewitus

References

Lewitus, E., Morlon, H., Characterizing and comparing phylogenies from their Laplacian spectrum, bioRxiv doi: http://dx.doi.org/10.1101/026476

See Also

JSDtree_cluster, spectR, BICompare

Examples

1
2
trees<-TESS::tess.sim.age(n=20,age=10,0.15,0.05,MRCA=TRUE)
JSDtree(trees)

Example output

Loading required package: picante
Loading required package: ape
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: nlme
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
          1        2        3        4        5        6        7        8
1  0.000000 1.051373 1.924729 1.729564 4.114782 1.169902 3.088518 1.607905
2  1.051373 0.000000 1.612459 1.420286 4.230491 1.295958 3.252071 1.869573
3  1.924729 1.612459 0.000000 1.253438 4.501323 1.966668 3.616961 2.435710
4  1.729564 1.420286 1.253438 0.000000 4.347518 1.626183 3.445931 2.177479
5  4.114782 4.230491 4.501323 4.347518 0.000000 4.051541 2.764776 3.796651
6  1.169902 1.295958 1.966668 1.626183 4.051541 0.000000 3.042536 1.449548
7  3.088518 3.252071 3.616961 3.445931 2.764776 3.042536 0.000000 2.676587
8  1.607905 1.869573 2.435710 2.177479 3.796651 1.449548 2.676587 0.000000
9  2.502257 2.685667 3.100962 2.884580 3.271572 2.398232 1.910649 1.928559
10 1.618713 1.583083 1.969629 1.535600 4.075716 1.150130 3.123914 1.696674
11 3.780357 3.921385 4.236549 4.108500 2.456146 3.774785 2.305614 3.487878
12 2.150088 2.366577 2.839034 2.615009 3.510412 2.053327 2.246084 1.459073
13 2.650522 2.838752 3.251039 3.062938 3.165609 2.598516 1.587749 2.157289
14 4.114782 4.230491 4.501323 4.347518 0.000000 4.051541 2.764776 3.796651
15 2.454497 2.631684 3.043281 2.814195 3.320863 2.323991 2.044876 1.856105
16 3.772331 3.913475 4.229020 4.099809 2.436116 3.765278 2.283884 3.477325
17 2.383245 2.604116 3.062252 2.906486 3.470047 2.420113 2.099229 1.978905
18 3.610689 3.746836 4.059301 3.896446 2.009103 3.552920 1.901407 3.251152
19 3.701265 3.842632 4.160383 4.019560 2.246587 3.678453 2.084157 3.381706
20 2.958453 2.765897 2.247830 2.489174 5.002077 2.967703 4.247542 3.302043
           9       10       11       12       13       14        15       16
1  2.5022573 1.618713 3.780357 2.150088 2.650522 4.114782 2.4544965 3.772331
2  2.6856671 1.583083 3.921385 2.366577 2.838752 4.230491 2.6316839 3.913475
3  3.1009619 1.969629 4.236549 2.839034 3.251039 4.501323 3.0432812 4.229020
4  2.8845802 1.535600 4.108500 2.615009 3.062938 4.347518 2.8141952 4.099809
5  3.2715717 4.075716 2.456146 3.510412 3.165609 0.000000 3.3208629 2.436116
6  2.3982317 1.150130 3.774785 2.053327 2.598516 4.051541 2.3239907 3.765278
7  1.9106490 3.123914 2.305614 2.246084 1.587749 2.764776 2.0448755 2.283884
8  1.9285595 1.696674 3.487878 1.459073 2.157289 3.796651 1.8561053 3.477325
9  0.0000000 2.477181 2.985540 1.285388 1.209764 3.271572 0.7820788 2.970134
10 2.4771810 0.000000 3.860028 2.188382 2.705716 4.075716 2.3840574 3.849622
11 2.9855404 3.860028 0.000000 3.182925 2.758260 2.456146 3.0772816 0.367001
12 1.2853881 2.188382 3.182925 0.000000 1.596894 3.510412 1.2498881 3.170393
13 1.2097645 2.705716 2.758260 1.596894 0.000000 3.165609 1.4405119 2.743051
14 3.2715717 4.075716 2.456146 3.510412 3.165609 0.000000 3.3208629 2.436116
15 0.7820788 2.384057 3.077282 1.249888 1.440512 3.320863 0.0000000 3.061911
16 2.9701343 3.849622 0.367001 3.170393 2.743051 2.436116 3.0619105 0.000000
17 1.7295825 2.605828 2.943018 1.599233 1.537237 3.470047 1.8475145 2.933883
18 2.6230587 3.599285 2.009802 2.906739 2.459076 2.009103 2.6987473 1.976048
19 2.8267296 3.752467 1.210322 3.056674 2.607113 2.246587 2.9172965 1.153348
20 3.8087694 2.907693 4.790993 3.607635 3.942742 5.002077 3.7548303 4.784204
         17       18       19       20
1  2.383245 3.610689 3.701265 2.958453
2  2.604116 3.746836 3.842632 2.765897
3  3.062252 4.059301 4.160383 2.247830
4  2.906486 3.896446 4.019560 2.489174
5  3.470047 2.009103 2.246587 5.002077
6  2.420113 3.552920 3.678453 2.967703
7  2.099229 1.901407 2.084157 4.247542
8  1.978905 3.251152 3.381706 3.302043
9  1.729582 2.623059 2.826730 3.808769
10 2.605828 3.599285 3.752467 2.907693
11 2.943018 2.009802 1.210322 4.790993
12 1.599233 2.906739 3.056674 3.607635
13 1.537237 2.459076 2.607113 3.942742
14 3.470047 2.009103 2.246587 5.002077
15 1.847515 2.698747 2.917296 3.754830
16 2.933883 1.976048 1.153348 4.784204
17 0.000000 2.830711 2.861842 3.796994
18 2.830711 0.000000 1.604814 4.620398
19 2.861842 1.604814 0.000000 4.721161
20 3.796994 4.620398 4.721161 0.000000

RPANDA documentation built on Nov. 10, 2021, 9:08 a.m.