Quarto Report Example With Plotly and Trelliscopejs

By Jeremy Selva

August 8, 2022

Introduction

I have created this html report in Quarto to show how to create some interactive quality control plots using plotly and display as a trellis using trelliscopejs.

Picture showing a preview of the html report in Quarto.

The source code used to generate this report can be found in this GitHub page.

Background

Here is some background knowledge about the use of the quality control (QC) plots, for example, the injection sequence plot and the dilution plot, in targeted lipidomics analysis.

About Targeted Lipidomics

The peak area data used to generate these quality control plots comes from a targeted lipidomics experiment using Reversed-Phase Ultra High-Performance Liquid Chromatography/ Mass Spectrometry (RP-UHPLC/MS).

For those new to mass spectrometry or lipidomics, the aim of targeted lipidomics is to measure and even quantify the amount of specific lipids found in a given sample. To tell the mass spectrometer what lipids to measure, a list of multiple reaction monitoring (MRM) transitions (with their corresponding precursor and product ions) is provided. More details on what multiple reaction monitoring (MRM) is can be found in this webpage by Proteomics International Laboratories LTD.

Reason for creating quality control (QC) plots

However, variation in a transition’s peak area measured between samples can come from many unwanted sources, besides that sample itself. Such unwanted sources includes, contaminant ions or a different pipette used during lipid extraction. To check the severity of these unwanted variation, quality control (QC) samples are used.

In most practices, we want to keep transitions that give peak areas with low variation in the quality control samples. While variations can be measured using summary statistics such as the coefficient of variation, creating quality control (QC) plots can help us identify the cause of the unwanted variation. In this report, two such plots are introduced.

The injection sequence plot is a scatter plot with the peak area (or concentration) on the y-axis and the injection sequence order (or data acquisition time) on the x axis. This is to better understand the variation of peak area in the quality control (QC) sample types over time. A raincloud plot is placed on the right of the scatter plot to show the distribution of each (QC) sample type as well as to highlight any potential outliers.

The dilution plot, on the other hand, checks for possible signal enhancement or suppression as a result of detector saturation or matrix effect.

Conclusion

I hope the above explanation provides a good head-ups on what is to come in the later parts of the html report. May its resources be useful in your work though it may be specific to a small part of targeted lipidomics analysis.