protPepProfile: Interlace protein profiles and component peptide profiles

View source: R/protPepProfile.R

protPepProfileR Documentation

Interlace protein profiles and component peptide profiles

Description

Interlace profiles of proteins and their component peptides into a single data frame.

Usage

protPepProfile(flagPeps, numRefCols, numDataCols, protProfileData)

Arguments

flagPeps

data frame containing profiles for all spectra, information mapping these to proteins and peptides, and outlier indicators for spectra and peptides

numRefCols

number of reference columns

numDataCols

number of data columns

protProfileData

data frame containing protein profiles

Value

Data frame containing protein and peptide profiles

Examples

set.seed(17356)
eps <- 0.029885209
data(spectraNSA_test)
flagSpectraBox <- outlierFind(protClass=spectraNSA_test,
                    outlierLevel='peptide', numRefCols=5, numDataCols=9,
                    outlierMeth='boxplot', range=3, eps=eps,
                    randomError=TRUE)
                    
 #examine numbers of spectra that are outliers
table(flagSpectraBox$outlier.num.spectra)
# find peptide-level profiles
pepProfiles <- profileSummarize(protsCombineCnew=flagSpectraBox,
      numRefCols=6, numDataCols=9, refColsKeep=c(1,2,4),eps=eps,
      GroupBy="peptideId", outlierExclude="spectra")
      
 # find oulier peptides
flagPepsBox <- outlierFind(protClass=pepProfiles,
      outlierLevel="protein",
      numRefCols=3, numDataCols=9, eps=eps)
      str(flagPepsBox, strict.width="cut", width=65)
      
 # combine the two types of outliers into one
flagSpectraPeps <- merge(x=flagSpectraBox,
      y=flagPepsBox[,c(4,17)], by="pepId")
      
 # create protein profile from component peptide and spectra
protNSA_1 <-
      profileSummarize(protsCombineCnew=flagSpectraPeps,
      numRefCols=7, numDataCols=9, eps=eps, GroupBy="protId",
      outlierExclude="spectraAndPeptide")
      
# combine protein and peptide profiles
protPepProfileNSA <- protPepProfile(flagPeps=flagPepsBox,
      numRefCols=4, numDataCols=9,
      protProfileData=protNSA_1)
str(protPepProfileNSA, strict.width="cut", width=65)
  # See Vignette 6 for a full explanation

mooredf22/protlocassign documentation built on Sept. 13, 2023, 3:57 p.m.