Package 'sRm'

Title: Toolkit for SRM-MS data (MS) data
Description: A complete toolkit for working with Selective Reaction Monitoring (SRM) Mass Spectrometry (MS) data and other variants of targeted Liquid Chromatography (LC) MS data.
Authors: Tom Wilson [aut, cre]
Maintainer: Tom Wilson <[email protected]>
License: GPL (>= 3)
Version: 0.2.6
Built: 2026-06-06 05:53:18 UTC
Source: https://github.com/wilsontom/sRm

Help Index


Adjust Baseline

Description

Adjust Baseline

Usage

adjustBaseline(object, hwm)

## S4 method for signature 'SRM'
adjustBaseline(object, hwm = 6)

Arguments

object

a SRM object

hwm

a numeric value for window half width for local medians

Value

a SRM object


Create Group

Description

Create peak group based on user specified retention time

Usage

createGroup(object, index, rt, width, id)

## S4 method for signature 'SRM'
createGroup(object, index, rt, width, id)

Arguments

object

a SRM object

index

a numeric value of the target transition index

rt

a numeric value of target Rt time (in minutes)

width

a numeric value of tolerated Rt width (in seconds)

id

a character string for peak group identification

Value

a SRM object


Detect Instrument Model

Description

Detect Instrument Model

Usage

detectInstrumentModel(mzml_file)

Arguments

mzml_file

the absolute file path of a valid .mzML file

Value

a character string of the MS cvParam description for the instrument model


Detect Peaks

Description

Detect Peaks

Usage

detectPeaks(object, snthresh, peakwidth)

## S4 method for signature 'SRM'
detectPeaks(object, snthresh, peakwidth)

Arguments

object

a SRM object

snthresh

a numeric value for the signal-to-noise threshold to use

peakwidth

a numeric vector indicating the minimum and maximum tolerated peak width

Value

a SRM object


Extract meta information from .mzML file

Description

Extract a minimal amount meta data from a .mzML file

Usage

fileMetaData(x)

Arguments

x

a valid .mzML file

Value

a tibble containing;

  • mzML Schema

  • Acquisition Date

  • Acquisition Time

  • Instrument Model

  • File ID


Filter Peaks

Description

Filter detected peaks based on a series of heuristic measures

Usage

filterPeaks(object)

## S4 method for signature 'SRM'
filterPeaks(object)

Arguments

object

a SRM object

Value

a SRM object


Free Scales

Description

Allow free scales in facet plots

Usage

freeScales(ggplot)

Arguments

ggplot

a ggplot object

Value

a ggplot object


Group Peaks

Description

Group detected peaks based on retention time. Based on MsCoreUtils::group

Usage

groupPeaks(object, rt_tolerance)

## S4 method for signature 'SRM'
groupPeaks(object, rt_tolerance)

Arguments

object

a SRM object

rt_tolerance

a numeric value for the tolerate retention grouping

Value

a SRM object


Group Summary

Description

Create a summary table for peak groups

Usage

groupSummary(object)

## S4 method for signature 'SRM'
groupSummary(object)

Arguments

object

a SRM object

Value

a tibble of group summary


Find Target Retention Time (Rt) for a transition

Description

Find Target Retention Time (Rt) for a transition

Usage

indexRT(object, index, sampleName, n)

## S4 method for signature 'SRM'
indexRT(object, index, sampleName, n = 1)

Arguments

object

a SRM object

index

a numeric value for the transition index

sampleName

a character string

n

a numeric value for the number of Rts to return (if > 1 is available)

Value

a numeric vector or Rt targets


Keep Transitions

Description

Keep Transitions

Usage

keepTransitions(object, index_keep)

## S4 method for signature 'SRM'
keepTransitions(object, index_keep = c())

Arguments

object

a SRM object

index_keep

a numeric vector of transition index to retain

Value

a SRM object


meta

Description

List sample meta data

Usage

meta(object)

## S4 method for signature 'SRM'
meta(object)

Arguments

object

a SRM S4 object


Open SRM Files

Description

Open and parse SRM files into an S4 SRM Object

Usage

openSRM(files)

Arguments

files

a character vector of absolute file paths of SRM files in .mzML format

Value

an SRM object


Peak Asymmetry

Description

Peak Asymmetry

Usage

peakAsymmetry(object)

## S4 method for signature 'SRM'
peakAsymmetry(object)

Arguments

object

a SRM object

Value

a SRM object


peaks

Description

List detected peaks

Usage

peaks(object)

## S4 method for signature 'SRM'
peaks(object)

Arguments

object

a SRM S4 object


Plot Group

Description

Plot Group

Usage

plotGroup(object, group)

## S4 method for signature 'SRM'
plotGroup(object, group)

Arguments

object

a SRM object

group

a character string of the GroupID

Value

a ggplot plot object


Plot Parent

Description

Plot Parent

Usage

plotParent(object, parentMass)

## S4 method for signature 'SRM'
plotParent(object, parentMass)

Arguments

object

a SRM object

parentMass

a numeric value of the parent mass (Q1) to extract

Value

a ggplot plot object


Plot Peak Area

Description

Plot Peak Area

Usage

plotPeakArea(object, index, sampleName)

## S4 method for signature 'SRM'
plotPeakArea(object, index, sampleName)

Arguments

object

a SRM object

index

a numeric value of the transition index to plot

sampleName

a character string of sampleName to plot

Value

a ggplot plot object


Plot Sample

Description

Plot Sample

Usage

plotSample(object, sampleName, polarity)

## S4 method for signature 'SRM'
plotSample(object, sampleName, polarity)

Arguments

object

a SRM object

sampleName

a character string of a valid sampleName

polarity

a character string of either pos or neg for positive and negative ionisation mode respectively

Value

a ggplot plot object


Plot SRM

Description

Plot SRM

Usage

plotSRM(object, index, type = "overlay")

## S4 method for signature 'SRM'
plotSRM(object, index, type = "overlay")

Arguments

object

a SRM object

index

a numeric value of the transition index to plot

type

a character string of either overlay or facet

Value

a ggplot plot object


Reduce Peaks

Description

Reduce detected peaks using a relative area threshold

Usage

reducePeaks(object, relative_area)

## S4 method for signature 'SRM'
reducePeaks(object, relative_area = 0.05)

Arguments

object

a SRM object

relative_area

a numeric value between 0 and 1, for the threshold of relative peak area

Value

a SRM object


Remove Sample

Description

Remove Sample

Usage

removeSample(object, sampleName)

## S4 method for signature 'SRM'
removeSample(object, sampleName)

Arguments

object

a SRM object

sampleName

a character string of a sampleName to remove

Value

a SRM object


Keep Transitions

Description

Keep Transitions

Usage

removeTransitions(object, index_out)

## S4 method for signature 'SRM'
removeTransitions(object, index_out = c())

Arguments

object

a SRM object

index_keep

a numeric vector of transition index to remove

Value

a SRM object


show-SRM

Description

show-SRM

Usage

## S4 method for signature 'SRM'
show(object)

Arguments

object

a SRM object


Smooth Chromatograms

Description

Smooth Chromatograms

Usage

smoothChrom(object, cf)

## S4 method for signature 'SRM'
smoothChrom(object, cf)

Arguments

object

a SRM object

cf

matrix, a coefficient matrix generated by MsCoreUtils::coefMA or MsCoreUtils::coefWMA

Value

a SRM object


SRM

Description

A S4 class to store single reaction monitoring (SRM) mass spectrometry (MS) data

Slots

meta

a tibble of a minimal amount of meta data.

transitions

a tibble of all transitions names

chroms

a tibble of retention time (rt) and intensity (int) values for all imported SRM chromatograms

peaks

a tibble of detected peaks

groups

a tibble of peak information for user defined groups

header

a tibble of formatted header data from mzR::header()


Accessor Methods for the SRM S4 class

Description

List all transitions

Usage

transitions(object)

## S4 method for signature 'SRM'
transitions(object)

Arguments

object

a SRM S4 object