analyzeIntensityCutoffsCumul: Calculate effects of applying cumulative intensity-level...

Description Usage Arguments Value See Also

View source: R/analyzeIntensityCutoffsCumul.R

Description

Given a table of total intensities per mass peak, produced by function sumPeakIntensities, calculate the number of peaks retained if a minimum intensity cutoff is applied (either as absolute value or as percentage of the TOTAL intensity value observed) to the cumulative sum of the intensity values. This has similarities to the N50 metric applied to genome assemblies.

Usage

1
2
3
analyzeIntensityCutoffsCumul(df, by = c("intensities", "counts"),
  value = NULL, pc = 1, plot = TRUE, log.plot = TRUE,
  report.peaks = FALSE)

Arguments

df

data.frame of three columns: peaks, counts, intensities, produced by function sumPeakIntensities, or by external script msicsvprofiler.pl if matrix is too large to import into R

by

string; Apply cutoff by intensities or counts (default: "intensities")

value

numeric; Minimum intensity/counts cutoff to apply (default: NULL)

pc

numeric; Percent intensity/counts cutoff to apply (ignored if value supplied). For example, 50 intensity, whose combined total intensity accounts for 50 intensity in the data (default: 1)

plot

logical; Plot distribution? (default: TRUE)

log.plot

logical; Plot cumulative values with log scale (default: TRUE)

report.peaks

logical: Report list of peaks above the cutoff, as vector (default: FALSE)

Value

data.frame summarizing the number of peaks above the specified cutoff and a plot of the distribution with cutoff overlaid as a vertical line. If option report.peaks is used, then the a vector of peaks above the cutoff is returned instead.

See Also

analyzeIntensityCutoffsDistr does a similar analysis but without taking cumulative sums, instead using the empirical CDF of the values.

sumPeakIntensities function to generate the data.frame of total intensities and pixel counts per peak from a msimat object.


kbseah/mass2adduct documentation built on June 9, 2021, 9:20 p.m.