validate_seq {bioseq} | R Documentation |
Sequence validator
Description
Validate character strings before sequence construction.
Usage
validate_seq(x, alphabet, invalid_replacement, type = "DNA")
Arguments
x |
a character vector. |
alphabet |
a character vector defining the sequence alphabet; |
invalid_replacement |
a character to replace non valid characters |
type |
type of sequence ("DNA", "RNA", "AA"). It is only used to provide more informative warning messages. |
Details
Validation steps:
Check that
x
is a character vector, fails if not.Force alpha characters to uppercase
Delete blank characters (spaces and tabs)
Delete line breaks
Converts . (dots) to - (as both can represent a gap)
Replace invalid characters with N/X (with a warning).
Value
A character vector.
[Package bioseq version 0.1.4 Index]