SilacProteomicsExperiment-constructor: SilacProteomicsExperiment constructor

Description Usage Arguments Value Class description Accessors Examples

Description

Constructor function for the ProteomicsExperiment class object. It requires at minimum a SilacProteinExperiment and a SilacPeptideExperiment. If the colData, metadata and metaoptions have been already defined in those it is not necessary to give them again.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
SilacProteomicsExperiment(
  SilacProteinExperiment,
  SilacPeptideExperiment,
  colData,
  linkerDf,
  metadata,
  idColProt = NA,
  idColPept = NA,
  linkedSubset = TRUE,
  subsetMode = "protein",
  conditionCol = NA,
  timeCol = NA,
  proteinCol = NA
)

Arguments

SilacProteinExperiment

A SilacProteinExperiment object.

SilacPeptideExperiment

A SilacPeptideExperiment object.

colData

A data.frame with sample information like conditions, replicates, etc. If not provided uses the colData slot from the SilacProteinExperiment and SilacPeptideExperiment.

linkerDf

A data.frame output from buildLinkerDf.

metadata

A list to store any kind of experiment-wide data; like authors, dates, machines used... If not provided uses the metadata from the SilacProteinExperiment and SilacPeptideExperiment.

idColProt

A character indicating which column from the rowData (protein) should be used as ids. Should be the same used in buildLinkerDf.

idColPept

A character indicating which column from the rowData (peptide) should be used as ids. Should be the same used in buildLinkerDf.

linkedSubset

A logical if subsetting should be linked between proteins and peptide.

subsetMode

A character, either 'protein' or 'peptide' indicating which level should be used first when subsetting.

conditionCol

A character, which indicates the column name in colData(x) that defines the different experiment conditions.

timeCol

A character, which indicates the column name in colData(x) that defines the different experiment timepoints.

proteinCol

A character, which indicates the column name in rowData(x) that defines to which protein a peptide is assigned.

Value

An object of class SilacProteomicsExperiment.

Class description

See SilacProteomicsExperiment-class for details.

Accessors

See SilacProteomicsExperiment-accessors for details.

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
## assays
assays_protein <- list(expression = matrix(1:9, ncol = 3))

## colData
colData <- data.frame(sample = c('A1', 'A2', 'A3'),
                      condition = c('A', 'A', 'A'),
                    time = c(1, 2, 3))
## rowData
rowData_protein <- data.frame(prot_id = LETTERS[1:3])

## construct the ProteinExperiment
protExp <- SilacProteinExperiment(assays = assays_protein,
                                  rowData = rowData_protein,
                                  colData = colData,
                                  conditionCol = 'condition',
                                  timeCol = 'time')

## assays
assays_peptide <- list(expression = matrix(1:15, ncol = 3))

## colData
colData <- data.frame(sample = c('A1', 'A2', 'A3'),
                      condition = c('A', 'A', 'A'),
                      time = c(1, 2, 3))
## rowData
rowData_peptide <- data.frame(pept_id = letters[1:5],
                              prot_id = c('A', 'A', 'B', 'C', 'C'))
## construct the ProteinExperiment
peptExp <- SilacPeptideExperiment(assays = assays_peptide,
                                  rowData = rowData_peptide,
                                  colData = colData,
                                  conditionCol = 'condition',
                                  timeCol = 'time')

## 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)

ProteomicsExp <- SilacProteomicsExperiment(SilacProteinExperiment = protExp,
                                           SilacPeptideExperiment = peptExp,
                                           linkerDf = linkerDf)

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