extractPseudospectra {CluMSID} | R Documentation

## Extract pseudospectra

### Description

`extractPseudospectra()` is used to extract MS1 pseudospectra from CAMERA output.

### Usage

    extractPseudospectra(x, min_peaks = 1, intensity_columns = NULL)

### Arguments

`x` | CAMERA output that contains information on pseudospectra. Can either be of class `data.frame` or `xsAnnotate`. It is recommended to use either `xsAnnotate` objects or `data.frame`s generated from XCMSonline results tables but other `data.frame`s are possible.
`min_peaks` | Minimum number of peaks in pseudospectrum, defaults to `1`. See `extractMS2spectra`.
`intensity_columns` | Numeric, defaults to `NULL`. If a `data.frame` is used as input which has not been generated from an XCMSonline results table, the indices of the columns that contain the peak intensities in the different samples have to be indicated as `intensity_columns`.

### Value

A list of pseudospectra, stored as objects of class `pseudospectrum`, analogous to the output of `extractMS2spectra`.

### Examples

    pstable <- readr::read_delim(file = system.file("extdata",
                                    "TD035_XCMS.annotated.diffreport.tsv",
                                    package = "CluMSIDdata"), delim = "\t")

    pseudospeclist <- extractPseudospectra(pstable, min_peaks = 2)

[Package CluMSID version 1.10.0 Index]