View source: R/seq_summarize_operations.R
seq_consensus | R Documentation |
Find a consensus sequence for a set of sequences.
seq_consensus(x, method = "chr_majority", weights = NULL, gaps = TRUE)
x |
a DNA, RNA or AA vector. |
method |
the consensus method (see Details). |
weights |
an optional numeric vector of same length
as |
gaps |
logical. Should the gaps ("-") taken into account. |
"chr_majority", "chr_ambiguity", "seq_centrality", "seq_majority"
For chr_ambiguity gap character always override other characters. Use gaps = FALSE to ignore gaps.
A consensus sequence
Other aggregation operations:
seq_cluster()
x <- c("-----TACGCAGTAAAAGCTACTGATG", "CGTCATACGCAGTAAAAACTACTGATG", "CTTCATACGCAGTAAAAACTACTGATG", "CTTCATATGCAGTAAAAACTACTGATG", "CTTCATACGCAGTAAAAACTACTGATG", "CGTCATACGCAGTAAAAGCTACTGATG", "CTTCATATGCAGTAAAAGCTACTGACG") x <- dna(x) seq_consensus(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.