Description Usage Arguments Details Note Author(s) See Also Examples
Treat multiple sequence alignment as a matrix where each row corresponds to a sequence for one species, and each column is one position aligned across all species.
1 2 | ## S3 method for class 'msa'
x[rows, cols, pointer.only]
|
x |
An object of type |
rows |
A numeric vector of sequence indices,
character vector (containing sequence name), or
logical vector (containing sequences to keep). If logical vector it
will be recycled as necessary to the same length as |
cols |
A numeric vector of alignment columns, or a logical vector
containing columns to keep. If logical vector it will be recycled as
necessary to the same length as |
pointer.only |
If |
The bracket notation can return a subset of the alignment, or re-order rows and columns.
This function will not alter the value of x even if it is stored as a pointer to a C structure.
Melissa J. Hubisz and Adam Siepel
sub.msa
which can subset columns based on genomic
coordinates, and extract.feature.msa
which can subset based
on genomic coordinates denoted in a features object.
1 2 3 4 5 6 7 | m <- msa(seqs=c("ACGTAT", "AGGTAA", "AGGTAG"),
names=c("human", "mouse", "rat"))
print(m[c("rat", "rat", "human"), ], print.seq=TRUE)
print(m[c(3,3,1),], print.seq=TRUE)
print(m[c(TRUE, FALSE, TRUE),], print.seq=TRUE)
print(m[TRUE,], print.seq=TRUE)
print("[.msa"(m, "mouse",c(1,6,3,5)), print.seq=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.