makePeptideTable | R Documentation |
makePeptideTable
computes a peptide table and related data. Peptide
table is a matrix with columns corresponding to conditions and rows
corresponding to peptide sequences.
makePeptideTable(
evi,
meta,
sequence.col = c("sequence", "modified_sequence"),
protein.col = c("protein", "protein_group"),
measure.cols = measureColumns,
aggregate.fun = aggregateSum,
...,
experiment.type = c("label-free", "TMT", "SILAC"),
ncores = 4
)
evi |
Evidence table created with |
meta |
Data frame with metadata. As a minimum, it should contain "sample" and "condition" columns. |
sequence.col |
A column name to identify peptides. Can be either "sequence" or "modified_sequence". |
protein.col |
A column name to use for peptide-to-protein reference. Can be either "protein" or "protein_group". |
measure.cols |
A named list of measure columns; should be the same as
used in |
aggregate.fun |
A function to aggregate pepetides with the same sequence/sample. |
... |
Additional parameters passed to the aggregate function |
experiment.type |
Type of the experiment, "label-free", "TMT" or "SILAC". |
ncores |
Number of cores for parallel processing |
The evidence file contains a column called "Experiment" and one or more
columns with measure values. In case of label-free experiment there is only
one measure column: "Intensity". In case of TMT experiment there are several
measure columns, usually called "Reporter intensity 0", "Reporter intensity
1", and so on. makePeptideTable
will combine "Experiment" and measure
columns in a way defined by the metadata (parameter meta
). The name of
the combined column will be named using "sample" column in metadata.
The result is a proteusData
object containing a table with rows
corresponding to peptides and columns corresponding to samples (as defined in
metadata). Each cell of the table is an aggregated measure values over all
evidence entries corresponding to the given sequence and experiment. How
these measure values are aggregated is controlled by the parameter
aggregate.fun
.
There are two aggregation functions provided in this package:
aggregateMedian
and aggregateSum
. Depending on
the needs, the user can provide any arbitrary function to perform
aggregation. We recommend using aggregateSum
for label-free and TMT
experiments and aggregateMedian
for SILAC experiments.
The aggregate function should be in form: function(wp, ...)
. wp
is a matrix containing measurements from for a given peptide. Rows are
evidence file entries, columns are samples. ...
are additional
parameters for the function that are passed from makePeptideTable
. The
aggregate function should return a vector of values for each sample. That is
the length of the vector should be the same as the number of columns in
wp
. For example, the default aggregate function aggregateSum
calculates sums in each column of wp
.
This function, apart from aggregating evidence data into peptides, builds a
peptide-to-protein reference and stores is in the returned object ($pep2prot
field). It can be used at peptide level, to identify which protein peptides
belong to. It is then passed to makeProteinTable
function and
used to aggregate peptides to proteins. Here we can decide how peptides are
aggregated to proteins. This is controlled by the protein.col
parameter, which indicates which evidence column should be used to build
peptide-to-protein relation. If "protein" is used (default) the
peptite-to-protein relation is build on leading razor proteins. If
"protein_group" is used, then peptide-to-protein relation is based on protein
groups.
Only samples from metadata are used, regardless of the content of the evidence data. This makes selection of samples for downstream processing easy: select only required rows in the metadata data frame.
A proteusData
object, containing peptide intensities and
metadata.
## Not run:
library(proteusLabelFree)
data(proteusLabelFree)
pepdat <- makePeptideTable(evi, meta, ncores=2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.