Extracting DE transcripts and generating heatmaps (Trinity)
The Trinity package includes scripts that facilitate the extracting of differentially expressed (DE) transcripts (by FDR and/or log2 fold change) and generating heatmaps and plots for visualization.

Execution

Below command will extract DE transcripts that are at least 4-fold DE at a significance of <= 0.001 in any of the pairwise sample comparisons.
Locate Analysis/DifferentialExpression/analyze_diff_expr.pl in the trinityrnaseq-2.2.0 distribution, and run
1
cd ~/LSLNGS2015/Trinity/edgeR_trans
2
3
PATH_TO_TRINITY/Analysis/DifferentialExpression/analyze_diff_expr.pl \
4
--matrix ../Trinity_trans.TMM.EXPR.matrix -P 1e-3 -C 2
Copied!

Option

--matrix location of the matrix.normalized.FPKM file
-P p-value cutoff for FDR (default: 0.001)
-C min abs(log2 fold change) (default: 2, i.e. meaning 2^(2) or 4-fold).
--output prefix for output file prefix for output file (default: diffExpr.P${Pvalue}_C${C})

Output

ls -la diffExpr.*
1
-rw-rw-r-- 1 ycl6 ycl6 3141 Nov 1 16:02 diffExpr.P1e-3_C2.matrix
2
-rw-rw-r-- 1 ycl6 ycl6 5119 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.centered.dat
3
-rw-rw-r-- 1 ycl6 ycl6 9026 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.centered.genes_vs_samples_heatmap.pdf
4
-rw-rw-r-- 1 ycl6 ycl6 4734 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.dat
5
-rw-rw-r-- 1 ycl6 ycl6 278 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.sample_cor.dat
6
-rw-rw-r-- 1 ycl6 ycl6 5620 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.sample_cor_matrix.pdf
7
-rw-rw-r-- 1 ycl6 ycl6 4073 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.R
8
-rw-rw-r-- 1 ycl6 ycl6 31811 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.RData
Copied!
The R script diffExpr.P1e-3_C2.matrix.R is generated to include all the R commands used.
We use head to examine the first 10 lines of the file containing the DE transcripts at the specified thresholds
head diffExpr.P1e-3_C2.matrix
1
Sp_ds Sp_hs Sp_log Sp_plat
2
TRINITY_DN12_c0_g2_i1 709.850 85.668 115.982 1045.466
3
TRINITY_DN210_c0_g1_i1 141.757 461.640 1326.107 247.219
4
TRINITY_DN28_c0_g1_i1 7488.551 55125.342 918.115 3457.890
5
TRINITY_DN45_c0_g1_i1 53513.610 23278.810 804.181 31629.110
6
TRINITY_DN62_c0_g1_i1 369.557 17.474 160.725 4146.868
7
TRINITY_DN50_c0_g1_i1 46416.667 21292.999 146.745 9106.154
8
TRINITY_DN261_c0_g1_i1 19545.983 347.357 105.047 25441.557
9
TRINITY_DN16_c0_g2_i1 1615.428 732.431 77.323 1950.319
10
TRINITY_DN39_c0_g1_i1 241.880 291.168 0.000 0.000
Copied!
Use WinSCP to download the PDF file and view it on your PC or laptop.
The diffExpr.P1e-3_C2.matrix.log2.centered.genes_vs_samples_heatmap.pdf shows the clustering result of transcripts along the vertical axis and samples along the horizontal axis.
genes vs. samples heatmap
The diffExpr.P1e-3_C2.matrix.log2.sample_cor_matrix.pdf shows the pairwise sample correlation matrix.
sample correlation matrix
Last modified 1yr ago
Copy link