The RamanEngine R6 class is a framework for parsing, processing, inspecting and storing Raman spectroscopic data.
Super class
StreamFind::CoreEngine
-> RamanEngine
Active bindings
raw_spectra
List of raw spectra
data.table
objects for each analysis.spectra
List of spectra
data.table
objects for each analysis.
Methods
Inherited methods
StreamFind::CoreEngine$add_analyses()
StreamFind::CoreEngine$add_blank_names()
StreamFind::CoreEngine$add_headers()
StreamFind::CoreEngine$add_metadata()
StreamFind::CoreEngine$add_replicate_names()
StreamFind::CoreEngine$add_results()
StreamFind::CoreEngine$add_settings()
StreamFind::CoreEngine$export()
StreamFind::CoreEngine$export_analyses()
StreamFind::CoreEngine$export_headers()
StreamFind::CoreEngine$export_settings()
StreamFind::CoreEngine$get_analyses()
StreamFind::CoreEngine$get_analysis_names()
StreamFind::CoreEngine$get_blank_names()
StreamFind::CoreEngine$get_files()
StreamFind::CoreEngine$get_formats()
StreamFind::CoreEngine$get_headers()
StreamFind::CoreEngine$get_history()
StreamFind::CoreEngine$get_number_analyses()
StreamFind::CoreEngine$get_replicate_names()
StreamFind::CoreEngine$get_results()
StreamFind::CoreEngine$get_results_names()
StreamFind::CoreEngine$get_settings()
StreamFind::CoreEngine$get_settings_names()
StreamFind::CoreEngine$get_types()
StreamFind::CoreEngine$get_workflow_overview()
StreamFind::CoreEngine$has_analyses()
StreamFind::CoreEngine$has_results()
StreamFind::CoreEngine$has_settings()
StreamFind::CoreEngine$import()
StreamFind::CoreEngine$import_analyses()
StreamFind::CoreEngine$import_headers()
StreamFind::CoreEngine$import_settings()
StreamFind::CoreEngine$load()
StreamFind::CoreEngine$print()
StreamFind::CoreEngine$print_analyses()
StreamFind::CoreEngine$print_headers()
StreamFind::CoreEngine$print_results()
StreamFind::CoreEngine$print_workflow()
StreamFind::CoreEngine$process()
StreamFind::CoreEngine$remove_headers()
StreamFind::CoreEngine$remove_results()
StreamFind::CoreEngine$remove_settings()
StreamFind::CoreEngine$run_app()
StreamFind::CoreEngine$run_workflow()
StreamFind::CoreEngine$save()
Method new()
Creates an R6 class RamanEngine. Child of CoreEngine R6 class.
Usage
RamanEngine$new(
files = NULL,
headers = NULL,
settings = NULL,
analyses = NULL,
results = NULL
)
Arguments
files
Vector with full paths of .asc files from Raman analyses.
headers
A named list with headers or a ProjectHeaders S3 class object. Each list element must have length one. There is no type restrictions except for name (must be type character length 1), author (must be type character length 1), file (must be type character length 1) and date (must be class POSIXct or class POSIXt length 1). See more information in
?ProjectHeaders
.settings
A named list of ProcessingSettings objects or a single ProcessingSettings object. The list names should match the call name of each ProcessingSettings object. Alternatively, a named list with call name, algorithm and parameters to be transformed and added as ProcessingSettings object.
settings
A ProcessingSettings S3 class object with the call name applicable to the processing method. Alternatively, a named list with
call
,algorithm
andparameters
to be transformed and used as ProcessingSettings S3 class object. When not given, settings for the processing method will be searched within the engine object.analyses
A numeric/character vector with the number/name of the analyses.
results
A named list of objects from processing methods.
Method get_spectra()
Gets a data.table
with spectra from analyses.
Usage
RamanEngine$get_spectra(
analyses = NULL,
rt = NULL,
shift = NULL,
minIntensity = 0,
raw_spectra = FALSE
)
Arguments
analyses
A numeric/character vector with the number/name of the analyses.
rt
Numeric of length two with the minimum and maximum retention time, in seconds.
shift
Numeric of length two with the minimum and maximum shift, in cm-1.
minIntensity
Numeric (length 1) with the minimum intensity.
raw_spectra
Logical of length one. Set to
TRUE
for parsing raw spectra not spectra results/processed.
Method add_files()
Adds analyses based on asc files. Note that when adding new files, any existing results are removed.
Method plot_spectra()
Plots spectra for given RamanAnalyses.
Usage
RamanEngine$plot_spectra(
analyses = NULL,
rt = NULL,
shift = NULL,
minIntensity = 0,
raw_spectra = FALSE,
xVal = "shift",
xLab = NULL,
yLab = NULL,
title = NULL,
cex = 0.6,
showLegend = TRUE,
colorBy = "analyses",
interactive = TRUE
)
Arguments
analyses
A numeric/character vector with the number/name of the analyses.
rt
Numeric of length two with the minimum and maximum retention time, in seconds.
shift
Numeric of length two with the minimum and maximum shift, in cm-1.
minIntensity
Numeric (length 1) with the minimum intensity.
raw_spectra
Logical of length one. Set to
TRUE
for parsing raw spectra not spectra results/processed.xVal
Character of length one. Possible are "rt" or "shift" for using the retention time or the shift as x axis, respectively.
xLab
A string with the title for the x axis.
yLab
A string with the title for the y axis.
title
A string with the title.
cex
Numeric (length 1) defining the scale of the legend for non interactive plotting.
showLegend
Logical (length 1). Set to
TRUE
to show legend.colorBy
A string defining how to legend the plot. Possible values are
analyses
,targets
(the default) orreplicates
.interactive
Logical (length 1). When
TRUE
, the data is plotted interactively using plotly.
Method plot_spectra_baseline()
Plots spectra corrected for given RamanAnalyses.
Usage
RamanEngine$plot_spectra_baseline(
analyses = NULL,
rt = NULL,
shift = NULL,
minIntensity = 0,
xVal = "shift",
xLab = NULL,
yLab = NULL,
title = NULL,
cex = 0.6,
showLegend = TRUE,
colorBy = "analyses",
interactive = TRUE
)
Arguments
analyses
A numeric/character vector with the number/name of the analyses.
rt
Numeric of length two with the minimum and maximum retention time, in seconds.
shift
Numeric of length two with the minimum and maximum shift, in cm-1.
minIntensity
Numeric (length 1) with the minimum intensity.
xVal
Character of length one. Possible are "rt" or "shift" for using the retention time or the shift as x axis, respectively.
xLab
A string with the title for the x axis.
yLab
A string with the title for the y axis.
title
A string with the title.
cex
Numeric (length 1) defining the scale of the legend for non interactive plotting.
showLegend
Logical (length 1). Set to
TRUE
to show legend.colorBy
A string defining how to legend the plot. Possible values are
analyses
,targets
(the default) orreplicates
.interactive
Logical (length 1). When
TRUE
, the data is plotted interactively using plotly.
Method plot_spectra_peaks()
Plots peaks from spectra from analyses.
Usage
RamanEngine$plot_spectra_peaks(
analyses = NULL,
legendNames = NULL,
title = NULL,
colorBy = "analyses",
showLegend = TRUE,
xlim = NULL,
ylim = NULL,
cex = 0.6,
xLab = NULL,
yLab = NULL,
interactive = TRUE
)
Arguments
analyses
A numeric/character vector with the number/name of the analyses.
legendNames
A character vector with the same length as the targets or
TRUE
orFALSE
for using the name in the added targets as legend of the plot.title
A string with the title.
colorBy
A string defining how to legend the plot. Possible values are
analyses
,targets
(the default) orreplicates
.showLegend
Logical (length 1). Set to
TRUE
to show legend.xlim
A length one or two numeric vector for setting the x limits of the plot.
ylim
A length one or two numeric vector for setting the y limits of the plot.
cex
Numeric (length 1) defining the scale of the legend for non interactive plotting.
xLab
A string with the title for the x axis.
yLab
A string with the title for the y axis.
interactive
Logical (length 1). When
TRUE
, the data is plotted interactively using plotly.
Method plot_chromatograms()
Plots chromatograms from analyses with spectra coupled to LC.
Usage
RamanEngine$plot_chromatograms(
analyses = NULL,
rt = NULL,
shift = NULL,
minIntensity = 0,
raw_spectra = FALSE,
xLab = NULL,
yLab = NULL,
title = NULL,
cex = 0.6,
showLegend = TRUE,
colorBy = "analyses",
interactive = TRUE
)
Arguments
analyses
A numeric/character vector with the number/name of the analyses.
rt
Numeric of length two with the minimum and maximum retention time, in seconds.
shift
Numeric of length two with the minimum and maximum shift, in cm-1.
minIntensity
Numeric (length 1) with the minimum intensity.
raw_spectra
Logical of length one. Set to
TRUE
for parsing raw spectra not spectra results/processed.xLab
A string with the title for the x axis.
yLab
A string with the title for the y axis.
title
A string with the title.
cex
Numeric (length 1) defining the scale of the legend for non interactive plotting.
showLegend
Logical (length 1). Set to
TRUE
to show legend.colorBy
A string defining how to legend the plot. Possible values are
analyses
,targets
(the default) orreplicates
.interactive
Logical (length 1). When
TRUE
, the data is plotted interactively using plotly.
Method plot_chromatograms_peaks()
Plots peaks from chromatograms from analyses.
Usage
RamanEngine$plot_chromatograms_peaks(
analyses = NULL,
chromatograms = NULL,
legendNames = NULL,
title = NULL,
colorBy = "targets",
showLegend = TRUE,
xlim = NULL,
ylim = NULL,
cex = 0.6,
xLab = NULL,
yLab = NULL,
interactive = TRUE
)
Arguments
analyses
A numeric/character vector with the number/name of the analyses.
chromatograms
A character or integer vector with the ID (i.e. name) or the index of the chromatograms.
legendNames
A character vector with the same length as the targets or
TRUE
orFALSE
for using the name in the added targets as legend of the plot.title
A string with the title.
colorBy
A string defining how to legend the plot. Possible values are
analyses
,targets
(the default) orreplicates
.showLegend
Logical (length 1). Set to
TRUE
to show legend.xlim
A length one or two numeric vector for setting the x limits of the plot.
ylim
A length one or two numeric vector for setting the y limits of the plot.
cex
Numeric (length 1) defining the scale of the legend for non interactive plotting.
xLab
A string with the title for the x axis.
yLab
A string with the title for the y axis.
interactive
Logical (length 1). When
TRUE
, the data is plotted interactively using plotly.