writeFeaturelist {CluMSID} | R Documentation

## Write feature information from list of `MS2spectrum` objects

### Description

`writeFeaturelist` uses `featureList` to generate a `data.frame` that contains feature ID, precurosur m/z and retention time for all features contained in a list of `MS2spectrum` objects as produced by `extractMS2spectra` and `mergeSpecList` and writes it to a csv file.

### Usage

    writeFeaturelist(featlist, filename = "pre_anno.csv")

### Arguments

`featlist` | A list of `MS2spectrum` objects as produced by `extractMS2spectra` and `mergeSpecList`
`filename` | The desired file name of the csv file, default is `"pre_anno.csv"`

### Details

Although originally designed for lists of `MS2spectrum` objects, the function also works with lists of `pseudospectrum` objects. In this case, `NA` is given for precursor m/z.

### Value

A csv file that contains feature ID, precurosur m/z and retention time. The file has a header but no row names and is separated by `','`.

### Examples

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

    writeFeaturelist(featlist, filename = "pre_anno.csv")

[Package CluMSID version 1.3.1 Index]