peakPatterns {MALDIrppa} | R Documentation |
Display peak presence/absence patterns
Description
This function displays the patterns of peak presence and absence in an intensity matrix as generated from intensityMatrix
.
Usage
peakPatterns(x, abs.lab = NA, barplot = TRUE,
axis.lab = c("m/z", "Index"), bar.col = "red3",
cell.col = c("white", "dodgerblue"), grid = FALSE,
grid.col = "black", grid.lty = "dotted", cex.axis = 0.5,
cex.lab = 0.5, ...)
Arguments
x |
A |
abs.lab |
Unique label used to denote peak absence in |
barplot |
Logical value indicating whether a barplot of relative peak frequency across samples is displayed ( |
axis.lab |
Vector of axis labels in the |
bar.col |
Colour of the bars in the barplot. |
cell.col |
Vector of colours for the table cells (format |
grid |
Logical value indicating whether gridlines are added ( |
grid.col |
Colour of the gridlines ( |
grid.lty |
Style of the gridlines ( |
cex.axis |
Axis tick labels scaling factor relative to default. |
cex.lab |
Axis labels scaling factor relative to default. |
... |
Other arguments. |
Details
The peak presence/absence patterns are displayed by rows from the first (top) to the last (bottom) sample in the data set x
over the range of common m/z points. Positive peaks are by default represented by coloured cells whereas zero or absent peaks are left blank. A barplot on the top margins shows the relative frequency of a peak at each m/z point across samples.
Value
No return value, graphical output.
See Also
See intensityMatrix
.
Examples
# Load example data
data(spectra) # list of MassSpectra class objects
data(type) # metadata
# Some pre-processing
sc.results <- screenSpectra(spectra,meta=type)
spectra <- sc.results$fspectra # filtered mass spectra
type <- sc.results$fmeta # filtered metadata
spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)
peaks <- detectPeaks(spectra)
peaks <- alignPeaks(peaks, minFreq = 0.8)
# Display patterns across all data
peakPatterns(peaks)
# Check results within isolate 280
peakPatterns(peaks[type$Isolate=="280"])