Step-by-Step Guide to Analyzing Microarray Data Using R (Limma Package)

Dr. Omics Edu Team ·

Microarray technology helps researchers study the expression of thousands of genes simultaneously. It is widely used to identify genes associated with diseases and compare gene expression between normal and diseased samples.

The Limma R package is a popular bioinformatics tool used for differential gene expression analysis. It helps identify significantly upregulated and downregulated genes using statistical methods.

In this blog, we will explore how to perform microarray analysis in R using the Limma package and publicly available GEO datasets.

Step 1: Install Required Packages

First, install R and RStudio. Then install the required Bioconductor packages.

install.packages("BiocManager")

BiocManager::install(c("limma", "GEOquery"))

Load the packages:

library(limma)

library(GEOquery)

Step 2: Download a GEO Dataset

GEO (Gene Expression Omnibus) is a public database containing gene expression datasets.

For this tutorial, we will use the GSE10072 dataset.

gse <- getGEO("GSE10072", GSEMatrix = TRUE)

eset <- gse[[1]]

expr_data <- exprs(eset)

sample_info <- pData(eset)

Here, exprs() extracts gene expression values, while pData() provides sample information.

Step 3: Normalize the Data

Normalization helps reduce technical variations between samples.

normalized_data <- normalizeBetweenArrays(

  expr_data,

  method = "quantile"

)

Check whether the GEO data are already normalized before applying this step.

Step 4: Perform Differential Gene Expression Analysis

Identify the experimental groups, such as normal and tumor samples, using the GEO sample information.

Create a design matrix and perform the analysis using Limma.

design <- model.matrix(~0 + group)

colnames(design) <- levels(group)

fit <- lmFit(normalized_data, design)

contrast <- makeContrasts(

  Tumor - Normal,

  levels = design

)

fit2 <- contrasts.fit(fit, contrast)

fit2 <- eBayes(fit2)

results <- topTable(

  fit2,

  number = Inf,

  adjust.method = "BH"

)

Step 5: Identify Significant Genes

Filter genes based on adjusted p-value and fold change.

deg <- results[

  results$adj.P.Val < 0.05 &

  abs(results$logFC) > 1,

]

These genes represent potential differentially expressed genes between the two groups.

Step 6: Visualize the Results

Volcano plots help identify upregulated and downregulated genes, while heatmaps display gene expression patterns across samples.

library(ggplot2)

ggplot(results, aes(x = logFC, y = -log10(adj.P.Val))) +

  geom_point(color = "blue") +

  theme_minimal() +

  labs(title = "Volcano Plot")

Step 7: Export the Results

Save the significant genes for further analysis.

write.csv(deg, "Significant_DEGs.csv")

Advantages of Using Limma

  • Easy to integrate with R and Bioconductor.
  • Efficient analysis of large gene expression datasets.
  • Provides reliable statistical methods.
  • Supports multiple experimental comparisons.
  • Helps identify significant differentially expressed genes.

 

Conclusion

The Limma R package provides an effective approach for microarray data analysis. By combining GEOquery, Limma, and R visualization packages, researchers can download public datasets, identify differentially expressed genes, and visualize gene expression patterns.

Learning this workflow is valuable for researchers and students interested in gene expression studies, computational genomics, and bioinformatics.

Useful Resources:


WhatsApp