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,
      reference = NULL, gapChar = "-", ...)

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

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

### 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.
`reference` | Name of reference for site numbering. The name has to be one of the sequences' name. The default uses the intrinsic alignment numbering.
`gapChar` | The character to indicate gap. The numbering will skip the gapChar for the reference sequence.
`...` | Arguments in `plot.phylo` functions and other arguments.

### Value

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

### Examples

    data("zikv_tree")
    data("zikv_align")
    tree <- addMSA(zikv_tree, alignment = zikv_align)
    paths <- lineagePath(tree, 0.996)
    plotSingleSite(paths, 139)
    ## Not run:
    fixations <- fixationSites(paths)
    plotSingleSite(fixations, 139)

    ## End(Not run)
    ## Not run:
    multiFixations <- multiFixationSites(paths)
    plotSingleSite(multiFixations, 1542)

    ## End(Not run)

[Package sitePath version 1.0.3 Index]