View source: R/plot_orthotree.R
plot_orthotree | R Documentation |
Automatically creates a phylogenetic tree plot annotated with metadata
describing how many orthologous genes each species shares with the
reference_species
("human" by default).
plot_orthotree(
tree = NULL,
orth_report = NULL,
species = NULL,
method = c("babelgene", "homologene", "gprofiler"),
tree_source = "timetree",
non121_strategy = "drop_both_species",
reference_species = "human",
clades = list(Primates = c("Homo sapiens", "Macaca mulatta"), Eutherians =
c("Homo sapiens", "Mus musculus", "Bos taurus"), Mammals = c("Homo sapiens",
"Mus musculus", "Bos taurus", "Ornithorhynchus anatinus", "Monodelphis domestica"),
Tetrapods = c("Homo sapiens", "Mus musculus", "Gallus gallus", "Anolis carolinensis",
"Xenopus tropicalis"), Vertebrates = c("Homo sapiens", "Mus musculus",
"Gallus gallus", "Anolis carolinensis", "Xenopus tropicalis", "Danio rerio"),
Invertebrates = c("Drosophila melanogaster",
"Caenorhabditis elegans")),
clades_rotate = list(),
scaling_factor = NULL,
show_plot = TRUE,
save_paths = c(tempfile(fileext = ".ggtree.pdf"), tempfile(fileext = ".ggtree.png")),
width = 15,
height = width,
mc.cores = 1,
verbose = TRUE
)
tree |
A phylogenetic tree of class phylo. If no tree
is provided ( |
orth_report |
An ortholog report from one or more species generated by report_orthologs. |
species |
Species to include in the final plot.
If |
method |
R package to use for gene mapping:
|
tree_source |
Can be one of the following:
|
non121_strategy |
How to handle genes that don't have
1:1 mappings between
|
reference_species |
Reference species. |
clades |
A named list of clades each containing a character vector of species used to define the respective clade using MRCA. |
clades_rotate |
A list of clades to rotate (via rotate), each containing a character vector of species used to define the respective clade using MRCA. |
scaling_factor |
How much to scale y-axis parameters (e.g. offset) by. |
show_plot |
Whether to print the final tree plot. |
save_paths |
Paths to save plot to. |
width |
Saved plot width. |
height |
Saved plot height. |
mc.cores |
Number of cores to parallelise different steps with. |
verbose |
Print messages. |
A list containing:
plot : Annotated ggtree object.
tree : The pruned, standardised phylogenetic tree used in the plot.
orth_report : Ortholog reports for each species
against
the reference_species
.
metadata : Metadata used in the plot, including silhouette PNG ids from phylopic.
clades : Metadata used for highlighting clades.
method : method
used.
reference_species : reference_species
used.
save_paths : save_paths
to plot.
orthotree <- plot_orthotree(species = c("human","monkey","mouse"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.