# annotate.protein_id
# our Fasta sequence
irtFASTAseq <- paste(">zz|ZZ_FGCZCont0260|",
"iRT_Protein_with_AAAAK_spacers concatenated Biognosys
",
"LGGNEQVTRAAAAKGAGSSEPVTGLDAKAAAAKVEATFGVDESNAKAAAAKYILAGVENS",
"KAAAAKTPVISGGPYEYRAAAAKTPVITGAPYEYRAAAAKDGLDAASYYAPVRAAAAKAD",
"VTPADFSEWSKAAAAKGTFIIDPGGVIRAAAAKGTFIIDPAAVIRAAAAKLFLQFGAQGS",
"PFLK
")
# be realistic, do it from file
Tfile <- file(); cat(irtFASTAseq, file = Tfile);
#use read.fasta from seqinr
fasta.irtFASTAseq <-read.fasta(Tfile, as.string=TRUE, seqtype="AA")
close(Tfile)
#annotate with proteinID
# -> here we find all psms from the one proteinID above
peptideStd <- specL::annotate.protein_id(peptideStd,
fasta=fasta.irtFASTAseq)
#show indices for all PSMs where we have a proteinInformation
which(unlist(lapply(peptideStd,
function(x){nchar(x$proteinInformation)>0})))
Run the code above in your browser using DataLab