detectMissInjections: Detect miss injections

detectMissInjectionsR Documentation

Detect miss injections

Description

Detect miss injected samples or samples with a total ion count below a percentage threshold of the median.

Usage

detectMissInjections(x, idx = "injOrder", threshold = 25)

## S4 method for signature 'Binalysis'
detectMissInjections(x, idx = "injOrder", threshold = 25)

## S4 method for signature 'MetaboProfile'
detectMissInjections(x, idx = "injOrder", threshold = 25)

Arguments

x

object of S4 class Binalysis or MetaboProfile

idx

the sample information column to use for sample indexes

threshold

the percentage of the median TIC below which samples will be considered miss injections.

Value

A list containing the name of the sample information column used to index the miss injections and a vector of miss injection indexes.

Examples

## Retrieve file paths and sample information for example data
files <- metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes')[1:2]

info <- metaboData::runinfo('FIE-HRMS','BdistachyonEcotypes')[1:2,]

## Perform spectral binning
analysis <- binneR::binneRlyse(files, 
                               info, 
                               parameters = binneR::detectParameters(files))

## Detect miss injections
miss_injections <- detectMissInjections(analysis)

## Display detected miss injections
miss_injections

jasenfinch/metaboMisc documentation built on July 31, 2023, 2:28 a.m.