Systems Biology
RNA-seq data analysis
Advanced I
(supplementary)
Heatmap visualization
May 24, 2022
Bioinformatics & Genomics Lab
Department of Life Science
Hanyang University
Sang-Ho Yoon
Bioinformatics & Genomics, the BIG lab.
2
MA plot highlights statistically significant DEGs
1. Normalize read count to TPM values using following python script
2. cp pheatmap R script to draw heatmap of top 10 DEG
3. Extracting gene clusters visualized in your heatmap is often your first objective
Bioinformatics & Genomics, the BIG lab.
3
Connect VPN and open your Shell
호스트: 166.104.118.161
포트 번호: 22
User: biguser
Password: biglab2428
1.
2.
3.
4.
P
Visualization of gene expression using heatmap
Bioinformatics & Genomics, the BIG lab.
4
P
Visualization of gene expression using heatmap
$ ssh biglab1
$ cd systems_biology_2022/YOUR_DIRECTORY
$ mkdir session_12
$ cd session_12
Navigate into your directory and link DESeq2 result file
Bioinformatics & Genomics, the BIG lab.
5
P
Visualization of gene expression using heatmap
$ ln –s <path_to_your_session_7>/immune_cells.symbols.txt
$ ln –s <path_to_your_session_7>/immune_cells_deseq2.txt
Or
$ cp ~/systems_biology_2022/TA/session_12/immune_cells.symbols.txt .
$ cp ~/systems_biology_2022/TA/session_12/immune_cells_deseq2.txt .
Navigate into your directory and link DESeq2 result file or copy templates (if you don’t have yours)
Bioinformatics & Genomics, the BIG lab.
6
1. Normalize read count to TPM values using following python script
P
Visualization of gene expression using heatmap
$ cp /home/biguser/systems_biology_2022/TA/src/count_to_tpm.py .
$ ./count_to_tpm.py --help
*Usage
because we need gene length to calculate TPM
Bioinformatics & Genomics, the BIG lab.
7
Run count_to_tpm python script
P
Visualization of gene expression using heatmap
$ ./count_to_tpm.py \
-c immune_cells.symbols.txt
-f <path_to_your>/7_featureCounts/Naive_CD8_T_cells_rep1.txt
-o immune_cells.symbols.tpm.txt
Bioinformatics & Genomics, the BIG lab.
8
2. cp pheatmap R script to draw heatmap of top 10 DEG
P
Visualization of gene expression using heatmap
$ cp /home/biguser/systems_biology_2022/TA/src/pheatmap.R .
Input files
B cell gene
T cell gene
Bioinformatics & Genomics, the BIG lab.
9
3. Extracting gene clusters visualized in your heatmap is often your first objective
P
Visualization of gene expression using heatmap
my_hm$tree_row
my_hm$tree_col
You can access each dendrogram in your pheatmap using
Bioinformatics & Genomics, the BIG lab.
10
P
Visualization of gene expression using heatmap
B cell genes
T cell genes
These commands will draw the dendrogram of gene clustering
(*my_hm is your pheatmap object name)
Use “height” to divide clusters
Bioinformatics & Genomics, the BIG lab.
11
P
Visualization of gene expression using heatmap