SilacProteomicsExperiment-accessors {pulsedSilac} | R Documentation

## Accessors for the SilacProteomicsExperiment class

### Description

All the accessors, dimension, subsetting, merging and coercers that work on `SilacProteomicsExperiment` objects. Since the `SilacProteomicsExperiment` object has both protein and peptide level data, most of the functions have a 'Prot' or 'Pept' suffix to indicate which level should be used. If the non-suffix function is used, then a list with both protein and peptide data is returned. These functions also work on `SilacProteinExperiment` and `SilacPeptideExperiment` objects.

### Usage

    PeptExp(x)

    ProtExp(x)

    ## S4 method for signature 'SilacProteomicsExperiment'
    assayNames(x, ..., withDimnames)

    ## S4 method for signature 'SilacProteinExperiment'
    assayNamesProt(x)

    ## S4 replacement method for signature 'SilacProteinExperiment'
    assayNamesProt(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    assayNamesProt(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    assayNamesProt(x) <- value

    ## S4 method for signature 'SilacPeptideExperiment'
    assayNamesPept(x)

    ## S4 replacement method for signature 'SilacPeptideExperiment'
    assayNamesPept(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    assayNamesPept(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    assayNamesPept(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    assays(x, withDimnames = TRUE, ...)

    ## S4 method for signature 'SilacProteinExperiment'
    assaysProt(x)

    ## S4 replacement method for signature 'SilacProteinExperiment'
    assaysProt(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    assaysProt(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    assaysProt(x) <- value

    ## S4 method for signature 'SilacPeptideExperiment'
    assaysPept(x)

    ## S4 replacement method for signature 'SilacPeptideExperiment'
    assaysPept(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    assaysPept(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    assaysPept(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    cbind(..., deparse.level = 1)

    ## S4 method for signature 'SilacProteomicsExperiment'
    colData(x, ...)

    ## S4 replacement method for signature 'SilacProteomicsExperiment,ANY'
    colData(x, ...) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    colnames(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    colnames(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    dim(x)

    ## S4 method for signature 'SilacProteomicsExperiment'
    x$name

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    x$name <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    length(x)

    ## S4 method for signature 'SilacProteomicsExperiment'
    linkerDf(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    linkerDf(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    metadata(x, ...)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    metadata(x, ...) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    metaoptions(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    metaoptions(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    ncol(x)

    ## S4 method for signature 'SilacProteomicsExperiment'
    rbind(..., deparse.level = 1)

    ## S4 method for signature 'SilacProteomicsExperiment'
    rowData(x, use.names = TRUE, ...)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    rowData(x, ...) <- value

    ## S4 method for signature 'SilacProteinExperiment'
    rowDataProt(x)

    ## S4 replacement method for signature 'SilacProteinExperiment'
    rowDataProt(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    rowDataProt(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    rowDataProt(x) <- value

    ## S4 method for signature 'SilacPeptideExperiment'
    rowDataPept(x)

    ## S4 replacement method for signature 'SilacPeptideExperiment'
    rowDataPept(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    rowDataPept(x)

    ## S4 method for signature 'SilacProteomicsExperiment'
    rownamesProt(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    rownamesProt(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    rownamesPept(x)

    ## S4 replacement method for signature 'SilacProteomicsExperiment'
    rownamesPept(x) <- value

    ## S4 method for signature 'SilacProteomicsExperiment'
    subset(x, ...)

    ## S4 method for signature 'SilacProteinExperiment'
    subsetProt(x, ...)

    ## S4 method for signature 'SilacProteomicsExperiment'
    subsetProt(x, ...)

    ## S4 method for signature 'SilacPeptideExperiment'
    subsetPept(x, ...)

    ## S4 method for signature 'SilacProteomicsExperiment'
    subsetPept(x, ...)

    ## S4 method for signature 'SilacProteomicsExperiment,ANY,ANY,ANY'
    x[i, j, ..., drop = TRUE]

### Arguments

`x` | A `SilacSilacProteomicsExperiment` object.
`...` | For `rbind` and `cbind` are `SilacProteinExperiment` or `SilacPeptideExperiment` objects to be joined together. For `subset` it is a logical comparison using a column name from the respective rowData `data.frame`. Otherwise unused.
`withDimnames` | Unused.
`value` | An object of class specified in the S4 method signature or as described in the following sections.
`deparse.level` | Unused.
`name` | Column name of colData.
`use.names` | Unused.
`i, j` | For ``[``, `i`, `j` are subscripts that can act to subset the rows and columns of `x`.
`drop` | A `logical` indicating if dimensions should be lowered if possible when subsetting.

### Value

Elements from a `SilacProteomicsExperiment` object.

### Accessors

The following functions can be used to access the data in the class slots

`assays`, `assaysProt`, `assaysPept`:

  Access the assays (list of matrices) of the object. Value should be a matrix or list of matrices.

`assayNames`, `assayNamesProt`, `assayNamesPept`:

  Access the assay names of the object. Value should be a character vector.

`rowData`, `rowDataProt`, `rowDataPept`:

  Access the protein/peptide feature `data.frame` of the object. Value should be a `data.frame` with as many rows as proteins/peptides.

`colData`:

  Access the samples `data.frame` of the object. Value should be a `data.frame` with as many rows as samples.

`metadata`:

  Access the metadata `list` of the object. Value should be a `list`.

`metaoptions`:

  Access the metaoptions `list` of the object. Value should be a `list`.

`linkerDf`:

  Access the linker `data.frame` of the object (only ProteomicsExperiment). Value should be a `data.frame` output from `buildLinkerDf`.

`ProtExp` and `PeptExp`:

  Access the experiment objects in a `SilacProteomicsExperiment`.

### Dimensions

The following functions can be used to get the number of proteins/peptides and number of samples:

`nrow`:

  Gives how many proteins and peptides the object has.

`ncol`:

  Gives how many samples the object has.

`dim`:

  Gives both the number of proteins andpeptides and the number of samples the object has.

`length`:

  Gives how many proteins and or peptides the object has.

### Subsetting

The following functions can be used to subset the different classes:

`$`:

  Gives a column from colData by name.

``[``:

  Can be used to subset by row and column.

`subset`, `subsetProt` and `subsetPept`:

  Allows to subset based on a logical comparison using a column name from the rowData `data.frame`.

The ProteomicsExperiment class is a bit more complex since there are two levels at which the subset can be done and these two levels can be linked or not.

If the metaoption 'linkedSubset' is TRUE, then when subsetting on one level, the proteins/peptide linked to such level are also subsetted. Otherwise, one of the levels remains unmodified.

`subsetProt` can be used to apply `subset` at the rowData `data.frame` of the protein level. `subsetProt` can be used to apply `subset` at the rowData `data.frame` of the peptide level. If `subset` is used, then `subsetProt` or `subsetPept` will be used depending on the metaoption 'subsetMode'.

'[' acts in the same manner as calling `subset`. In this case numerics are used and samples can also be selected.

The vignette offers a detailed set of simple examples with all the possible cases.

### Merging

The following functions can be used to aggregate objects of the same class together:

`cbind`:

  Joins two or more objects horizontally (adding samples). Must have the same proteins/peptides and in the same order.

`rbind`:

  Joins two or more objects vertically (adding proteins/peptides). Must have the same samples and in the same order.

`merge`:

  Joins two objects by adding new samples and tries to merge the proteins/peptide rowData data.frames and recalculate the linkerDf `data.frame` for the `SilacProteomicsExperiment` class.

Merge methods are explained in detail in merge.

### Examples

    # Accessors
    ## assays
    data('wormsPE')
    assays(wormsPE)
    assaysProt(wormsPE)
    assaysPept(wormsPE)

    ## assaysNames
    assayNames(wormsPE)
    assayNamesProt(wormsPE)
    assayNamesPept(wormsPE)

    ## colData
    colData(wormsPE)

    ## rowData
    rowData(wormsPE)
    rowDataProt(wormsPE)
    rowDataPept(wormsPE)

    ## metadata
    metadata(wormsPE)

    ## metaoptions
    #metaoptions(wormsPE)

    ## linkerDf
    linkerDf(wormsPE)

    # Dimensions and dimensions names
    nrow(wormsPE)
    ncol(wormsPE)
    dim(wormsPE)
    length(wormsPE)
    colnames(wormsPE)
    rownamesProt(wormsPE)
    rownamesPept(wormsPE)

    # Subsetting
    wormsPE$line
    wormsPE[1,1]
    subsetProt(wormsPE, protein_id == 'AC3.2')
    subsetPept(wormsPE, Sequence == 'AIQEISDYHFLIK')

    # Merging
    rbind(wormsPE[1:10, ], wormsPE[11:20, ])
    cbind(wormsPE[,1:2], wormsPE[,3:4])
    #merge(wormsPE[1:10, 1:3], wormsPE[3:10, 4:5])

[Package pulsedSilac version 1.6.0 Index]