pickUtils {rNMR}R Documentation

rNMR peak picking utilities

Description

Utilities used for or related to peak picking in rNMR.

Usage

appendPeak(newList, oldList)
isNoise(x, data, thresh = -0.15)
localMax(x, thresh, noiseFilt)
matchShift(inFolder = fileFolder[[wc()]], w1 = NULL, w2 = NULL, w1.pad = 0, 
	w2.pad = 0, invert = FALSE, return.inc = FALSE, return.seq = FALSE,
	overRange = FALSE)
maxShift(inFile, invert = FALSE, conDisp = c(TRUE, TRUE), massCenter = FALSE)
pdisp(col, cex, pch, pos, offset, ...)
peakPick(fileName = currentSpectrum, inFile = NULL, w1Range = NULL, 
	w2Range = NULL, append = FALSE, internal = FALSE, ...)
peakPick1D(fileName = currentSpectrum, inFile = NULL, w2Range = NULL, 
	w2Gran = 2, noiseFilt = globalSettings$peak.noiseFilt, maxOnly = FALSE, ...)
peakPick2D(fileName = currentSpectrum, inFile = NULL, w1Range = NULL, 
	w2Range = NULL, fancy = FALSE, noiseFilt = globalSettings$peak.noiseFilt, 
	maxOnly = FALSE, ...)
peakVolume(inFile, gran = 200, c.vol = FALSE, baselineCorr = FALSE)
regionMax(fileName = currentSpectrum, redraw = TRUE, noiseCheck = TRUE)
shiftToROI(shiftList = NULL, w1Delta = 1, w2Delta = 0.05)

Arguments

newList

data.frame; peak list to append.

oldList

data.frame; peak list to be appended.

x

numeric; a candidate signal (isNoise) or a matrix containing the range of data being analyzed (localMax).

data

numeric vector; the field of data being tested.

thresh

numeric; noise threshold. For isNoise, values can range from 0 (no filtering) to -1 (no data returned). For localMax, this indicates the minimum level to be included.

noiseFilt

integer, either 0, 1 or 2; 0 does not apply a noise filter, 1 applies a mild filter (adjacent points in the direct dimension must be above the noise threshold), 2 applies a strong filter (all adjacent points must be above the noise threshold).

inFolder

File and graphics parameters for desired spectra as listed in fileFolder.

w1

numeric (vector); w1 chemical shifts to be matched.

w2

numeric (vector); w2 chemical shifts to be matched.

w1.pad

integer; number of adjacent points to return in addition to the matched shifts in the indirect dimension.

w2.pad

integer; number of adjacent points to return in addition to the matched shifts in the direct dimension.

invert

logical; if TRUE, shifts are inverted (reflected across the center of the spectrum) before being returned. R plots must be sorted by increasing x and y values. To meet this requirement all NMR data is inverted before plotting.

return.inc

logical; if TRUE, returns the index for the shift as a point in the data matrix, if FALSE, returns the chemical shift.

return.seq

logical; if TRUE, returns the entire sequence of shifts covered by the w1 and w2 ranges provided, if FALSE returns the range for the matched shifts.

overRange

logical; TRUE returns NA if shifts are outside the spectral window; FALSE returns the closest match to the shifts provided.

conDisp

logical vector; c(TRUE, TRUE) returns the chemical shift at the absolute maximum intensity, c(TRUE, FALSE) returns the chemical shift at the maximum intensity, c(TRUE, FALSE) returns the chemical shift at the minimum intensity.

massCenter

logical; if TRUE, returns the geometric center for the data, if FALSE, returns shifts at the max/min signal observed.

col

character string; color for peak markers, see colors for the many color options.

cex

numeric; symbol expansion, see points.

pch

numeric or character; symbol used for peak markers, see points.

pos

numeric; specifies position for peak label text, see text.

offset

numeric; peak label offset, see text.

...

Additional graphics (pdisp, see points) or peak picking arguments (see addArg).

fileName

character string or vector; spectrum name(s) as they appear in fileFolder.

inFile

list; file parameters and data for file being analyzed, the output from the main plot window for the ed function.

w1Range

numeric; w1 chemical shift range (c(downfield,upfield)) to be used.

w2Range

numeric; w2 chemical shift range (c(downfield,upfield)) to be used.

append

logical; if TRUE, appends peaks to the previous list.

internal

logical; if TRUE, returns the list without assigning it to fileFolder, if FALSE, assigns the list to fileFolder.

w2Gran

integer; granularity of search space used for finding local maxima, smaller values are more exhaustive, bigger values suppress noise.

fancy

logical; if FALSE, implements a basic peak picker that returns local maxima only, this is fastest; if TRUE, determines chemical shifts of peaks, groups multiplets, and measures line width and volume.

gran

integer; granularity of contour fitting.

maxOnly

logical; if TRUE, only the maximum peak is returned.

c.vol

logical; if TRUE, returns stacked ellipsoid volumes, if FALSE returns the sum of the visible data (recommended).

baselineCorr

logical; performs local baseline correction for 1D spectra if TRUE.

redraw

logical; if TRUE, the spectrum is refreshed before exiting.

noiseCheck

logical; if TRUE, peak is not returned if its intensity is below the noise threshold (as specified by the thres.1D parameter in globalSettings for 1D spectra or by the contour level settings for 2D spectra).

shiftList

data.frame; chemical shift table containing an w1 and an w2 column. A column named "Code" or "Assignment" will be used for the ROI names if present.

w1Delta

numeric; width of the desired ROI in the w1 dimension.

w2Delta

numeric; width of the ROI in the w2 dimension.

Details

appendPeak

Combines two peak lists. The only requirement is that each peak list must contain "w1", "w2", and "Height" columns.

isNoise

A simple filter for detecting noise signals in 1D data. This function is an obvious area for future improvement, as the filter currently excludes broad signals.

localMax

Finds points in a matrix that are larger than all surrounding points, useful for peak picking algorithms.

matchShift

Looks in the provided spectrum for the closest matches (actual chemical shifts) to the chemical shifts provided. If more than one shift is provided, the function returns the shifts matched over the range of given shifts.

maxShift

Finds the chemical shifts at the maximum, absolute maximum, or minimum intensity for the data provided.

peakPick

Wrapper function for implementing 1D and 2D peak picking in rNMR.

pdisp

Displays the peak list for the current spectrum. Note that this function does not turn the peak display on, so peaks will only be displayed until the next plot refresh.

peakPick1D

1D peak picking algorithm utilizing local maxima (hill climbing method).

peakPick2D

2D peak picking algorithm utilizing local maxima (hill climbing method).

peakVolume

Estimates volumes of 2D peaks using the sum of the visible data or stacked ellipsoids.

regionMax

Finds the chemical shifts at the absolute maximum intensity within a region defined by the user interactively.

shiftToROI

Converts a peak list to an roiTable. See roi for more information on ROIs.

Value

appendPeak

returns the newly appended peak list.

isNoise

returns TRUE if the data provided is determined to be noise.

localMax

returns a vector of points defining the local maxima.

matchShift

returns the range of chemical shifts, or indices, for the closest matching w1 and w2 shifts found in a spectrum.

maxShift

returns the chemical shifts for the max/min intensity.

peakPick

returns a new peak list for the w1/w2 ranges provided.

peakPick1D

returns a new peak list for the w2 range provided.

peakPick2D

returns a new peak list for the w1/w2 ranges provided.

peakVolume

returns volume for 2D peaks and area of 1D peaks.

regionMax

returns the chemical shifts for the absolute maximum intensity within the designated region.

shiftToROI

returns an roiTable.

Author(s)

Ian A. Lewis ialewis@nmrfam.wisc.edu, Seth C. Schommer schommer@nmrfam.wisc.edu

See Also

toolkit for other rNMR utility functions.


[Package rNMR version 1.1.9 Index]