fCPAone: CPA for protein i

View source: R/cpaProgs.R

fCPAoneR Documentation

CPA for protein i

Description

Carry out constrained proportional assignment for protein i; service function for fitCPA

Usage

fCPAone(
  profile,
  refLocationProfiles,
  numDataCols,
  startProps = NULL,
  maxit = 10000,
  ind.vary = NULL,
  minVal = FALSE
)

Arguments

profile

vector of a specified protein (row name) profile

refLocationProfiles

data frame of profiles for the reference compartments

numDataCols

number of fractions in each profile

startProps

starting values for proportional assignments; set equal if this is null (default)

maxit

maximum number of iterations (default is 10000)

ind.vary

if not NULL, indexes of proportions allowed to vary with others constrained to zero

minVal

default is FALSE. If TRUE, return minimum value of goodness of fit

Value

Vector of proportional assignments of each protein to compartments. Also returns variables 'nspectra' and 'npeptides' if they are included in the profile input. If 'ind.vary' is specified, only the referenced CPA estimates are returned.

Examples

data(protRSA_test)
data(refLocProfRSA)

protCPAfromRSA_i_out1 <- fCPAone(profile=protRSA_test[1,],
                          refLocationProfiles=refLocProfRSA,
                          numDataCols=9, startProps=NULL,
                          maxit=10000,
                         ind.vary=NULL, minVal=FALSE)
round(protCPAfromRSA_i_out1, digits=4)

protCPAfromRSA_i_out1b <- fCPAone(profile=protRSA_test[1,],
          refLocationProfiles=refLocProfRSA,
          numDataCols=9, startProps=NULL,
          maxit=10000,
          ind.vary=c(2,4), minVal=FALSE)
round(protCPAfromRSA_i_out1b, digits=4)

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