plotSingleSite {sitePath}R Documentation

Color the tree by a single site

Description

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 fixationSites, it will color the ancestral tips in red, descendant tips in blue and excluded tips in grey.

For multiFixationSites, it will color the tips which have their site fixed. The color will use the same amino acid color scheme as plotSingleSite.lineagePath

Usage

## S3 method for class 'lineagePath'
plotSingleSite(x, site, showPath = FALSE, showTips = FALSE, ...)

## S3 method for class 'fixationSites'
plotSingleSite(x, site, select = NULL, ...)

## S3 method for class 'multiFixationSites'
plotSingleSite(x, site, select = NULL, ...)

Arguments

x

A fixationSites object from fixationSites or the return from addMSA function.

site

One of the mutations in the fixationSites object. It should be from the names of the object. Or an integer to indicate a site could be provide. The numbering is consistent with the reference defined at fixationSites.

showPath

If plot the lineage result from lineagePath.

showTips

Whether to plot the tip labels. The default is FALSE.

...

Arguments in plot.phylo functions and other arguments.

select

Select which fixation path in to plot. The default is NULL which will plot all the fixations.

Value

The function only makes plot and returns no value (It behaviors like the generic plot function).

See Also

plot.sitePath

Examples

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)
## Not run: 
multiFixations <- multiFixationSites(paths)
plotSingleSite(multiFixations, 1542)

## End(Not run)

[Package sitePath version 1.4.2 Index]