Coerces all sequences in a DNAbin object to the same length.
blockAlignment(DNAbin, mode = "shortest", range = NULL, fill = "")
A DNAbin object in matrix format.
An object of class DNAbin
Character vector. Options of "shortest" or "longest"
Numeric vector of length 2. Index of the bases where the new alignment should begin and end
Character to fill the extra bases in short sequences. Default of "" (blank). Recommend that only "-" (gap) or "?" be used
Samuel Brown <s_d_j_brown@hotmail.com>
When mode = "shortest"
, the alignment is truncated at the length of
the shortest sequence. When mode = "longest"
, the alignment is
extended to the end of the longest sequence, with shorter sequences filled
in with "fill"
s.
data(salticidae)
salticidae
blockAlignment(salticidae)
blockAlignment(salticidae, mode = "longest")
blockAlignment(salticidae, mode = NULL, range = c(200, 600))
graphics::image(blockAlignment(salticidae))
graphics::image(blockAlignment(salticidae, mode = "longest"))
graphics::image(blockAlignment(salticidae, mode = NULL, range = c(200, 600)))
Run the code above in your browser using DataLab