merge {pulsedSilac} | R Documentation

## Merge

### Description

Merges two objects of the same class: `SilacProteinExperiment`, `SilacPeptideExperiment` or `SilacProteomicsExperiment`.

### Usage

    ## S4 method for signature 'SilacProteinExperiment,ANY'
    merge(x, y, by, by.x = by, by.y = by, all = TRUE, ...)

    ## S4 method for signature 'SilacPeptideExperiment,ANY'
    merge(x, y, by, by.x = by, by.y = by, all = TRUE, ...)

    ## S4 method for signature 'SilacProteomicsExperiment,ANY'
    merge(
      x,
      y,
      by.prot,
      by.prot.x = by.prot,
      by.prot.y = by.prot,
      by.pept,
      by.pept.x = by.pept,
      by.pept.y = by.pept,
      all = TRUE,
      ...
    )

### Arguments

`x` | A `SilacProteinExperiment`, `SilacPeptideExperiment` or a `SilacProteomicsExperiment` object.
`y` | A `SilacProteinExperiment`, `SilacPeptideExperiment` or a `SilacProteomicsExperiment` object.
`by, by.x, by.y` | A `character` indicating the columns used for the merging.
`all` | A `logical` indicating if all proteins/peptides should be returned or only the intersect.
`...` | Further parameters passed into `base::merge`.
`by.prot, by.prot.x, by.prot.y` | For `SilacProteomicsExperiment` objects a `character` indicating the columns used for the merging of the protein level.
`by.pept, by.pept.x, by.pept.y` | For `SilacProteomicsExperiment` objects a `character` indicating the columns used for the merging of the protein level.

### Details

This function is designed to be able to merge different samples from different experiments since it is probable that not the exact same proteins are found in both experiments and therefore `cbind` cannot be used. It uses the merge base function to merge the rowData data frames and merges the assays based on such merge. The colData `data.frame` are joined.

For a `SilacProteomicsExperiment` object it gets a bit more complicated since it is possible that some peptides that were assigned to one protein in one experiment are assigned to another one in another experiment. Therefore the linkerDf `data.frame` is recalculated.

### Value

A `SilacProteinExperiment`, `SilacPeptideExperiment` or a `SilacProteomicsExperiment` object.

### Examples

    data('wormsPE')
    merge(wormsPE[1:10, 1:3], wormsPE[3:10, 4:5])

[Package pulsedSilac version 1.8.0 Index]