Want to share your content on R bloggers? click here if you have a blog, or here if you don’t.
Overview
Differential expression (DE) analysis is used to identify genes that drive the patterns of variation associated with groups of samples.
It is easy to create curated lists of DE genes using the free phone FROM app.
Learning objectives
- Be able to perform comparisons to identify DE genes with edgeR
- Become familiar with setting FDR and LFC thresholds to filter DE results
- Learn how to prepare DE results for downstream analysis (functional, network, set operations)
edgeR
The R package edgeR uses trimmed mean of M-values (TMM) for normalization before DE analysis with negative binomial distributions.
The data is normalized to account for differences in sample size and variance between samples.
The normalized count data is then used to estimate per gene fold changes and perform the DE analysis.
Before you start
The exercise in this tutorial uses the freeCount apps in RStudio on a PC. Make sure you have downloaded the following tools and installed and up to date on your PC:
- R software environment
- RStudio desktop application
For Windows usersadditionally install RTools.
It is also possible to run the freeCount apps online via Posit Cloud. To see how, check out the freeCount Bioinformatics analysis apps on Posit Cloud self-study.
Input data
- Download the tribolium counts file
- Download the tribolium design file
Tip! Right click and select Save as… to download the above files in CSV format.
Sample data
In this lesson we will use data from a study on the effects of ultraviolet radiation (UVR) on the larvae of the red flour beetle, entitled “Digital gene expression profiling in larvae of Tribolium chestnut at different periods after exposure to UV-B“.
UVR occurs in many environments and varies widely in intensity and composition, such as different ratios of UV-A and UV-B radiation. The various forms of UVR have distinct and often harmful effects on organisms and biological systems.
Study design
There are two factors for each sample, and within each of these factors there are two levels:
- The condition factor has the levels of ctrl And treat
- The time factor has the levels of 4h And 24 hours
We can group our data using the different levels of each factor, and then we can compare the expression levels of genes in those groups to identify DE.

Launch the Analysis app
The following steps show you how to download and launch the freeCount Differential Expression Analysis (DA) app.
- Download the free Count R Shiny applications
- Go to https://github.com/ElizabethBrooks/freeCount
- Click on the green < > Code knob
- Click Download ZIP
- Grab the freeCount-main folder
- Navigate to the apps folder
- Open the DR file in RStudio
- Click Install on the yellow banner to install the necessary R packages (or run the code on lines 10 through 19)
- Click on the Run app button in the top right corner of the source panel
Analysis process
Perform the following steps to create a list of DE genes that can then be used in a downstream analysis (e.g., functional).
- Upload the data and click Perform analysis
- Check the initial settings on the Analysis tab
- Select the sample groups you want to compare and click Analyze
- Discover the filtered and normalized data on the Data normalization tab
- Inspect the variation patterns between the samples shown in the cluster plots on the Data exploration tab
- Inspect the DE analysis results and numbers of DE genes on the Results tab
- Compare the groupings of samples in the heatmap of DE genes with the clustering plots
- Adjust the FDR and LFC settings to filter the DE gene results
- Create a curated list of DE genes by repeating steps 6 through 8
- Download the compiled list of DE genes
Upload the data
Upload the data and click Perform analysis.

Check the initial settings
Check the initial settings on the Analysis tab.

Select an equation
Select the sample groups you want to compare and click Analyze.

Discover filtered and normalized data
Discover the filtered and normalized data on the Data normalization tab.

Downstream network analysis
For downstream network analysis, click the Download table button to download it Table of normalized gene counts. This table can be entered into the freeCount NA app along with a study design file.
Inspect variation patterns
Inspect the variation patterns between the samples shown in the cluster plots on the Data exploration tab.

Note that in the above PCA, some samples from different groups are mixed up and clustered with other groups. For example, one sample from the treat.4h group (treat2_4h) is not clustered with the other samples in that group.
The patterns of variation among the samples we observe here show us what to expect when analyzing the resulting set of DE genes. These patterns will help us set the FDR and LFC thresholds to filter our results.
View the DE analysis results
View the DE analysis results and the number of DE genes on the website Results tab.

Compare the sample groupings
Compare sample groupings in the heatmap of DE genes (Results tab) to the cluster plots (Data exploration tab).

Adjust FDR and LFC settings
Adjust the FDR and LFC settings to filter the DE gene results.

Filter DE analysis results
To adjust Bumps Through…
- Increasing the LFC in having noisy data more confident differences
- Lowering the FDR to focus on high probability targets
Narrow the results to the genes that you think drive the patterns of variation observed in the cluster plots.
Check the FDR And LFC thresholds by visualizing the patterns using only those genes.
Check analysis settings
Verify that the analysis settings have been updated by looking at the file Current analysis settings on the left side of the app.

Create a curated list of DE genes
Create a curated list of DE genes by repeating steps 6 through 8.
It may be necessary to repeatedly adjust the settings and inspect the DE gene results to create a well-curated and manageable list of DE genes.
Download DE gene list
Finally, download the compiled list of DE genes.

The Table of DE analysis results can be used in downstream functional analysis. This table can be entered into the freeCount FA app together with an annotation file.
The Table of significant DE analysis results can be used with set operations to identify sets of shared or unique genes. This table can be entered into the freeCount SO app, along with other lists of DE genes from an experiment.
Related
#Creating #gene #lists #freeCount #bloggers


