padSeqEnds - Pads ragged ends of aligned DNA sequences
padSeqEnds takes a vector of DNA sequences, as character strings,
and appends the ends of each sequence with an appropriate number of
characters to create a sequence vector with uniform lengths.
padSeqEnds(seq, len = NULL, start = FALSE, pad_char = "N", mod3 = TRUE)
- character vector of DNA sequence strings.
- length to pad to. Only applies if longer than the maximum length of
the data in
TRUEpad the beginning of each sequence instead of the end.
- character to use for padding.
TRUEpad sequences to be of length multiple three.
seq vector with padded sequences.
# Default behavior uniformly pads ragged ends seq <- c("CCCCTGGG", "ACCCTG", "CCCC") padSeqEnds(seq)
 "CCCCTGGGN" "ACCCTGNNN" "CCCCNNNNN"
# Pad to fixed length padSeqEnds(seq, len=15)
 "CCCCTGGGNNNNNNN" "ACCCTGNNNNNNNNN" "CCCCNNNNNNNNNNN"
# Add padding to the beginning of the sequences instead of the ends padSeqEnds(seq, start=TRUE)
 "NCCCCTGGG" "NNNACCCTG" "NNNNNCCCC"
padSeqEnds(seq, len=15, start=TRUE)
 "NNNNNNNCCCCTGGG" "NNNNNNNNNACCCTG" "NNNNNNNNNNNCCCC"
See maskSeqEnds for creating uniform masking from existing masking.