Extract, replace, reorder MSA
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.
## S3 method for class 'msa' x[rows, cols, pointer.only]
An object of type
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
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
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
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)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.