map_PTM_sites: PTM Mapping Utilities

Description Usage Arguments Examples

View source: R/handling_PTMs.R

Description

Mapping of PTM location from peptide to fasta file.

Usage

1
map_PTM_sites(ids, fasta, prot_id_col, peptide_col, mod_char)

Arguments

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 "*".

Examples

 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", "*")

vladpetyuk/vp.misc documentation built on June 25, 2021, 6:35 a.m.