plotBatmanFitHR: Plot BATMAN Metabolite Fit of NMR Spectra in Original...

Description Usage Arguments See Also Examples

View source: R/plotBatmanFitHR.R

Description

This function plots a high resolution BATMAN fit results (without down sampling), and save figure to pdf file in user specified directory. For multiple spectra analysis, the file name is in the format of "specFitHR_i_metaName.pdf", where i is the spectrum number in the figure and the metabolite name will be shown in place of metaName if supplied. The figure file will not be overwritten if it already exists. A prefix can be given to the file name for new saves.

Usage

1
2
3
 plotBatmanFitHR(BM, xfrom, xto, yfrom, yto, metaName, saveFig = TRUE, 
                 saveFigDir = BM$outputDir, prefixFig, rerun = FALSE, 
                 overwriteFig = FALSE, showPlot)

Arguments

BM

batman output data frame.

xfrom

The start ppm value to plot. Default is set to the start ppm value of the whole processed range.

xto

The end ppm value to plot. Default is set to the end ppm value of the whole processed range.

yfrom

The start value of vertical axis to plot. Default is set to 0.

yto

The end value of vertical axis to plot. Default is set to the maximum value of the spectrum point in display.

metaName

Individual metabolite fit will also be shown in the plot if a metabolite name is given. Only one metabolite name can be given, if missing from input all metabolites will be plotted.

saveFig

Save figure(s) to pdf file(s) if set TRUE. The default is TRUE.

saveFigDir

Save figure(s) in this directory. The default is the output directory of BM.

prefixFig

Add prefix to each saved figure name. The default is no prefix.

rerun

Set to FALSE to plot batman result, and TRUE to plot batmanrerun result.

overwriteFig

Overwrite saved figure file in pdf format if overwriteFig = TRUE. If set to FALSE, a new figure file with system time as postfix will be created. The default is FALSE.

showPlot

If set FALSE, no plot will be shown on display, the pdf file(s) for the figure plot(s) will be created in output folder. If missing from input, for windows and osx operating systems, it will be set to TRUE, for the rest operating systems, it will be set to FALSE automatically.

See Also

batman, batmanrerun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(batman)
## Run BATMAN fit
if(interactive()) 
{
bm<-batman()
## Plot batman Fit in its original resolution if the option parameter  
## is set to 1 for "Save metabolites fit same as the original spectrum  
## resolution (1/0)" in "batmanOptions.txt", .
plotBatmanFitHR(bm)
}

batman documentation built on May 2, 2019, 6:13 p.m.