trimAnnotation: Select a Subset of Annotated Peaks for Plotting

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/MS1_functions.R

Description

This uses the filterPeakSatellites of RMassBank to select annotated peaks for plotting and thus prevent overlap.

Usage

1
2
trimAnnotation(annotated_dataframe,mzLimit=10,IntLimit=1,
column_names = c("mz","anno","intensity","relInt"), UseRmbDefaultSettings=TRUE)

Arguments

annotated_dataframe

The data frame containing the annotated data to trim

mzLimit

The mz window to exclude other annotations.

IntLimit

The default value of 1 is recommended. See details.

column_names

This should be used to defined the column names and can be retrieved from annotated_dataframe using colnames. NOTE that the columns mz and intensity MUST exist for this function to work.

UseRmbDefaultSettings

The default TRUE calls RmbDefaultSettings; if other settings are in use set this to FALSE. See Details.

Details

UseRmbDefaultSettings: If RMassBank is not in use for any other purpose, the default TRUE calls RmbDefaultSettings to ensure that settings are present for use. If other settings have been defined using RMassBank, set this to FALSE to avoid overwriting those settings. This function retrieves settings and adjusts them internally without overwriting any stored settings. IntLimit: This is used in filterPeakSatellites and is relative to 1. For this context, this should be kept at 1. Values below 1 will let additional peaks through; values above 1 lead to strange behaviour.

Value

Returns a "trimmed" annotated_dataframe

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

extractMS1.RMBarchive

Examples

1
2
3
4
5
6
MBrecord <- system.file("extdata","EA000405.txt",package="ReSOLUTION")
MBrecord <- system.file("extdata","EA026206_Simazine.txt",package="ReSOLUTION")
anno_peaks <- getMBPeaksAnnos(MBrecord, fixColNames=TRUE)
anno_cols <- sub("Int","intensity",colnames(anno_peaks))
colnames(anno_peaks) <- anno_cols
trimAnnotation(anno_peaks, mzLimit=10, IntLimit=1, column_names=anno_cols)

schymane/ReSOLUTION documentation built on May 22, 2021, 3:41 a.m.