annotateAHO: annotate peptides using AhoCorasickTrie

Description Usage Arguments Value Examples

View source: R/annotatePeptides.R

Description

peptides which do not have protein assignment drop out

Usage

1
annotateAHO(pepseq, fasta)

Arguments

pepseq

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

fasta

- object as created by readPeptideFasta

Value

A data.frame with proteinID, peptideSeq, Offset and proteinSequence

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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"))
resCanU <- resCan[!duplicated(unlist(resCan))]
annotAll = annotateAHO(upeptide[seq_len(20)], resCanU)
dim(annotAll)

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