Description Usage Arguments Value See Also Examples
View source: R/plotSingleSite.R
Plot and color the tree according to amino acid/nucleotide of
the selected site. The color scheme depends on the seqType
set in
addMSA
function.
For lineagePath
, the tree will be colored
according to the amino acid of the site. The color scheme tries to assign
distinguishable color for each amino acid.
For parallelSites
, the tree will be colored
according to the amino acid of the site if the mutation is not fixed.
For fixationSites
, it will color the ancestral
tips in red, descendant tips in blue and excluded tips in grey.
1 2 3 4 5 6 7 8 9 10 | plotSingleSite(x, site, ...)
## S3 method for class 'lineagePath'
plotSingleSite(x, site, showPath = TRUE, showTips = FALSE, ...)
## S3 method for class 'parallelSites'
plotSingleSite(x, site, showPath = TRUE, ...)
## S3 method for class 'fixationSites'
plotSingleSite(x, site, select = NULL, ...)
|
x |
The object to plot. |
site |
For |
... |
Other arguments. Since 1.5.4, the function uses
|
showPath |
If plot the lineage result from |
showTips |
Whether to plot the tip labels. The default is |
select |
Select which fixation path in to plot. The default is NULL which will plot all the fixations. |
Since 1.5.4, the function returns a ggplot object so on longer
behaviors like the generic plot
function.
1 2 3 4 5 6 7 | data(zikv_tree)
data(zikv_align)
tree <- addMSA(zikv_tree, alignment = zikv_align)
paths <- lineagePath(tree)
plotSingleSite(paths, 139)
fixations <- fixationSites(paths)
plotSingleSite(fixations, 139)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.