View source: R/profileSummarize.R
meansByProteins | R Documentation |
Service function for profileSummarize. Find mean profiles using a random effects model for nested data.
meansByProteins(
i,
uniqueLabel,
protsCombineCnew,
numRefCols,
numDataCols,
GroupBy,
eps,
outlierExclude,
singularList = FALSE
)
i |
protId or pepId (only one) |
uniqueLabel |
vector of either protId or pepId as specified by 'GroupBy' in profileSummarize |
protsCombineCnew |
data frame of profiles (spectra or spectra and peptides) with outlier information |
numRefCols |
number of columns preceding the profile data |
numDataCols |
number of fractions in each profile |
GroupBy |
‘protId’ if average peptides to give mean protein profile; ‘pepId’ if average spectra to give mean peptide profiles |
eps |
small value to add so that log argument is greater than zero |
outlierExclude |
none, spectra, or spectraAndPeptide |
singularList |
If TRUE, list fractions associated with a given protein or peptide with singular lmer fit results; default is FALSE |
estimated mean and standard error for a protein or peptide profile
Estimated mean and standard error (log2 scale) for a protein or peptide profile, and Nspectra, Npep, protId, and pepId
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)
uniqueLabel <- flagSpectraBox$pepId
pepProfile_i_out <- meansByProteins(i=uniqueLabel[1],
uniqueLabel=uniqueLabel,
protsCombineCnew=flagSpectraBox,
numRefCols=6, numDataCols=9, GroupBy="peptideId",eps=eps,
outlierExclude='spectra')
round(pepProfile_i_out, digits=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.