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
cd ~/LSLNGS2015/Trinity/edgeR_trans
PATH_TO_TRINITY/Analysis/DifferentialExpression/analyze_diff_expr.pl \
--matrix ../Trinity_trans.TMM.EXPR.matrix -P 1e-3 -C 2
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.*
-rw-rw-r-- 1 ycl6 ycl6 3141 Nov 1 16:02 diffExpr.P1e-3_C2.matrix
-rw-rw-r-- 1 ycl6 ycl6 5119 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.centered.dat
-rw-rw-r-- 1 ycl6 ycl6 9026 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.centered.genes_vs_samples_heatmap.pdf
-rw-rw-r-- 1 ycl6 ycl6 4734 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.dat
-rw-rw-r-- 1 ycl6 ycl6 278 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.sample_cor.dat
-rw-rw-r-- 1 ycl6 ycl6 5620 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.log2.sample_cor_matrix.pdf
-rw-rw-r-- 1 ycl6 ycl6 4073 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.R
-rw-rw-r-- 1 ycl6 ycl6 31811 Nov 1 16:02 diffExpr.P1e-3_C2.matrix.RData
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
Sp_ds Sp_hs Sp_log Sp_plat
TRINITY_DN12_c0_g2_i1 709.850 85.668 115.982 1045.466
TRINITY_DN210_c0_g1_i1 141.757 461.640 1326.107 247.219
TRINITY_DN28_c0_g1_i1 7488.551 55125.342 918.115 3457.890
TRINITY_DN45_c0_g1_i1 53513.610 23278.810 804.181 31629.110
TRINITY_DN62_c0_g1_i1 369.557 17.474 160.725 4146.868
TRINITY_DN50_c0_g1_i1 46416.667 21292.999 146.745 9106.154
TRINITY_DN261_c0_g1_i1 19545.983 347.357 105.047 25441.557
TRINITY_DN16_c0_g2_i1 1615.428 732.431 77.323 1950.319
TRINITY_DN39_c0_g1_i1 241.880 291.168 0.000 0.000
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.
The diffExpr.P1e-3_C2.matrix.log2.sample_cor_matrix.pdf
shows the pairwise sample correlation matrix.
Last updated
Was this helpful?