Learn R Programming

protiq (version 1.2)

quantifyProtein: Compute expected value and variance of a protein abundance.

Description

Use provided model parameter values to compute the expected value and variance of the abundance for a given protein.

Usage

quantifyProtein(protInfo, ccList, param, verbose = FALSE)

Arguments

protInfo
Vector with two elements: protId and index of connected component (in list ccList) which contains protId.
ccList
List of pre-processed connected components.
param
Vector with at least four named elements: alphaH, betaH, muH and tauH (estimates for the four model parameters).

verbose
If TRUE, detailed output is provided.

Value

Vector with two values: expected value and variance of the protein abundance.

See Also

runScampi, iterateScampi

Examples

Run this code
## get data
data("leptoSRM")
## check input data
dataChecked <- checkInputData(scampiData=scampi(peptides=leptoSRMpeptides, 
                                                proteins=leptoSRMproteins,
                                                edgespp=leptoSRMedgespp),
                              rescaling=FALSE)
## preprocess input data
tmpPrepro <- preprocessInputData(scampiData=dataChecked) 
dataPrepro <- tmpPrepro[["dataPrepro"]]
myCCList <- tmpPrepro[["ccList"]]
rm(tmpPrepro)

## compute covariance matrices
myCCList <- lapply(myCCList, getCovU,
                   beta=0.2,
                   tau=0.5)

## compute expected value and variance of abundance for protein 7
protAbundanceScore <- 
  quantifyProtein(protInfo=dataPrepro@proteins[7, c("protId", "ccInd")], 
                  ccList=myCCList, param=c(alphaH=0, betaH=0.2, muH=0.3, 
                  tauH=0.2))[1]
protAbundanceVariance <- 
  quantifyProtein(protInfo=dataPrepro@proteins[7, c("protId", "ccInd")], 
                  ccList=myCCList, param=c(alphaH=0, betaH=0.2, muH=0.3, 
                  tauH=0.2))[2]

Run the code above in your browser using DataLab