View source: R/protPepProfile.R
| protPepProfile | R Documentation | 
Interlace profiles of proteins and their component peptides into a single data frame.
protPepProfile(flagPeps, numRefCols, numDataCols, protProfileData)
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  | 
Data frame containing protein and peptide profiles
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.