Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
daijiang committed Jun 19, 2024
1 parent f3c492f commit dde5733
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 8 deletions.
5 changes: 4 additions & 1 deletion R/get_tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ get_tree = function(sp_list, tree, taxon = NULL,
if(missing(tree) & !is.null(taxon)){# pick default tree
if(taxon == "plant") tree = megatrees::tree_plant_otl
if(taxon == "bird") tree = megatrees::tree_bird_n100
if(taxon == "butterfly") tree = megatrees::tree_butterfly
if(taxon == "butterfly") {
warning("Classification of butterfly is not complete; it will work better if you can prepare the family information for your species.")
tree = megatrees::tree_butterfly
}
if(taxon == "amphibian") tree = megatrees::tree_amphibian_n100
if(taxon == "reptile") tree = megatrees::tree_reptile_n100
if(taxon == "shark_ray") tree = megatrees::tree_shark_ray_n100
Expand Down
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ Currently, `rtrees` provides mega-trees for the following taxonomic groups: amph
| Taxon | # of species | # of trees | R object (in `{megatrees}`) | Reference |
|--------------------------|--------------|------------|------------------------------|----------------------|
| Amphibian | 7238 | 100 | `tree_amphibian_n100` | Jetz and Pyron 2018 |
| Bee | 4651 | 1 | `tree_bee` | Henríquez-Piskulich et al. 2023 |
| | 4651 | 100 | `tree_bee_n100` | Henríquez-Piskulich et al. 2023 |
| Bee | 4651 | 1 | `tree_bee` | Henríquez-Piskulich et al. 2023 |
| | 4651 | 100 | `tree_bee_n100` | Henríquez-Piskulich et al. 2023 |
| Butterfly | 2244 | 1 | `tree_butterfly` | Kawahara et al. 2023 |
| Bird | 9993 | 100 | `tree_bird_n100` | Jetz et al. 2012 |
| Fish | 11638 | 1 | `tree_fish_12k` | Rabosky et al. 2018 |
| | 31516 | 50 | `tree_fish_32k_n50` | Rabosky et al. 2018 |
Expand Down
104 changes: 99 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ reduce the package size) are saved in the data package
| Amphibian | 7238 | 100 | `tree_amphibian_n100` | Jetz and Pyron 2018 |
| Bee | 4651 | 1 | `tree_bee` | Henríquez-Piskulich et al. 2023 |
| | 4651 | 100 | `tree_bee_n100` | Henríquez-Piskulich et al. 2023 |
| Butterfly | 2244 | 1 | `tree_butterfly` | Kawahara et al. 2023 |
| Bird | 9993 | 100 | `tree_bird_n100` | Jetz et al. 2012 |
| Fish | 11638 | 1 | `tree_fish_12k` | Rabosky et al. 2018 |
| | 31516 | 50 | `tree_fish_32k_n50` | Rabosky et al. 2018 |
Expand All @@ -52,6 +53,7 @@ reduce the package size) are saved in the data package

``` r
library(rtrees)
#> Warning: package 'rtrees' was built under R version 4.3.3
library(ape)
```

Expand Down Expand Up @@ -104,11 +106,11 @@ phylogeny).
``` r
sp_list_df(sp_list = c("Periophthalmus_barbarus", "Barathronus_bicolor"),
taxon = "fish")
#> # A tibble: 2 × 4
#> species genus family Family
#> <chr> <chr> <chr> <chr>
#> 1 Periophthalmus_barbarus Periophthalmus Gobiidae <NA>
#> 2 Barathronus_bicolor Barathronus Aphyonidae <NA>
#> # A tibble: 2 × 3
#> species genus family
#> <chr> <chr> <chr>
#> 1 Periophthalmus_barbarus Periophthalmus Gobiidae
#> 2 Barathronus_bicolor Barathronus Aphyonidae
```

## Get phylogeny from one megatree
Expand Down Expand Up @@ -202,6 +204,52 @@ plot(get_tree(sp_list = test_tree_sp, tree = test_tree, taxon = "plant",
#> by adding root information for genus and family that can be found in the phylogeny or species list but
#> we recommend to prepare the phylogeny using `add_root_info()` with a classification
#> data frame with all tips first.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#>
#> 5 species added at genus level (*)
#> 1 species added at family level (**)
Expand Down Expand Up @@ -243,6 +291,52 @@ plot(get_tree(sp_list = test_tree_sp_df, tree = test_tree, taxon = "plant",
#> by adding root information for genus and family that can be found in the phylogeny or species list but
#> we recommend to prepare the phylogeny using `add_root_info()` with a classification
#> data frame with all tips first.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#> ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
#>
#> 5 species added at genus level (*)
#> 1 species added at family level (**)
Expand Down

0 comments on commit dde5733

Please sign in to comment.