Checks if a given amino acid is at a given position
is.at(at, target, aa = 'M', uniprot = TRUE)
at the position in the primary structure of the protein.
target a character string specifying the UniProt ID of the protein of interest or, alternatively, the sequence of that protein.
aa the amino acid of interst.
uniprot logical, if TRUE the argument ‘target’ shoud be an ID.
Returns a boolean. Either the residue is present at that position or not.
The ptm package offers a set of ancillary functions aimed to carry out rutinary work, which may be needed when more elaborated analysis are required. Among these ancillary function are:
Sometimes it may be convinient to check if the reside found at a given position is the one we expect, then we resort to the function is.at().
For instance when checking for data quality control in MetOSite (a database for methionine oxidation), we want to make sure that the annotation of the MetO site (at which position we find a sulfoxidized methionine) corresponds to a methionine residue in the original protein sequence. For example, if we query MetOSite for cytochrome c (P00004), we will find that Met80 is oxidized:
##  "80"
Now, let’s chekc that certainly we find methionine at position 80 in the protein sequence:
is.at(at = 80, target = get.seq('P00004', db = 'metosite'), uniprot = FALSE)
##  TRUE
Note, that we have passed a string (the sequence of the mature cytochrome c) to the argument target:
get.seq('P00004', db = 'metosite')
##  "GDVEKGKKIFVQKCAQCHTVEKGGKHKTGPNLHGLFGRKTGQAPGFTYTDANKNKGITWKEETLMEYLENPKKYIPGTKMIFAGIKKKTEREDLIAYLKKATNE"
Also, you may have noted that we didn’t pass any value to the argument aa, that is because its value by default is ‘M’.