View source: R/sequence_matching_functions.R
convert_to_regex_pattern | R Documentation |
This function converts a peptide sequence into a regular expression pattern that accounts for ambiguous amino acids. Each amino acid is replaced by a character class that includes itself, 'X', and any specific ambiguities.
convert_to_regex_pattern(peptide)
peptide |
A character string representing the peptide sequence. |
A character string containing the regex pattern for matching.
# Convert a peptide sequence to a regex pattern
peptide <- "NDEQIL"
regex_pattern <- convert_to_regex_pattern(peptide)
print(regex_pattern) # Output: "[NBX][DBX][EZX][QZX][ILX][ILX]"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.