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

View source: R/annotate.R

addAnnotationsR Documentation

Adding external annotations to list of MS2spectrum objects

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

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

load(file = system.file("extdata",
    "featlist.RData",
    package = "CluMSIDdata"))

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


tdepke/CluMSID documentation built on April 10, 2022, noon