The rDolphin family functions are introduced to perform automatic targeted
metabolite profiling. Therefore, ensure that you interpolated from -0.1 ppm
in order to consider the TSP/DSS signal at 0.0 ppm. The function generates a
list with the files required by to_rDolphin function. Then, it is required
to save them with the save_files_to_rDolphin
. to_rDolphin function will
read the generated "parameters.csv" file.
function.
Arguments
- nmr_dataset
An nmr_dataset object
- biological_origin
String specify the type of sample (blood, urine, cell)
Value
a list containing:
meta_rDolphin
: metadata in rDolphin format,NMR_spectra
: spectra matrixROI
: ROI templateParameters
: parameters file
See also
Other import/export functions:
Pipelines
,
load_and_save_functions
,
nmr_data()
,
nmr_meta_export()
,
nmr_read_bruker_fid()
,
nmr_read_samples()
,
nmr_zip_bruker_samples()
,
save_files_to_rDolphin()
,
save_profiling_output()
,
to_ChemoSpec()
Examples
if (FALSE) { # \dontrun{
# Set the directory in which rDolphin files will be saved
output_dir_10_rDolphin <- file.path(your_path, "10-rDolphin")
fs::dir_create(output_dir_10_rDolphin)
# Generate the files (for plasma/serum)
files_rDolphin <- files_to_rDolphin(nmr_dataset_0_10_ppm, blood)
# Save the files
save_files_to_rDolphin(files_rDolphin, output_dir_10_rDolphin)
# Build the rDolphin object. Do not forget to set the directory
setwd(output_dir_10_rDolphin)
rDolphin_object <- to_rDolphin("Parameters.csv")
# Visualize your spectra
rDolphin_plot(rDolphin_object)
# Run the main profiling function (it takes a while)
targeted_profiling <- Automatic_targeted_profiling(rDolphin_object)
# Save results
save_profiling_output(targeted_profiling, output_dir_10_rDolphin)
save_profiling_plots(
output_dir_10_rDolphin, targeted_profiling$final_output,
targeted_profiling$reproducibility_data
)
# Additionally, you can run some stats
intensities <- targeted_profiling$final_output$intensity
group <- as.factor(rDolphin_object$Metadata$type)
model_PLS <- rdCV_PLS_RF(X = intensities, Y = group)
} # }