Filters phosphosite data to keep only rows where the central residue of the SequenceWindow matches the reported modified amino acid (modAA).
Usage
validate_sequence_window(
data,
seq_col = "SequenceWindow",
mod_col = "modAA",
center_pos = 8L
)Details
Sequence windows should be centered on the modified residue. This function validates that the character at the center position matches the reported modification site. Both are converted to uppercase for comparison.
Examples
data <- data.frame(
SequenceWindow = c("AAASAAAA", "BBBSBBB", "CCCACCC"),
modAA = c("S", "S", "S")
)
validate_sequence_window(data)
#> [1] SequenceWindow modAA
#> <0 rows> (or 0-length row.names)
# Only first two rows kept (center matches S)