ProteinGroup-class {isobar} | R Documentation

## ProteinGroup objects

### Description

The ProteinGroup class is a container for identified peptides and proteins, and groups them to distinguish proteins with specific peptides.

### Usage

    ProteinGroup(from,template=NULL,proteinInfo=data.frame())

    protein.ac(x, protein.g)
    protein.g(x, pattern, variables=c("AC","name"), ...)

### Arguments

`from` | `data.frame` object to create a ProteinGroup from. See Details from column specifications
`template` | 'template' ProteinGroup object for grouping.
`x` | ProteinGroup object
`protein` | character string
`proteinInfo` | data.frame for proteinInfo slot
`protein.g` | character string, denoting a 'protein group'.
`pattern` | character string, see `grep` for details.
`variables` | `AC` maps a protein accession code to a protein group. `name` maps using protein information from `proteinInfo`.
`...` | Passed on to `grep`.

### Details

The ProteinGroup class stores spectrum to peptide to protein mapping.

The proteins are grouped by their evidence, i. e. peptides:

- Peptides with changes only from Leucin to Isoleucin are considered the same, as they cannot be distinguished by MS.

- Proteins which are detected with the same peptides are grouped together to a 'indistinguishable protein'- normally these are splice variants.

- Proteins with specific peptides are 'reporters'.

- Proteins with no specific peptides are grouped under these 'reporters.

This information is stored in six slots:

`spectra.n.peptides`

  a named 'character' vector, names being spectrum identifier and values are peptides.

`peptide.n.proteins`

  a 'data.frame' containing the number of proteins the peptides could derive from.

`peptide.n.protein`

  a character 'matrix' linking peptides to proteins.

`indistinguishable.proteins`

  a 'matrix' contain.

### Constructor

  `ProteinGroup(tbl.prot.pep,template=NULL)`: Creates a ProteinGroup object.

  `tbl.prot.pep`

    A 'data.frame' with three columns: 1. Protein, 2. Peptide, 3. Spectrum.

  `template`

    Optional ProteinGroup object the grouping is based upon.

### Coercion

In the code snippets below, `x` is a ProteinGroup object.

`as(from, "ProteinGroup")`:

  Creates a ProteinGroup object from a data.frame.

`as.data.frame(x, row.names = NULL, optional = FALSE)`:

  Creates a data.frame with columns `protein` (character), `peptide` (character), `spectrum`.

`as.concise.data.frame(from)`:

  Creates a 'concise' data.frame with one spectrum per row, and protein ACs combined

### Accessors

In the following code snippets, `x` is a ProteinGroup object.

`spectrumToPeptide(x)`:

  Gets spectrum to peptide assignment.

`peptideInfo(x)`:

  Peptide information such as protein start position.

`peptideSpecificity(x)`:

  Gets a 'data.frame' containing the peptide specificity: they can be reporter-specific, group-specific, or non-specific.

`peptideNProtein(x)`:

  Gets peptide to protein assignment.

`indistinguishableProteins(x)`:

  Gets the proteins which cannot be distinguished based on peptide evidence.

`proteinGroupTable`:

  Gets the protein grouping, listing reporters and group members.

`peptides(x,protein=NULL,specificity=c("reporter-specific", "group-specific","unspecific"),columns="peptide",set=union)`:

  Gets all peptides detected, or just those for a protein with the defined specificity. `columns` might define multiple columns of `peptideSpecificity(x)`. set=union returns the union of peptides of all proteins defined, set=intersect returns the intersection.

### Author(s)

Florian P. Breitwieser

### See Also

IBSpectra

### Examples

    tbl <- data.frame(spectrum=1:14,peptide=c(rep(letters[1:3],4),"a","x"),
                      modif=":",start.pos=1,
                      protein=c(rep(c("A","B"),each=6),"C","D"))
    pg <- ProteinGroup(tbl)
    pg
    proteinGroupTable(pg)

    data(ibspiked_set1)
    pg <- proteinGroup(ibspiked_set1)
    ceru.proteins <- protein.g(pg,"CERU")

    ## all ceru peptides
    peptides(pg,ceru.proteins)

    ## peptides shared by all ceru proteins
    peptides(pg,ceru.proteins, set=intersect)

[Package isobar version 1.28.1 Index]