Embedding R into Quarto documents with quarto-webr

Example: intersecting differential expression results

Author

Thomas Sandmann

Published

November 18, 2023

Introduction

This interactive website allows users to intersect differential expression results of three different comparisons from an experiment published by Xia et al.

The experiment was performed in three different batches (e.g. samples were collected on three different days). For this report, the differences between samples from homozygous APP-SAA and wiltdype animals were estimated separately for each batch/day: Day 1, Day 2 and Day 3.1

By manipulating the code cells include in this website, you can select a set of genes that passes a user-defined FDR threshold on all three days.2

Step 1: Choose a false-discovery (FDR) threshold

  1. Please choose an FDR threshold by changing the FDR_threshold the code box below.
  • It will be applied to results from all three comparisons.
  • For example, setting FDR_threshold < 0.1 will retain all genes with a false-discovery rate < 10% in all three experiments.
  1. Press the β€œRun Code” button to create a Venn diagram.
  • You can save the plot by right-clicking and selecting Save image as.
  1. Repeat until you like the results.

    

Step 2: List the genes that pass the FDR threshold in all three comparisons

Next, press the Run Code button to see the list of genes that pass your selected FDR threshold.

  • If you triple-click on the list of gene symbols, you can copy them into another document.

    

Step 3: See the differential expression results for the selected genes

For more context, the following sections show you tables with the results from your three experiments for the genes you selected in Step 1.

Day 1

Hit Run Code button to see the expression of the selected genes or download results for all genes


    

Day 2

Hit Run Code button to see the expression of the selected genes or download results for all genes


    

Day 3

Hit Run Code button to see the expression of the selected genes or download results for all genes


    

    

Footnotes

  1. Analyzing each batch separately is not the best way to estimate genotype effects across the full experiment. For this exercise, I just want to obtain three different contrasts to compare in a Venn diagram. You can find more details about a more realistic analysis of this experiment in this blog post.β†©οΈŽ

  2. The FDR does not reveal the direction of differential expression. So it is possible that we will pick up genes that are statistically significantly differentially expressed in opposite directions.β†©οΈŽ