Learn R Programming

wrTopDownFrag (version 1.0.4)

combinateAllAndSum: Full Combinatorial And Cumulative Values

Description

Use this function for preparing all combinations of non-compulsatory, ie variable, mass modifications. Variable modifications may or may not be present. Thus, for a given amino-acid with a variable modification two versions of the molecular weight need to be considered.

Usage

combinateAllAndSum(
  nMax,
  modVal,
  notSingle = NULL,
  silent = TRUE,
  debug = FALSE,
  callFrom = NULL
)

Value

This functions returns a named (concatenated names of modVal) numeric vector

Arguments

nMax

(integer or data.frame with 1 line) maximum number of modifications

modVal

(numeric, has to have names !) the change of molecular mass introduced by given modifications (as specified by the name of the value)

notSingle

(character) names of 'modVal' where 1st element of 'notSingle' cannot happen/appear if 2nd element not present (eg de-phospho/phosphorylation)

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allows easier tracking of messages produced

Details

Most (variable) modifications are linked to a type of amino acid, like serine- or thyrosine residues for phosphorlylation. Thus in this case, each instance of the amino acids S or T may or may not be modified. So, for example if there are 2 serines on a given peptide/protein, 0, 1 or 2 phosphorylation modifications may be present. For this reason there is an argument called nMax to allow staying within biologically relevant ranges (external knowledge) and allowing to reduce complexity significantly. In the case of phosporylations, the total number of actually phosphoylated amino-acids is typically way below the number of S and T residues in pthe initial sequence. Some modifications are exclusive to others, argument notSingle : An (artificially occuring) de-phosphorylation event during fragmentation can only happen if the amino acid was already phosphorylated in the first place.

See Also

convToNum

Examples

Run this code
uniqCo <- matrix(c(1,1,1,0,1,1), nrow=2, dimnames=list(c("PTI","KPE"),c("d","p","h"))  )
massModV <- c(d= -18.01056, p= 79.96633, h= -18.01056)
## for 1st peptide
combinateAllAndSum(uniqCo[1,], massModV, notSingle=c("q","p"))
## for all peptides
apply(uniqCo, 1, combinateAllAndSum, massModV, notSingle=c("q","p"))

Run the code above in your browser using DataLab