View source: R/plot_functions.R
| rotl_pq | R Documentation |
Make a taxonomic tree using the ASV names of a physeq object and the Open Tree of Life tree.
rotl_pq(
physeq,
taxonomic_rank = c("Genus", "Species"),
context_name = "All life",
discard_genus_alone = TRUE,
pattern_to_remove_tip = c("ott\\d+|_ott\\d+"),
pattern_to_remove_node = c("_ott.*|mrca*")
)
physeq |
(required) a |
taxonomic_rank |
(Character) The column(s) present in the @tax_table slot of the phyloseq object. Can be a vector of two columns (e.g. the default c("Genus", "Species")). If only one column is set it need to be format in this way ("Genus species" for ex. "Quercus robur") with a space. |
context_name |
: can bue used to select only a part of the Open Tree
of Life. See |
discard_genus_alone |
(logical) If TRUE (default), genus without information at the species level are discarded. |
pattern_to_remove_tip |
(character regex string) A regex to remove unwanted part of tip names. If set to null, tip names are left intact. |
pattern_to_remove_node |
(character regex string) A regex to remove unwanted part of node names. If set to null, node names are left intact. |
This function is mainly a wrapper of the work of others.
Please make a reference to rotl package if you
use this function.
A plot
Adrien Taudière
## Not run:
if (requireNamespace("rotl")) {
tr <- rotl_pq(data_fungi_mini, pattern_to_remove_tip = NULL)
plot(tr)
tr_Asco <- rotl_pq(data_fungi,
taxonomic_rank = c("Genus", "Species"),
context_name = "Ascomycetes"
)
plot(tr_Asco)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.