extractTips {sitePath} | R Documentation

## Extract info for fixation of a single site

### Description

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

The function `extractSite` can be used to extract the fixation info of a single site.

### Usage

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

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

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

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

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

### Arguments

`x` | A `fixationSites` or a `multiFixationSites` or a `sitePath` object.
`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.
`...` | Other arguments

### Value

The function `extractTips` returns the name of the tips involved in the fixation.

The function `extractSite` returns a `sitePath` object

### 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)
    extractSite(mutations, 139)

[Package sitePath version 1.3.1 Index]