SilacProteomicsExperiment-accessors: Accessors for the SilacProteomicsExperiment class

Description Usage Arguments Value Accessors Dimensions Subsetting Merging Examples

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

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 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])

marcpaga/pulsedSilac documentation built on March 11, 2020, 8:49 p.m.