--- title: "Import Nightingale Metabolomic Data" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Import Nightingale Metabolomic Data} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ## Import Nightingale data directly into a Omiprep object Read in the Nightingale Health data using the `read_nightingale` function. Here we will read in the example data provided with the package, and convert it directly into a Omiprep S7 object. ```{r setup} library(omiprep) # example file filepath <- system.file("extdata", "nightingale_v1_example.xlsx", package = "omiprep") # import mydata <- read_nightingale(filepath, return_Omiprep = TRUE) ``` ## Quick look at data structure of the imported data ```{r data_str} str(mydata) ``` ## QC Nightingale Perform the QC steps using the `quality_control` function. ```{r qc} mydata <- mydata |> quality_control(source_layer = "input", sample_missingness = 0.2, feature_missingness = 0.2, total_sum_abundance_sd = 5, outlier_udist = 5, outlier_treatment = "leave_be", winsorize_quantile = 1.0, tree_cut_height = 0.5, pc_outlier_sd = 5, feature_selection = "max_var_exp", features_exclude_but_keep = NULL, cores = 1 ) ``` ## Quick summary of the Omiprep object following QC ```{r summary_after_qc} summary(mydata) ```