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")
- 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.
seq vector with padded sequences.
# Default behavior uniformly pads ragged ends seq <- c("CCCCTGGG", "ACCCTG", "CCCC") padSeqEnds(seq)
 "CCCCTGGG" "ACCCTGNN" "CCCCNNNN"
# 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)
 "CCCCTGGG" "NNACCCTG" "NNNNCCCC"
padSeqEnds(seq, len=15, start=TRUE)
 "NNNNNNNCCCCTGGG" "NNNNNNNNNACCCTG" "NNNNNNNNNNNCCCC"
See maskSeqEnds for creating uniform masking from existing masking.