This function takes a DNA or RNA sequence as input and removes any characters that are not A, C, G, T (for DNA) or A, C, G, U (for RNA).
Usage
clean_sequence(sequence, type = "DNA")
Value
A character string containing the cleaned DNA or RNA sequence.
Arguments
sequence
A character string containing the DNA or RNA sequence to be cleaned.
type
A character string indicating the type of sequence. The default is "DNA". If set to "RNA", the function will remove any characters that are not A, C, G, U.