annotateTraces: Annotate traces object

Description Usage Arguments Value Examples

View source: R/annotateTraces.R

Description

Add custom annotation columns to the trace_annotation in a traces object from an external annotation table, e.g. UniProt.

Usage

1
2
3
4
annotateTraces(traces, trace_annotation, traces_id_column = "protein_id",
  trace_annotation_id_column = "Entry",
  trace_annotation_mass_column = "Mass", uniprot_mass_format = TRUE,
  replace_whitespace = TRUE)

Arguments

traces

Object of class traces.

trace_annotation

Tab-separated annotation table to be merged into trace_annotation, file or R data.table.

traces_id_column

Character string with name of the id column specifying the entries to be annotated. Defaults to "protein_id".

trace_annotation_id_column

Character string with name of the column in the reference table that contains the ids. Defaults to "Entry" as expexted from uniprot.tab files.

trace_annotation_mass_column

Character string with name of the column in the reference table that contains the protein mass annotation in kDa. If uniprot_mass_format = TRUE, this column should be called "Mass" and is in Da (PCprofiler will do the conversion). Defaults to "Mass".

uniprot_mass_format

Logical, whether mass annotation is in the format of uniprot ("Mass" column with molecular weight in Da and comma as thouthands separator).

replace_whitespace

Logical, whether spaces contained in the anntation table column names shall be replaced by "_". Defaults to TRUE.

Value

Traces object of class traces with extended annotation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Load some example data:
inputTraces <- examplePeptideTracesUnannotated
inputAnnotation <- exampleTraceAnnotation
# Run the annotation:
annotatedTraces <- annotateTraces(
traces=inputTraces,
trace_annotation=inputAnnotation,
traces_id_column = "protein_id",
trace_annotation_id_column = "Entry")
annotatedTraces$trace_annotation

CCprofiler/CCprofiler documentation built on May 19, 2021, 7:40 p.m.