extractTips: Extract grouped tips for a single site

View source: R/extractTips.R

extractTipsR 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 'sitesMinEntropy'
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)

wuaipinglab/sitePath documentation built on Sept. 26, 2022, 10:16 p.m.