View source: R/to_rDolphin_blood.R
files_to_rDolphin | R Documentation |
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.
files_to_rDolphin(nmr_dataset, biological_origin)
nmr_dataset |
An nmr_dataset object |
biological_origin |
String specify the type of sample (blood, urine, cell) |
a list containing:
meta_rDolphin
: metadata in rDolphin format,
NMR_spectra
: spectra matrix
ROI
: ROI template
Parameters
: parameters file
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()
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.