This repository contains R code for analyzing gene expression data, including generating heatmaps and identifying upregulated and downregulated genes.
- R (version 4.0 or later)
- Required R packages: gplots, ggplot2, RColorBrewer
Install the necessary R packages using the following commands:
install.packages(c("gplots", "RColorBrewer", "ggplot2"))
-
Load the Data
- The script loads gene expression data from a provided URL. Ensure you have an active internet connection or download the data manually if needed.
-
Generate Heatmaps
- The script generates various heatmaps to visualize gene expression patterns with different color palettes and clustering options.
-
Analyze Gene Expression
- The script compares gene expression between two groups of samples. It calculates fold changes, log2 fold changes, and p-values for each gene to determine differential expression.
-
Identify Differentially Expressed Genes
- Upregulated and downregulated genes are identified based on fold change and p-values. These genes are saved to CSV files for further analysis.
-
Visualize Pathway Enrichment
- The script creates lollipop plots to visualize the top pathways associated with upregulated and downregulated genes using pre-processed enrichment data.
- glioblastoma.csv: Gene expression data used for the analysis.
- upregulated_genes.csv: CSV file containing identified upregulated genes.
- downregulated_genes.csv: CSV file containing identified downregulated genes.
- up.csv: Enrichment data for upregulated pathways.
- down.csv: Enrichment data for downregulated pathways.
- place the script in your working directory.
- Run the R script.