plotting: Plot assignment results

plotAdductDistR Documentation

Plot assignment results

Description

Plot molecular formula assignment results.

Usage

plotAdductDist(assignment)

## S4 method for signature 'Assignment'
plotAdductDist(assignment)

plotComponent(
  assignment,
  component,
  iteration,
  type = c("selected", "all"),
  label_size = 3,
  axis_offset = 0.1,
  border = NA,
  highlight = NA
)

## S4 method for signature 'Assignment'
plotComponent(
  assignment,
  component,
  iteration,
  type = c("selected", "all"),
  label_size = 3,
  axis_offset = 0.1,
  border = NA,
  highlight = NA
)

plotFeatureComponents(
  assignment,
  feature,
  iteration,
  type = c("all", "selected"),
  max_components = 6,
  label_size = 3,
  axis_offset = 0.1
)

## S4 method for signature 'Assignment'
plotFeatureComponents(
  assignment,
  feature,
  iteration,
  type = c("all", "selected"),
  max_components = 6,
  label_size = 2,
  axis_offset = 0.05
)

plotSpectrum(assignment, MF)

## S4 method for signature 'Assignment'
plotSpectrum(assignment, MF)

Arguments

assignment

an object of S4 class Assignment

component

component number to plot

iteration

the assignment iteration of the component or components

type

the graph type to return. selected returns the assignment graph after component selection. all returns all assignment components.

label_size

node label size

axis_offset

axis proportion by which to increase axis limits. Prevents cut off of node labels.

border

specify a plot border colour

highlight

specify a feature node to highlight

feature

the m/z feature to plot

max_components

themaximum number of components to plot

MF

the assigned molecular formula to plot

Details

  • plotComponent - Plot a molecular formula component graph.

  • plotFeatureComponents - Plot the possible component graphs for a given feature.

  • plotAdductDist - Plot frequency distributions of the assigned adducts.

  • plotSpectrum - Plot the spectrum of an assigned molecular formula.

Examples

library(ggraph)
plan(future::sequential)
p <- assignmentParameters('FIE-HRMS')

mf_assignments <- assignMFs(feature_data,p)

## Plot a component
plotComponent(mf_assignments,1,'A&I1')

## Plot the components for a feature
plotFeatureComponents(mf_assignments,'n191.01962','A&I1')

## Plot the adduct distributions
plotAdductDist(mf_assignments)

## Plot the spectrum of an assigned molecular formula
plotSpectrum(mf_assignments,'C6H8O7')

jasenfinch/MFassign documentation built on Feb. 2, 2024, 11:21 a.m.