ms1_plots: Make the Previous and Next MS1 Plots

View source: R/ms1_plots.R

ms1_plotsR Documentation

Make the Previous and Next MS1 Plots

Description

Generates a list with two plots: previous and next MS1 within an isolation window, and labeled with isotopes.

Usage

ms1_plots(
  ScanMetadata,
  ScanNumber,
  Window = 5,
  Sequence = NULL,
  IsotopicPercentageFilter = 10,
  Interactive = TRUE,
  AlternativeGlossary = NULL
)

Arguments

ScanMetadata

Object of the scan_metadata class from get_scan_metadata

ScanNumber

Integer indicating which MS2 scan number should have its previous and next MS1 plots made.

Window

Size of the MS1 plotting window from the Precursor M/Z in units of M/Z. Default is 5 M/Z.

Sequence

Protein sequence for annotating experimental M/Z, if different from the ID data. Default is NULL.

IsotopicPercentageFilter

Percentage written as a number between 0-100 to filter potential isotopes by relative abundance. Default is 10.

Interactive

If True, an interactive plotly graphic will be returned. If False, a static ggplot graphic will be returned. Default is FALSE.

AlternativeGlossary

Try a different glossary. See system.file("extdata", "Unimod_v20220602.csv", package = "pspecterlib) for formatting.

Details

Two plots will be returned in a list. The first is the previous MS1, and the second is the next MS1.

Examples

## Not run: 

# Test with bottom up data
MS1_Interactive <- ms1_plots(ScanMetadata = BU_ScanMetadata, ScanNumber = 31728, Window = 5,
                            Sequence = NULL, Interactive = TRUE, IsotopicPercentageFilter = 10)
MS1_Static <- ms1_plots(ScanMetadata = BU_ScanMetadata, ScanNumber = 31728, Window = 5,
                      Sequence = NULL, Interactive = FALSE, IsotopicPercentageFilter = 10)

# See a previous MS1 with interactivity
MS1_Interactive[[1]]

# See a next MS1 statically
MS1_Static[[2]]

# Try with a modified sequence 
MS1_Interactive2 <- ms1_plots(ScanMetadata = BU_ScanMetadata, ScanNumber = 31728, Window = 5,
                              Sequence = "IGA[Acetyl]VGGTENVSLTQSQMPAHNHLVAASTVSGTVKPLANDIIGAGLNK", 
                              Interactive = TRUE, IsotopicPercentageFilter = 10)


## End(Not run)


EMSL-Computing/pspecterlib documentation built on Jan. 28, 2024, 8:13 p.m.