addAnnotations: Adding external annotations to list of 'MS2spectrum' objects

Description Usage Arguments Value Examples

View source: R/annotate.R

Description

addAnnotations is used to add annotations that have been assigned externally, e.g. by library search, to a list of MS2spectrum objects as produced by extractMS2spectra and mergeSpecList.

Usage

1
addAnnotations(featlist, annolist, annotationColumn = 4)

Arguments

featlist

A list of MS2spectrum objects as produced by extractMS2spectra and mergeSpecList

annolist

A list of annotations, either as a data.frame or csv file. The order of features must be the same as in featlist. Please see the package vignette for a detailed example!

annotationColumn

The column of annolist were the annotation is found. Default is 4, which is the case if writeFeaturelist followed by manual addition of annotations, e.g. in Excel, is used to generate annolist.

Value

A list of MS2spectrum objects as produced by extractMS2spectra and mergeSpecList with external annotations added to the annotation slot of each MS2spectrum object.

Examples

1
2
3
4
5
6
7
8
load(file = system.file("extdata",
    "featlist.RData",
    package = "CluMSIDdata"))

addAnnotations(featlist, system.file("extdata",
                "post_anno.csv",
                package = "CluMSIDdata"),
                annotationColumn = 4)

CluMSID documentation built on Nov. 8, 2020, 7:46 p.m.