remove_peaks: Remove features from peak intensity matrix

Description Usage Arguments Value Examples

View source: R/filters.R

Description

Filter to remove features.

Usage

1
remove_peaks(df, rem_index)

Arguments

df

A matrix-like (e.g. an ordinary matrix, a data frame) or RangedSummarizedExperiment-class object with all values of class numeric() or integer() of peak intensities, areas or other quantitative characteristic.

rem_index

logical(), vector containing TRUE vales for features to remove. Should be the same length as number of features in input data.

Value

Object of class SummarizedExperiment. If input data are a matrix-like (e.g. an ordinary matrix, a data frame) object, function returns the same R data structure as input with all value of data type numeric().

Examples

1
2
3
4
5
df <- MTBLS79[ ,MTBLS79$Batch == 1]
rem_index <- vector(mode="logical", 
    length=nrow(SummarizedExperiment::assay(df)))
rem_index[c(1, 20, 456, 789)] <- TRUE
out <- remove_peaks(df=df, rem_index=rem_index)

pmp documentation built on April 1, 2021, 6:01 p.m.