plotUtils {rNMR} | R Documentation |
Utilities for plotting one and two-dimensional spectra in rNMR.
draw2D(in.folder = fileFolder[[wc()]], w1Range = in.folder$graphics.par$usr[3:4], w2Range = in.folder$graphics.par$usr[1:2], pos.zlim = c(in.folder$file.par$noise_est * in.folder$graphics.par$clevel, in.folder$file.par$noise_est * in.folder$graphics.par$clevel * in.folder$graphics.par$nlevels), neg.zlim = -(rev(pos.zlim)), type = in.folder$graphics.par$type, pos.color = in.folder$graphics.par$pos.color, neg.color = in.folder$graphics.par$neg.color, nlevels = in.folder$graphics.par$nlevels, conDisp = in.folder$graphics.par$conDisp, xlab = paste(in.folder$file.par$nucleus[2], "PPM", sep = " "), ylab = paste(in.folder$file.par$nucleus[1], "PPM", sep = " "), main = in.folder$file.par$user_title, roiMax = globalSettings$roiMax, add = FALSE, axes = TRUE, ...) drawNMR(in.folder = fileFolder[[wc()]], w1Range, w2Range, pos.zlim, neg.zlim, type, pos.color, neg.color, nlevels, conDisp, bg, fg, col.axis, col.lab, col.main, col.sub, col, xlab = NULL, ylab = NULL, main = in.folder$file.par$user_title, add = FALSE, p.window = "main", axes = TRUE, offset = 0, ...) plot1D(in.folder = fileFolder[[wc()]], w1Range = in.folder$graphics.par$usr[3:4], w2Range = in.folder$graphics.par$usr[1:2], col = in.folder$graphics.par$proj.color, type = in.folder$graphics.par$type, xlab = NULL, ylab = NULL, main = in.folder$file.par$user_title, roiMax = globalSettings$roiMax, add = FALSE, axes = TRUE, offset = 0, ...) plot2D(in.folder = fileFolder[[wc()]], w1Range = in.folder$graphics.par$usr[3:4], w2Range = in.folder$graphics.par$usr[1:2], pos.zlim = c(in.folder$file.par$noise_est * in.folder$graphics.par$clevel, in.folder$file.par$noise_est * in.folder$graphics.par$clevel * in.folder$graphics.par$nlevels), neg.zlim = -(rev(pos.zlim)), type = in.folder$graphics.par$type, pos.color = in.folder$graphics.par$pos.color, neg.color = in.folder$graphics.par$neg.color, nlevels = in.folder$graphics.par$nlevels, conDisp = in.folder$graphics.par$conDisp, xlab = paste(in.folder$file.par$nucleus[2]), ylab = paste(in.folder$file.par$nucleus[1]), main = in.folder$file.par$user_title, add = FALSE, axes = TRUE, ...) proj1D(in.folder = fileFolder[[wc()]], w1Range = in.folder$graphics.par$usr[3:4], w2Range = in.folder$graphics.par$usr[1:2], col = in.folder$graphics.par$proj.color, filter = globalSettings$filter, proj.direct = globalSettings$proj.direct, type = globalSettings$proj.type, xy = NULL, ...) ucsf1D(file.name = NULL, w2Range = NULL, file.par = NULL) ucsf2D(file.name = NULL, w1Range = NULL, w2Range = NULL, file.par = NULL) ucsfHead(file.name = NULL, print.info = TRUE)
in.folder |
list; file and graphics parameters for the file to be plotted
as listed in |
w1Range |
numeric vector; chemical shift range in the indirect dimension,
default is the most recent setting used with the file, the format is
|
w2Range |
numeric vector; chemical shift range in the direct dimension,
default is the most recent setting used with the file. The format is
|
pos.zlim |
numeric vector; min and max positive intensities to be
displayed, default is the most recent setting used with the file. The
format is |
neg.zlim |
numeric vector; min and max negative intensities to be
displayed, default is the most recent setting used with the file. The
format is |
type |
see |
pos.color |
character string; color for positive contours, default is the
most recent setting for the file, see |
neg.color |
character string; color for negative contours, default is the
most recent setting for the file, see |
nlevels |
numeric; the number of contour intervals to be drawn, the default is the most recent setting used for the file. |
conDisp |
logical vector; |
xlab |
see |
ylab |
see |
main |
see |
roiMax |
logical; if |
add |
logical; if |
axes |
logical; if |
bg |
see |
fg |
see |
col.axis |
see |
col.lab |
see |
col.main |
see |
col.sub |
see |
col |
see |
p.window |
character string; the window to be used for the plot, can be
|
offset |
numeric; the percentage of the total z range with which to displace a spectrum. This is used to create stacked 1D spectra. |
filter |
function; a vector capable function (e.g. min, max, sd) used to filter 2D data into a 1D projection, non function arguments prompt users to select a slice. |
proj.direct |
numeric; |
xy |
numeric; x and y coordinates indicating the slice to display. The optional argument may be supplied as an alternative to interactive slice selection. |
file.name |
character string; full path for the file to be read,
|
file.par |
list; file parameters as found in the header of the ucsf file
designated by the |
... |
additional graphics parameters can be passed to |
print.info |
logical; prints header information if |
draw2D
Draws a 2D NMR spectrum from a binary connection. This
function replaces plot2D
when creating ROI subplot and multiple file
windows, as it is more efficient for batch operations.
drawNMR
Wrapper and routing function for lower level plotting functions in rNMR.
plot1D
and plot2D
Draw sparky (ucsf) format spectra from a binary connection.
proj1D
Projects a 2D spectrum into a single dimension.
ucsf1D
and ucsf2D
Read sparky (ucsf) format spectra and return data within the specified range. The "data" section
ucsfHead
Read header information from a sparky (ucsf) format
spectrum and return data used to populate "file.par" section of
fileFolder
.
ucsf1D()
and ucsf2D()
return a list containing:
file.par
- Header information for the spectrum including file name,
nuclei, number of dimensions, spectrum width, etc.
w1
- Chemical shifts in the indirect dimension.
w2
- Chemical shifts in the direct dimension.
data
- The data from the spectrum, as a matrix of intensities for 2D
spectra or a vector for 1D slices and plots. The first data point in a
matrix of 2D intensities, [1, 1], corresponds to the downfield-most point,
in both dimensions, for the spectrum. The last data point in the matrix
corresponds to the upfield-most point, in both dimensions, for the spectrum.
In other words, if you traverse the matrix by rows, data points in the
matrix start at the bottom-left of the spectrum and move up and to the right
(as the spectrum would normally be viewed). See import
for
details on the contents of the ROI table, ROI summary, and peak list
objects.
ucsfHead()
returns a list containing the same fields present in the
"file.par" section of fileFolder
.
Ian A. Lewis ialewis@nmrfam.wisc.edu, Seth C. Schommer schommer@nmrfam.wisc.edu
toolkit
for other rNMR utility functions.