extractTips {sitePath} | R Documentation

## Extract grouped tips for a single site

### Description

The result of `fixationSites` and `sitePath` contains all the possible sites with fixation mutation. The function `extractTips` retrieves the name of the tips involved in the fixation.

For `lineagePath`, the function `extractTips` groups all the tree tips according to the amino acid/nucleotide of the `site`.

For `parallelSites` and `sitePara` object, the function `extractTips` retrieve all the tips with parallel mutation.

### Usage

    extractTips(x, ...)

    ## S3 method for class 'lineagePath'
    extractTips(x, site, ...)

    ## S3 method for class 'fixationSites'
    extractTips(x, site, select = 1, ...)

    ## S3 method for class 'sitePath'
    extractTips(x, select = 1, ...)

    ## S3 method for class 'parallelSites'
    extractTips(x, site, ...)

    ## S3 method for class 'sitePara'
    extractTips(x, ...)

### Arguments

`x` | A `fixationSites` or a `sitePath` object.
`...` | Other arguments
`site` | A site predicted to experience fixation.
`select` | For a site, there theoretically might be more than one fixation on different lineages. You may use this argument to extract for a specific fixation of a site. The default is the first fixation of the site.

### Value

Tree tips grouped as `list`

### Examples

    data(zikv_tree_reduced)
    data(zikv_align_reduced)
    tree <- addMSA(zikv_tree_reduced, alignment = zikv_align_reduced)
    mutations <- fixationSites(lineagePath(tree))
    extractTips(mutations, 139)

[Package sitePath version 1.8.4 Index]