consensus {seqmagick} | R Documentation |
consensus
Description
consensus of aligned sequences
consensus of aligned sequences
Usage
consensus(x, type = "DNA")
bs_consensus(x, type = "DNA", r = 1)
Arguments
x |
BStringSet object |
type |
currently, only DNA supported |
r |
if any NT > r, it will be selected as representative base |
Value
consensus sequence string
consensus sequence string
Author(s)
Guangchuang Yu
Examples
## Not run:
fa_file <- system.file("extdata/HA.fas", package="seqmagick")
x <- fa_read(fa_file)
## align first 5 sequences, use `bs_aln(x)` to align all sequences
aln <- bs_aln(x[1:5])
## or bs_consensus(aln)
consensus(aln)
## End(Not run)
[Package seqmagick version 0.1.7 Index]