| align-utils {Biostrings} | R Documentation |
A variety of different functions used to deal with sequence alignments.
consmat(x, freq=TRUE)
x |
A character vector, or an instance of either the BStringView, or the XStringAlign classes. |
freq |
If TRUE then letter frequencies (per position) are reported,
otherwise counts.
|
consmat computes a consensus matrix for a set of equal-length strings
assumed to be aligned.
XStringViews-class, XStringAlign
file <- system.file("extdata", "someORF.fa", package="Biostrings")
orf <- read.DNAStringSet(file, "fasta")
## To illustrate, the following example assumes the ORF data
## to be aligned for the first 10 positions (patently false):
orf10 <- DNAStringSet(orf, end=10)
consmat(orf10)
## For the character matrix containing the "exploded" representation
## of the views, do:
as.matrix(orf10, mode="character")