Description Usage Arguments Examples
View source: R/handling_PTMs.R
Mapping of PTM location from peptide to fasta file.
1  | map_PTM_sites(ids, fasta, prot_id_col, peptide_col, mod_char)
 | 
ids | 
 data.frame object. Must have column containing protein IDs that match names in the provided FASTA file. The other column is peptide IDs containing flanking AAs in the form X.X...X.X  | 
fasta | 
 AAStringSet object. Names must match protein IDs in the corresponding column of the 'ids' object  | 
prot_id_col | 
 character. Name of the column with protein IDs in the 'ids' object.  | 
peptide_col | 
 character. Name of the column with peptides in the 'ids' object.  | 
mod_char | 
 character. Character denoting mapped PTM in peptides. Typically "*".  | 
1 2 3 4 5 6 7 8 9 10 11 12 13  | fasta_file_name <- system.file("extdata/FASTAs", 
                               "rattus_norvegics_uniprot_2018_09.fasta.gz", 
                               package = "vp.misc")
library(Biostrings)
# FASTA
fst <- readAAStringSet(fasta_file_name, format="fasta", 
                       nrec=-1L, skip=0L, use.names=TRUE)
# extracting UniProt Accessions
names(fst) <- sub("^.*\\|(.*)\\|.*$","\\1",names(fst))
data(phospho_identifications_rat)
ids_with_sites <- map_PTM_sites(ids, fst, "UniProtAccFull", "Peptide", "*")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.