This function loads a specified data file containing lipid measurements, calculates the summary of missing values and relative standard deviation (RSD) for each lipid class, and generates plots for both summaries. It also plots and saves figures showing the distribution of internal standards across samples.
plot_lipid_data_summary(
file_path,
output_xlsx = "lipid_classes_with_names.xlsx",
missing_plot_path = "missing_values_plot.png",
rsd_plot_path = "rsd_values_plot.png",
is_plots_dir = "is_plots",
blank_pattern = "Blank|Control|Neg",
pooled_pattern = "Pooled QC|Pooled|Pool|PQ",
nist_pattern = "NIST Plasma|NIST|nist"
)Plots and saves summary figures of missing percentages, RSD percentages, and internal standard distributions.
The path to the lipid measurement data file (e.g., "area.txt").
Path to save the lipid classes with names as an Excel file. Default is "lipid_classes_with_names.xlsx".
Path to save the missing data percentage plot. Default is "missing_values_plot.png".
Path to save the RSD percentage plot. Default is "rsd_values_plot.png".
Directory to save internal standard distribution plots. Default is "is_plots".
Regex pattern to identify blank samples in the "Sample ID" column. Default is "Blank|blank".
Regex pattern to identify pooled QC samples in the "Sample ID" column. Default is "Pooled QC|Pooled|pool|PQC".
Regex pattern to identify NIST QC samples in the "Sample ID" column. Default is "NIST Plasma|NIST|nist".
Yaoxiang Li