Title: | Tools for Pre-Processing Emission-Excitation-Matrix (EEM) Fluorescence Data |
---|---|
Description: | Provides various tools for preprocessing Emission-Excitation-Matrix (EEM) for Parallel Factor Analysis (PARAFAC). Different methods are also provided to calculate common metrics such as humification index and fluorescence index. |
Authors: | Philippe Massicotte [aut, cre] |
Maintainer: | Philippe Massicotte <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.1.9000 |
Built: | 2024-10-24 03:44:30 UTC |
Source: | https://github.com/pmassicotte/eemr |
Simple absorbance spectra used to test package's functions.
data("absorbance")
data("absorbance")
A data frame with 711 rows and 4 variables
wavelength. Wavelengths used for measurements (190-900 nm.)
absorbance
data("absorbance") plot(absorbance$wavelength, absorbance$sample1, type = "l", xlab = "Wavelengths", ylab = "Absorbance per meter" ) lines(absorbance$wavelength, absorbance$sample2, col = "blue") lines(absorbance$wavelength, absorbance$sample3, col = "red")
data("absorbance") plot(absorbance$wavelength, absorbance$sample1, type = "l", xlab = "Wavelengths", ylab = "Absorbance per meter" ) lines(absorbance$wavelength, absorbance$sample2, col = "blue") lines(absorbance$wavelength, absorbance$sample3, col = "red")
eem constructor
eem(data)
eem(data)
data |
A list containing "file", "x", "em", "ex". |
An object of class eem
containing:
sample The sample name of the eem.
file The filename of the eem.
location Directory of the eem.
x A matrix with fluorescence values.
em Emission vector of wavelengths.
ex Excitation vector of wavelengths.
Function to bind EEMs that have been loaded from different folders or have been processed differently.
eem_bind(...)
eem_bind(...)
... |
One or more object of class |
An object of eemlist
.
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem <- eem_bind(eem, eem)
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem <- eem_bind(eem, eem)
The biological fluorescence index (BIX) is calculated by dividing the fluorescence at excitation 310 nm and emission at 380 nm (ex = 310, em = 380) by that at excitation 310 nm and emission at 430 nm (ex = 310, em = 430).
eem_biological_index(eem, verbose = TRUE)
eem_biological_index(eem, verbose = TRUE)
eem |
An object of class |
verbose |
Logical determining if additional messages should be printed. |
An object of class eemlist
.
A data frame containing the biological index (BIX) for each eem.
Different excitation and emission wavelengths are often used to measure
EEMs. Hence, it is possible to have mismatchs between measured wavelengths
and wavelengths used to calculate specific metrics. In these circumstances,
EEMs are interpolated using the interp2
function from the
parcma
library. A message warning the user will be prompted if data
interpolation is performed.
Huguet, A., Vacher, L., Relexans, S., Saubusse, S., Froidefond, J. M., & Parlanti, E. (2009). Properties of fluorescent dissolved organic matter in the Gironde Estuary. Organic Geochemistry, 40(6), 706-719.
doi:10.1016/j.orggeochem.2009.03.002
file <- system.file("extdata/cary/scans_day_1/", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_biological_index(eem)
file <- system.file("extdata/cary/scans_day_1/", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_biological_index(eem)
Extract fluorescence peaks
eem_coble_peaks(eem, verbose = TRUE)
eem_coble_peaks(eem, verbose = TRUE)
eem |
An object of class |
verbose |
Logical determining if additional messages should be printed. |
According to Coble (1996), peaks are defined as follow:
Peak B: ex = 275 nm, em = 310 nm
Peak T: ex = 275 nm, em = 340 nm
Peak A: ex = 260 nm, em = 380:460 nm
Peak M: ex = 312 nm, em = 380:420 nm
peak C: ex = 350 nm, em = 420:480 nm
Given that peaks A, M and C are not defined at fix emission wavelength, the maximum fluorescence value in the region is extracted.
An object of class eemlist
.
A data frame containing peaks B, T, A, M and C for each eem. See details for more information.
Different excitation and emission wavelengths are often used to measure
EEMs. Hence, it is possible to have mismatchs between measured wavelengths
and wavelengths used to calculate specific metrics. In these circumstances,
EEMs are interpolated using the interp2
function from the
parcma
library. A message warning the user will be prompted if data
interpolation is performed.
Coble, P. G. (1996). Characterization of marine and terrestrial DOM in seawater using excitation-emission matrix spectroscopy. Marine Chemistry, 51(4), 325-346.
doi:10.1016/0304-4203(95)00062-3
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_coble_peaks(eem)
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_coble_peaks(eem)
Cut emission and/or excitation wavelengths from EEMs
eem_cut(eem, ex, em, exact = TRUE, fill_with_na = FALSE)
eem_cut(eem, ex, em, exact = TRUE, fill_with_na = FALSE)
eem |
An object of class |
ex |
A numeric vector of excitation wavelengths to be removed. |
em |
A numeric vector of emission wavelengths to be removed. |
exact |
Logical. If TRUE, only wavelengths matching |
fill_with_na |
Logical. If TRUE, fluorescence values at specified wavelengths will be replaced with NA. If FALSE, these values will be removed. |
An object of class eemlist
.
# Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Cut few excitation wavelengths eem <- eem_cut(eem, ex = c(220, 225, 230, 230)) plot(eem) eem <- eem_read(file, import_function = "cary") eem <- eem_cut(eem, em = 350:400, fill_with_na = TRUE) plot(eem)
# Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Cut few excitation wavelengths eem <- eem_cut(eem, ex = c(220, 225, 230, 230)) plot(eem) eem <- eem_read(file, import_function = "cary") eem <- eem_cut(eem, em = 350:400, fill_with_na = TRUE) plot(eem)
Export EEMs to Matlab
eem_export_matlab(file, ...)
eem_export_matlab(file, ...)
file |
The .mat file name where to export the structure. |
... |
One or more object of class |
The function exports EEMs into PARAFAC-ready Matlab .mat
file
usable by the drEEM toolbox.
A structure named OriginalData
is created and contains:
The number of eems.
The number of excitation wavelengths.
The number of emission wavelengths.
A vector containing excitation wavelengths.
A vector containing emission wavelengths.
A 3D matrix (nSample X nEx X nEm) containing EEMs.
sample_name
The list of sample names (i.e. file names) of the
imported EEMs.
eemR
uses R.Matlab
to export the
the fluorescence data into a matfile. However, there is currently a bug in
the latter package that require the user to reshape the exported data once
in Matlab. This can be done using the following command:
load('OriginalData.mat'); OriginalData.X = reshape(OriginalData.X,
OriginalData.nSample, OriginalData.nEm, OriginalData.nEx)
file <- system.file("extdata/cary/", package = "eemR") eem <- eem_read(file, recursive = TRUE, import_function = "cary") export_to <- paste(tempfile(), ".mat", sep = "") eem_export_matlab(export_to, eem)
file <- system.file("extdata/cary/", package = "eemR") eem <- eem_read(file, recursive = TRUE, import_function = "cary") export_to <- paste(tempfile(), ".mat", sep = "") eem_export_matlab(export_to, eem)
Extract EEM samples
eem_extract(eem, sample, keep = FALSE, ignore_case = FALSE, verbose = TRUE)
eem_extract(eem, sample, keep = FALSE, ignore_case = FALSE, verbose = TRUE)
eem |
An object of class |
sample |
Either numeric of character vector. See |
keep |
logical. If TRUE, the specified |
ignore_case |
Logical, should sample name case should be ignored (TRUE) or not (FALSE). Default is FALSE. |
verbose |
Logical determining if removed/extracted eems should be printed on screen. |
sample
argument can be either numeric or character vector. If
it is numeric, samples at specified index will be removed.
If sample
is character, regular expression will be used and all
sample names that have a partial or complete match with the expression will
be removed. See examples
for more details.
An object of class eemlist
.
folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") eems # Remove first and third samples eem_extract(eems, c(1, 3)) # Remove everything except first and third samples eem_extract(eems, c(1, 3), keep = TRUE) # Remove all samples containing "3" in their names. eem_extract(eems, "3") # Remove all samples containing either character "s" or character "2" in their names. eem_extract(eems, c("s", "2")) # Remove all samples containing "blank" or "nano" eem_extract(eems, c("blank", "nano"))
folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") eems # Remove first and third samples eem_extract(eems, c(1, 3)) # Remove everything except first and third samples eem_extract(eems, c(1, 3), keep = TRUE) # Remove all samples containing "3" in their names. eem_extract(eems, "3") # Remove all samples containing either character "s" or character "2" in their names. eem_extract(eems, c("s", "2")) # Remove all samples containing "blank" or "nano" eem_extract(eems, c("blank", "nano"))
Extract blank EEM
eem_extract_blank(eem, average = TRUE)
eem_extract_blank(eem, average = TRUE)
eem |
An object of class |
average |
Logical. If TRUE blank EEMs will be averaged |
An object of class eemlist
.
Calculate the fluorescence index (FI)
eem_fluorescence_index(eem, verbose = TRUE)
eem_fluorescence_index(eem, verbose = TRUE)
eem |
An object of class |
verbose |
Logical determining if additional messages should be printed. |
An object of class eemlist
.
A data frame containing fluorescence index (FI) for each eem.
Different excitation and emission wavelengths are often used to measure
EEMs. Hence, it is possible to have mismatchs between measured wavelengths
and wavelengths used to calculate specific metrics. In these circumstances,
EEMs are interpolated using the interp2
function from the
parcma
library. A message warning the user will be prompted if data
interpolation is performed.
https://doi.wiley.com/10.4319/lo.2001.46.1.0038
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_fluorescence_index(eem)
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_fluorescence_index(eem)
The fluorescence humification index (HIX), which compares two broad aromatic dominated fluorescence maxima, is calculated at 254 nm excitation by dividing the sum of fluorescence intensities between emission 435 to 480 nm by the the sum of fluorescence intensities between 300 to 345 nm.
eem_humification_index(eem, scale = FALSE, verbose = TRUE)
eem_humification_index(eem, scale = FALSE, verbose = TRUE)
eem |
An object of class |
scale |
Logical indicating if HIX should be scaled, default is FALSE. See details for more information. |
verbose |
Logical determining if additional messages should be printed. |
An object of class eemlist
.
A data frame containing the humification index (HIX) for each eem.
Different excitation and emission wavelengths are often used to measure
EEMs. Hence, it is possible to have mismatchs between measured wavelengths
and wavelengths used to calculate specific metrics. In these circumstances,
EEMs are interpolated using the interp2
function from the
parcma
library. A message warning the user will be prompted if data
interpolation is performed.
Ohno, T. (2002). Fluorescence Inner-Filtering Correction for Determining the Humification Index of Dissolved Organic Matter. Environmental Science & Technology, 36(4), 742-746.
file <- system.file("extdata/cary/scans_day_1/", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_humification_index(eem)
file <- system.file("extdata/cary/scans_day_1/", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_humification_index(eem)
Inner-filter effect correction
eem_inner_filter_effect(eem, absorbance, pathlength = 1)
eem_inner_filter_effect(eem, absorbance, pathlength = 1)
eem |
An object of class |
absorbance |
A data frame with:
|
pathlength |
A numeric value indicating the pathlength (in cm) of the cuvette used for absorbance measurement. Default is 1 (1cm). |
The inner-filter effect correction procedure is assuming that fluorescence has been measured in 1 cm cuvette. Hence, absorbance will be converted per cm. Note that absorbance spectra should be provided (i.e. not absorption).
An object of class eemlist
.
An object of class eem
containing:
sample The file name of the eem.
x A matrix with fluorescence values.
em Emission vector of wavelengths.
ex Excitation vector of wavelengths.
The names of absorbance
variables are expected to match those of the
eems. If the appropriate absorbance spectrum is not found, an uncorrected
eem will be returned and a warning message will be printed.
Kothawala et al. 2013 have shown that a 2-fold dilution was required for sample presenting total absorbance > 1.5 in a 1 cm cuvette. Accordingly, a message will warn the user if total absorbance is greater than this threshold.
Parker, C. a., & Barnes, W. J. (1957). Some experiments with spectrofluorometers and filter fluorimeters. The Analyst, 82(978), 606. doi:10.1039/an9578200606
Kothawala, D. N., Murphy, K. R., Stedmon, C. A., Weyhenmeyer, G. A., & Tranvik, L. J. (2013). Inner filter correction of dissolved organic matter fluorescence. Limnology and Oceanography: Methods, 11(12), 616-630. doi:10.4319/lom.2013.11.616
library(eemR) data("absorbance") folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") eems <- eem_extract(eems, "nano") # Remove the blank sample # Remove scattering (1st order) eems <- eem_remove_scattering(eems, "rayleigh") eems_corrected <- eem_inner_filter_effect(eems, absorbance = absorbance, pathlength = 1) op <- par(mfrow = c(2, 1)) plot(eems, which = 1) plot(eems_corrected, which = 1) par(op)
library(eemR) data("absorbance") folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") eems <- eem_extract(eems, "nano") # Remove the blank sample # Remove scattering (1st order) eems <- eem_remove_scattering(eems, "rayleigh") eems_corrected <- eem_inner_filter_effect(eems, absorbance = absorbance, pathlength = 1) op <- par(mfrow = c(2, 1)) plot(eems, which = 1) plot(eems_corrected, which = 1) par(op)
The names of an eem or eemlist objects
eem_names(eem)
eem_names(eem)
eem |
An object of class |
An object of class eemlist
.
A character vector containing the names of the EEMs.
file <- system.file("extdata/cary/", package = "eemR") eem <- eem_read(file, recursive = TRUE, import_function = "cary") eem_names(eem)
file <- system.file("extdata/cary/", package = "eemR") eem <- eem_read(file, recursive = TRUE, import_function = "cary") eem_names(eem)
Set the sample names of an eem or eemlist objects
eem_names(x) <- value
eem_names(x) <- value
x |
An object of class |
value |
A character vector with new sample names. Must be equal
in length to the number of samples in the |
An eem
or eemlist
.
folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") eem_names(eems) eem_names(eems) <- c("a", "b", "c", "d") eem_names(eems)
folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") eem_names(eems) eem_names(eems) <- c("a", "b", "c", "d") eem_names(eems)
Extract fluorescence peaks
eem_peaks(eem, ex, em, verbose = TRUE)
eem_peaks(eem, ex, em, verbose = TRUE)
eem |
An object of class |
ex |
A numeric vector with excitation wavelengths. |
em |
A numeric vector with emission wavelengths. |
verbose |
Logical determining if additional messages should be printed. |
An object of class eemlist
.
A data frame containing excitation and emission peak values. See details for more information.
Different excitation and emission wavelengths are often used to measure
EEMs. Hence, it is possible to have mismatchs between measured wavelengths
and wavelengths used to calculate specific metrics. In these circumstances,
EEMs are interpolated using the interp2
function from the
parcma
library. A message warning the user will be prompted if data
interpolation is performed.
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_peaks(eem, ex = c(250, 350), em = c(300, 400))
file <- system.file("extdata/cary/scans_day_1/", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") eem_peaks(eem, ex = c(250, 350), em = c(300, 400))
Normalize fluorescence intensities to the standard scale of Raman Units (R.U).
eem_raman_normalisation(eem, blank = NA)
eem_raman_normalisation(eem, blank = NA)
eem |
An object of class |
blank |
An object of class |
The function will first try to use the provided blank
. If the
blank is omitted, the function will then try to extract the blank from the
eemlist
object. This is done by looking for sample names containing
one of these complete or partial strings (ignoring case):
nano
miliq
milliq
mq
blank
Note that if blank
is omitted, the function will group the
eemlist
based on file location and will assumes that there is a
blank sample in each folder. In that context, the blank will be used on
each sample in the same folder. If more than one blank is found they will
be averaged (a message will be printed if this appends).
Consider the following example where there are two folders that could represent scans performed on two different days 'scans_day_1' and 'scans_day_2'.
scans_day_1 | |
nano.csv | |
sample1.csv | |
sample2.csv | |
sample3.csv | |
scans_day_2 | |
blank.csv | |
s1.csv | |
s2.csv | |
s3.csv | |
In each folder there are three samples and one blank files. In that context, 'eem_remove_blank()' will use the blank 'nano.csv' from 'sample1.csv', 'sample2.csv' and 'sample3.csv'. The same strategy will be used for files in folder 'scans_day_2' but with blank named 'blank.csv'.
Note that the blanks eem are not returned by the function.
The normalization procedure consists in dividing all fluorescence intensities by the area (integral) of the Raman peak. The peak is located at excitation of 350 nm. (ex = 370) between 371 nm. and 428 nm in emission (371 <= em <= 428). Note that the data is interpolated to make sure that fluorescence at em 350 exist.
An object of class eemlist
.
An object of class eem
containing:
sample The file name of the eem.
x A matrix with fluorescence values.
em Emission vector of wavelengths.
ex Excitation vector of wavelengths.
Lawaetz, A. J., & Stedmon, C. A. (2009). Fluorescence Intensity Calibration Using the Raman Scatter Peak of Water. Applied Spectroscopy, 63(8), 936-940.
doi:10.1366/000370209788964548
Murphy, K. R., Stedmon, C. a., Graeber, D., & Bro, R. (2013). Fluorescence spectroscopy and multi-way techniques. PARAFAC. Analytical Methods, 5(23), 6557.
http://xlink.rsc.org/?DOI=c3ay41160e
# Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Open the blank eem file <- system.file("extdata/cary/scans_day_1", "nano.csv", package = "eemR") blank <- eem_read(file, import_function = "cary") # Do the normalisation eem <- eem_raman_normalisation(eem, blank) plot(eem)
# Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Open the blank eem file <- system.file("extdata/cary/scans_day_1", "nano.csv", package = "eemR") blank <- eem_read(file, import_function = "cary") # Do the normalisation eem <- eem_raman_normalisation(eem, blank) plot(eem)
Read excitation-emission fluorescence matrix (eem)
eem_read(file, recursive = FALSE, import_function)
eem_read(file, recursive = FALSE, import_function)
file |
File name or folder containing fluorescence file(s). |
recursive |
logical. Should the listing recurse into directories? |
import_function |
Either a character or a user-defined function to
import a single eem. If a character, it should be one of "cary", "aqualog",
"shimadzu", "fluoromax4". See |
At the moment, Cary Eclipse, Aqualog and Shimadzu EEMs are supported.
eemR
will automatically try to determine from which
spectrofluorometer the files originate and load the data accordingly. Note
that EEMs are reshaped so X[1, 1] represents the fluorescence intensity at
X[min(ex), min(em)].
If file
is a single filename:
An object of class eem
containing:
sample The file name of the eem.
x A matrix with fluorescence values.
em Emission vector of wavelengths.
ex Excitation vector of wavelengths.
If file
is a folder, the function returns an object of class
eemlist
which is simply a list of eem
.
file <- system.file("extdata/cary/scans_day_1/", package = "eemR") eems <- eem_read(file, recursive = TRUE, import_function = "cary")
file <- system.file("extdata/cary/scans_day_1/", package = "eemR") eems <- eem_read(file, recursive = TRUE, import_function = "cary")
This function is used to remove blank from eems which can help to reduce the effect of scatter bands.
eem_remove_blank(eem, blank = NA)
eem_remove_blank(eem, blank = NA)
eem |
An object of class |
blank |
An object of class |
The function will first try to use the provided blank
. If the
blank is omitted, the function will then try to extract the blank from the
eemlist
object. This is done by looking for sample names containing
one of these complete or partial strings (ignoring case):
nano
miliq
milliq
mq
blank
Note that if blank
is omitted, the function will group the
eemlist
based on file location and will assumes that there is a
blank sample in each folder. In that context, the blank will be used on
each sample in the same folder. If more than one blank is found they will
be averaged (a message will be printed if this appends).
Consider the following example where there are two folders that could represent scans performed on two different days 'scans_day_1' and 'scans_day_2'.
scans_day_1 | |
nano.csv | |
sample1.csv | |
sample2.csv | |
sample3.csv | |
scans_day_2 | |
blank.csv | |
s1.csv | |
s2.csv | |
s3.csv | |
In each folder there are three samples and one blank files. In that context, 'eem_remove_blank()' will use the blank 'nano.csv' from 'sample1.csv', 'sample2.csv' and 'sample3.csv'. The same strategy will be used for files in folder 'scans_day_2' but with blank named 'blank.csv'.
Note that the blanks eem are not returned by the function.
Note that blank correction should be performed before Raman
normalization (eem_raman_normalisation()
). An error will occur
if trying to perform blank correction after Raman normalization.
An object of class eemlist
.
Murphy, K. R., Stedmon, C. a., Graeber, D., & Bro, R. (2013). Fluorescence spectroscopy and multi-way techniques. PARAFAC. Analytical Methods, 5(23), 6557. http://doi.org/10.1039/c3ay41160e
http://xlink.rsc.org/?DOI=c3ay41160e
## Example 1 # Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Open the blank eem file <- system.file("extdata/cary/scans_day_1", "nano.csv", package = "eemR") blank <- eem_read(file, import_function = "cary") plot(blank) # Remove the blank eem <- eem_remove_blank(eem, blank) plot(eem) ## Example 2 # Open the fluorescence eem folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") plot(eems, which = 3) # Open the blank eem file <- system.file("extdata/cary/scans_day_1", "nano.csv", package = "eemR") blank <- eem_read(file, import_function = "cary") plot(blank) # Remove the blank eems <- eem_remove_blank(eems, blank) plot(eems, which = 3) # Automatic correction folder <- system.file("extdata/cary/", package = "eemR") # Look at the folder structure list.files(folder, "*.csv", recursive = TRUE) eems <- eem_read(folder, recursive = TRUE, import_function = "cary") res <- eem_remove_blank(eems)
## Example 1 # Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Open the blank eem file <- system.file("extdata/cary/scans_day_1", "nano.csv", package = "eemR") blank <- eem_read(file, import_function = "cary") plot(blank) # Remove the blank eem <- eem_remove_blank(eem, blank) plot(eem) ## Example 2 # Open the fluorescence eem folder <- system.file("extdata/cary/scans_day_1", package = "eemR") eems <- eem_read(folder, import_function = "cary") plot(eems, which = 3) # Open the blank eem file <- system.file("extdata/cary/scans_day_1", "nano.csv", package = "eemR") blank <- eem_read(file, import_function = "cary") plot(blank) # Remove the blank eems <- eem_remove_blank(eems, blank) plot(eems, which = 3) # Automatic correction folder <- system.file("extdata/cary/", package = "eemR") # Look at the folder structure list.files(folder, "*.csv", recursive = TRUE) eems <- eem_read(folder, recursive = TRUE, import_function = "cary") res <- eem_remove_blank(eems)
Remove Raman and Rayleigh scattering
eem_remove_scattering(eem, type, order = 1, width = 10)
eem_remove_scattering(eem, type, order = 1, width = 10)
eem |
An object of class |
type |
A string, either "raman" or "rayleigh". |
order |
A integer number, either 1 (first order) or 2 (second order). |
width |
Slit width in nm for the cut. Default is 10 nm. |
An object of class eemlist
.
Lakowicz, J. R. (2006). Principles of Fluorescence Spectroscopy. Boston, MA: Springer US.#'
Murphy, K. R., Stedmon, C. a., Graeber, D., & Bro, R. (2013). Fluorescence spectroscopy and multi-way techniques. PARAFAC. Analytical Methods, 5(23), 6557. https://doi.org/10.1039/c3ay41160e#'
https://pubs.rsc.org/en/content/articlelanding/2013/AY/c3ay41160e
# Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Remove the scattering eem <- eem_remove_scattering(eem = eem, type = "raman", order = 1, width = 10) eem <- eem_remove_scattering(eem = eem, type = "rayleigh", order = 1, width = 10) plot(eem)
# Open the fluorescence eem file <- system.file("extdata/cary/scans_day_1", "sample1.csv", package = "eemR") eem <- eem_read(file, import_function = "cary") plot(eem) # Remove the scattering eem <- eem_remove_scattering(eem = eem, type = "raman", order = 1, width = 10) eem <- eem_remove_scattering(eem = eem, type = "rayleigh", order = 1, width = 10) plot(eem)
This function allows to manually specify either excitation or emission vector of wavelengths in EEMs. This function is mostly used with spectrophotometers such as Shimadzu that do not include excitation wavelengths in fluorescence files.
eem_set_wavelengths(eem, ex, em)
eem_set_wavelengths(eem, ex, em)
eem |
An object of class |
ex |
A numeric vector of excitation wavelengths. |
em |
A numeric vector of emission wavelengths. |
An object of class eemlist
.
folder <- system.file("extdata/shimadzu", package = "eemR") eem <- eem_read(folder, import_function = "shimadzu") eem <- eem_set_wavelengths(eem, ex = seq(230, 450, by = 5)) plot(eem)
folder <- system.file("extdata/shimadzu", package = "eemR") eem <- eem_read(folder, import_function = "shimadzu") eem <- eem_set_wavelengths(eem, ex = seq(230, 450, by = 5)) plot(eem)
Surface plot of eem
## S3 method for class 'eemlist' plot(x, which = 1, interactive = FALSE, show_peaks = FALSE, ...)
## S3 method for class 'eemlist' plot(x, which = 1, interactive = FALSE, show_peaks = FALSE, ...)
x |
An object of class |
which |
An integer representing the index of eem to be plotted. |
interactive |
If |
show_peaks |
Boolean indicating if Cobble's peaks should be displayed on the surface plot. Default is FALSE. |
... |
Extra arguments for |
folder <- system.file("extdata/cary/scans_day_1/", package = "eemR") eem <- eem_read(folder, import_function = "cary") plot(eem, which = 3)
folder <- system.file("extdata/cary/scans_day_1/", package = "eemR") eem <- eem_read(folder, import_function = "cary") plot(eem, which = 3)
Display summary of an eemlist object
## S3 method for class 'eemlist' print(x, ...)
## S3 method for class 'eemlist' print(x, ...)
x |
An object of class |
... |
Extra arguments. |
A data frame containing summarized information on EEMs.
Character. Sample name of the EEM,
Numerical. Minimum excitation wavelength
Numerical. Maximum excitation wavelength
Numerical. Minimum emission wavelength
Numerical. Maximum emission wavelength
Logical. TRUE if the sample has been blank corrected.
Logical. TRUE if scattering bands have been removed from the sample.
Logical. TRUE if the sample has been corrected for inner-filter effect.
Logical. TRUE if the sample has been Raman normalized.
Character. The name of the manufacturer.
folder <- system.file("extdata/cary", package = "eemR") eem <- eem_read(folder, recursive = TRUE, import_function = "cary") print(eem)
folder <- system.file("extdata/cary", package = "eemR") eem <- eem_read(folder, recursive = TRUE, import_function = "cary") print(eem)
Display summary of an eemlist object
## S3 method for class 'eemlist' summary(object, ...)
## S3 method for class 'eemlist' summary(object, ...)
object |
An object of class |
... |
Extra arguments. |
A data frame containing summarized information on EEMs.
Character. Sample name of the EEM,
Numerical. Minimum excitation wavelength
Numerical. Maximum excitation wavelength
Numerical. Minimum emission wavelength
Numerical. Maximum emission wavelength
Logical. TRUE if the sample has been blank corrected.
Logical. TRUE if scattering bands have been removed from the sample.
Logical. TRUE if the sample has been corrected for inner-filter effect.
Logical. TRUE if the sample has been Raman normalized.
Character. The name of the manufacturer.
folder <- system.file("extdata/cary", package = "eemR") eem <- eem_read(folder, recursive = TRUE, import_function = "cary") summary(eem)
folder <- system.file("extdata/cary", package = "eemR") eem <- eem_read(folder, recursive = TRUE, import_function = "cary") summary(eem)