R: Find the Consensus Sequence

find.consensus {phyclust} | R Documentation

## Find the Consensus Sequence

### Description

Based on the input data, this function will search all data along all sites to find a consensus sequence which may be or may not be one of the data.

### Usage

    find.consensus(X, code.type = .code.type[1], with.gap = FALSE)

### Arguments

`X` | nid/sid matrix with N rows/sequences and L columns/sites.
`code.type` | either "NUCLEOTIDE" (default) or "SNP".
`with.gap` | FALSE (default) for no gap in consensus sequence.

### Details

`X` should be a numerical matrix containing sequence data that can be transfered by `code2nid` or `code2sid`.

### Value

A vector containing the consensus sequence with length L will be returned.

### Author(s)

Wei-Chen Chen wccsnow@gmail.com

### References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

### See Also

`plotdots`.

### Examples

    ## Not run:
    library(phyclust, quiet = TRUE)

    find.consensus(seq.data.toy$org)

    ## End(Not run)

[Package phyclust version 0.1-30 Index]