annotatePeptides: Annotate peptides with protein ids

Description Usage Arguments Value Examples

View source: R/annotatePeptides.R

Description

peptides which do not have protein assignment drop out

Usage

1
2
3
4
5
6
7
annotatePeptides(
  pepinfo,
  fasta,
  peptide = "peptideSeq",
  prefix = "(([RK])|(^)|(^M))",
  suffix = ""
)

Arguments

pepinfo

- list of peptides - sequence, optional modified sequence, charge state.

fasta

- object as created by readPeptideFasta

peptide

- name of column containing peptide sequences default "peptideSeq"

prefix

- default "(([RK])|(^)|(^M))"

suffix

- default ""

Value

data.frame with columns "peptideSeq", "proteinID","Offset","proteinSequence","matched", "lengthPeptide","proteinlength"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(dplyr)

file = system.file("extdata/IDResults.txt.gz" , package = "prozor")
specMeta <- readr::read_tsv(file)
upeptide <- unique(specMeta$peptideSeq)
resCan <-
   prozor::readPeptideFasta(
       system.file("p1000_db1_example/Annotation_canSeq.fasta.gz" , package = "prozor"))

annotAll = prozor::annotatePeptides(upeptide[seq_len(20)], resCan)
dim(annotAll)

res <-  mutate(annotAll, proteinlength = nchar(proteinSequence))
res <-  select(res, proteinID, peptideSeq, proteinlength, Offset, lengthPeptide)
head(res)

prozor documentation built on Dec. 11, 2021, 9:51 a.m.