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 as a threshold against number of output lineagePath. This plot is intended to give user a feel about how many sitePaths they should expect from the similarity threshold. The number of lineagePath should 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 self-defined maxPath. The zero lineagePath result will also be excluded

### Usage

    similarityMatrix(tree)

    sneakPeek(tree, step = NULL, 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. This is preferably specified. The default is one 50th of the difference between 1 and minimal pairwise sequence similarity.
`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. This is preferably specified. 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.0.3 Index]