The position of the given peptide sequence is searched within the given protein sequence. In addition the last amino acid of the peptide and the amino acid right before are reported.

find_peptide(data, protein_sequence, peptide_sequence)

Arguments

data

a data frame that contains at least the protein and peptide sequence.

protein_sequence

a character column in the data data frame that contains the protein sequence.

peptide_sequence

a character column in the data data frame that contains the peptide sequence.

Value

A data frame that contains the input data and four additional columns with peptide start and end position, the last amino acid and the amino acid before the peptide.

Examples

# Create example data
data <- data.frame(
  protein_sequence = c("abcdefg"),
  peptide_sequence = c("cde")
)

# Find peptide
find_peptide(
  data = data,
  protein_sequence = protein_sequence,
  peptide_sequence = peptide_sequence
)
#>   protein_sequence peptide_sequence start end aa_before last_aa aa_after
#> 1          abcdefg              cde     3   5         b       e        f