buildLinkerDf {pulsedSilac} | R Documentation

## Constructs a linkerDf that can be used as input when constructing a SilacProteomicsExperiment

### Description

Constructs a 4 column `data.frame` that contains the relationships between proteins and peptides: which peptides belong to which proteins and vice versa.

### Usage

    buildLinkerDf(protIDs, pepIDs, protToPep, pepToProt)

### Arguments

`protIDs` | a `character` vector with unique ids that can be mapped back to the proteins. Must be in the same order as in the rowDataProt data frame.
`pepIDs` | a `character` vector with unique ids that can be mapped back to the peptides. Must be in the same order as in the rowDataPep data frame.
`protToPep` | a list with the same length as the number of protIDs. Every entry of the list contains the peptide ids that are linked to that protein. Items in the list must be in the same order as in protIDs.
`pepToProt` | a list with the same length as the number of pepIDs Every entry of the list contains the protein ids that are linked to that peptide. Items in the list must be in the same order as in pepIDs

### Details

This data frame is used in several functions and operations involving the `SilacProteomicsExperiment` class. Especially in object merging and subsetting. The arguments protIDs and pepIDs are mandatory, but only one of the protToPep or pepToProt arguments is necessary to build the linkerDf.

### Value

A `data.frame` with the following 4 columns:

protID

  Column with the protein IDs.

pepID

  Column with the peptide IDs.

protRow

  Column with row numbers of protein IDs.

protID

  Column with the row numbers of peptide IDs.

### Examples

    ## list with the relationships
    protein_to_peptide <- list(A = c('a', 'b'), B = c('c'), C = c('d', 'e'))
    ## function to build the data.frame
    linkerDf <- buildLinkerDf(protIDs = LETTERS[1:3],
                             pepIDs  = letters[1:5],
                             protToPep = protein_to_peptide)
    linkerDf

[Package pulsedSilac version 1.4.0 Index]