pre-assessment {sitePath}R Documentation

Things can be done before the analysis

Description

similarityMatrix calculates similarity between aligned sequences The similarity matrix can be used in groupTips or lineagePath

sneakPeek is intended to plot 'similarity' (actually the least percentage of 'major SNP') as a threshold against number of output lineagePath. This plot is intended to give user a rought view about how many lineages they could expect from the 'similarity' threshold in the function lineagePath. The number of lineagePath is preferably not be too many or too few. The result excludes where the number of lineagePath is greater than number of tips divided by 20 or user-defined maxPath. The zero lineagePath result will also be excluded.

Usage

similarityMatrix(tree)

sneakPeek(tree, step = 10, maxPath = NULL, minPath = 1, makePlot = FALSE)

Arguments

tree

The return from addMSA function

step

the 'similarity' window for calculating and ploting. To better see the impact of threshold on path number. The default is 10.

maxPath

maximum number of path to return show in the plot. The number of path in the raw tree can be far greater than trimmed tree. To better see the impact of threshold on path number. This is preferably specified. The default is one 20th of tree tip number.

minPath

minimum number of path to return show in the plot. To better see the impact of threshold on path number. The default is 1.

makePlot

whether make a dot plot when return

Value

similarityMatrix returns a diagonal matrix of similarity between sequences

sneakPeek return the similarity threhold against number of lineagePath. There will be a simple dot plot between threshold and path number if makePlot is TRUE.

Examples

data('zikv_tree')
data('zikv_align')
tree <- addMSA(zikv_tree, alignment = zikv_align)
simMatrix <- similarityMatrix(tree)
sneakPeek(tree)

[Package sitePath version 1.4.2 Index]