A tales object plus an alignment_position column. Gaps
are implicit: a gap is simply the absence of a row at that
(array_id, alignment_position).
Arguments
- x
A data frame with the
talescolumns plusalignment_position.- alignment_width
Integer alignment width; defaults to
max(alignment_position).- dom_code_namespace
Optional scalar string, see
tales_namespace.
Details
Normally produced by tales_align rather than called directly.
See also
Other TALE alignment:
as.matrix.tales_msa(),
is_tales_msa(),
tales_align(),
tales_consensus(),
tales_consensus_match(),
tales_msa_params(),
tales_msa_width(),
validate_tales_msa()
Examples
# A hand-built alignment: A2 has a gap at position 2 relative to A1.
aligned <- data.frame(
array_id = c("A1", "A1", "A1", "A2", "A2"),
position_in_array = c(1L, 2L, 3L, 1L, 2L),
alignment_position = c(1L, 2L, 3L, 1L, 3L),
rvd = c("NTERM", "HD", "CTERM", "NTERM", "CTERM")
)
msa <- tales_msa(aligned)
tales_msa_width(msa)
#> [1] 3
as.matrix(msa)
#> 1 2 3
#> A1 "NTERM" "HD" "CTERM"
#> A2 "NTERM" NA "CTERM"