Perform DE analysis (Trinity)

Create count matrix

Locate util/abundance_estimates_to_matrix.pl in the trinityrnaseq-2.2.0 distribution, and run
1
cd ~/LSLNGS2015/Trinity
2
3
PATH_TO_TRINITY/util/abundance_estimates_to_matrix.pl \
4
--est_method RSEM --out_prefix Trinity_genes \
5
RSEM_Sp_ds/Sp_ds.genes.results RSEM_Sp_hs/Sp_hs.genes.results \
6
RSEM_Sp_log/Sp_log.genes.results RSEM_Sp_plat/Sp_plat.genes.results
7
8
PATH_TO_TRINITY/util/abundance_estimates_to_matrix.pl \
9
--est_method RSEM --out_prefix Trinity_trans \
10
RSEM_Sp_ds/Sp_ds.isoforms.results RSEM_Sp_hs/Sp_hs.isoforms.results \
11
RSEM_Sp_log/Sp_log.isoforms.results RSEM_Sp_plat/Sp_plat.isoforms.results
Copied!

Options

--est_method RSEM or eXpress
--out_prefixoutput file prefix (default: 'matrix')
--cross_sample_fpkm_norm choose one of the three normalization methods, TMM, UpperQuartile, none (default: TMM)

Create count matrices

Files created for gene-level count matrix:
ls -la Trinity_genes*
1
-rw-rw-r-- 1 ycl6 ycl6 16023 Nov 1 15:29 Trinity_genes.counts.matrix
2
-rw-rw-r-- 1 ycl6 ycl6 19097 Nov 1 15:29 Trinity_genes.TMM.EXPR.matrix
3
-rw-rw-r-- 1 ycl6 ycl6 16429 Nov 1 15:29 Trinity_genes.TPM.not_cross_norm
4
-rw-rw-r-- 1 ycl6 ycl6 236 Nov 1 15:29 Trinity_genes.TPM.not_cross_norm.TMM_info.txt
Copied!
Files created for transcript-level count matrix:
ls -la Trinity_trans*
1
-rw-rw-r-- 1 ycl6 ycl6 17516 Nov 1 15:33 Trinity_trans.counts.matrix
2
-rw-rw-r-- 1 ycl6 ycl6 20646 Nov 1 15:33 Trinity_trans.TMM.EXPR.matrix
3
-rw-rw-r-- 1 ycl6 ycl6 17923 Nov 1 15:33 Trinity_trans.TPM.not_cross_norm
4
-rw-rw-r-- 1 ycl6 ycl6 239 Nov 1 15:33 Trinity_trans.TPM.not_cross_norm.TMM_info.txt
Copied!
We use head to examine the first 10 lines of the counts matrix
head Trinity_genes.counts.matrix
1
Sp_ds Sp_hs Sp_log Sp_plat
2
TRINITY_DN7_c0_g2 0.00 56.99 12.00 0.00
3
TRINITY_DN329_c0_g1 7.00 1.00 1.00 4.00
4
TRINITY_DN197_c0_g1 218.00 179.00 210.00 257.00
5
TRINITY_DN244_c0_g1 36.00 7.00 15.00 28.00
6
TRINITY_DN121_c0_g1 1.24 1.00 1.43 2.57
7
TRINITY_DN37_c0_g2 0.00 0.00 0.00 0.00
8
TRINITY_DN172_c0_g1 74.00 28.00 19.00 84.00
9
TRINITY_DN258_c0_g1 61.00 47.00 91.00 56.00
10
TRINITY_DN263_c0_g1 31.00 21.00 48.00 87.00
Copied!
head Trinity_trans.counts.matrix
1
Sp_ds Sp_hs Sp_log Sp_plat
2
TRINITY_DN42_c0_g3_i1 0.00 0.00 1.00 0.00
3
TRINITY_DN132_c0_g1_i1 0.00 0.00 0.00 2.59
4
TRINITY_DN169_c0_g1_i1 7.00 4.00 4.00 5.00
5
TRINITY_DN70_c0_g1_i1 49.00 24.00 62.00 78.00
6
TRINITY_DN148_c0_g1_i1 18.00 7.00 13.00 17.00
7
TRINITY_DN41_c0_g2_i1 0.00 0.00 0.00 0.00
8
TRINITY_DN180_c0_g1_i1 3.00 2.00 6.00 2.00
9
TRINITY_DN258_c0_g1_i1 61.00 47.00 91.00 56.00
10
TRINITY_DN51_c0_g2_i1 179.00 86.00 38.99 242.00
Copied!

Perform pairwise sample comparisons using edgeR

Locate Analysis/DifferentialExpression/run_DE_analysis.pl in the trinityrnaseq-2.2.0 distribution, and run
1
PATH_TO_TRINITY/Analysis/DifferentialExpression/run_DE_analysis.pl \
2
--matrix Trinity_genes.counts.matrix --method edgeR --dispersion 0.1 \
3
--output edgeR_genes
4
5
PATH_TO_TRINITY/Analysis/DifferentialExpression/run_DE_analysis.pl \
6
--matrix Trinity_trans.counts.matrix --method edgeR --dispersion 0.1 \
7
--output edgeR_trans
Copied!

Options

--matrix matrix of raw read counts, not the normalized values
--method choose one of the three methods: edgeR, DESeq, DESeq2
--dispersion edgeR dispersion value (default: 0.1)
--output name of directory to place outputs

Output

The edgeR_genes and edgeR_trans folders contain the pairwise sample comparisons results (*.edgeR.DE_results) and M-A and Volcano plots (*.MA_n_Volcano.pdf) for the gene-level and transcript-level analysis respectively.
For example, ls -la edgeR_genes
1
-rw-rw-r-- 1 ycl6 ycl6 24373 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_hs.edgeR.DE_results
2
-rw-rw-r-- 1 ycl6 ycl6 11851 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_hs.edgeR.DE_results.MA_n_Volcano.pdf
3
-rw-rw-r-- 1 ycl6 ycl6 943 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_hs.Sp_ds.vs.Sp_hs.EdgeR.Rscript
4
-rw-rw-r-- 1 ycl6 ycl6 25617 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_log.edgeR.DE_results
5
-rw-rw-r-- 1 ycl6 ycl6 12205 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_log.edgeR.DE_results.MA_n_Volcano.pdf
6
-rw-rw-r-- 1 ycl6 ycl6 947 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_log.Sp_ds.vs.Sp_log.EdgeR.Rscript
7
-rw-rw-r-- 1 ycl6 ycl6 25580 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_plat.edgeR.DE_results
8
-rw-rw-r-- 1 ycl6 ycl6 11986 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_plat.edgeR.DE_results.MA_n_Volcano.pdf
9
-rw-rw-r-- 1 ycl6 ycl6 951 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_ds_vs_Sp_plat.Sp_ds.vs.Sp_plat.EdgeR.Rscript
10
-rw-rw-r-- 1 ycl6 ycl6 23186 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_hs_vs_Sp_log.edgeR.DE_results
11
-rw-rw-r-- 1 ycl6 ycl6 11703 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_hs_vs_Sp_log.edgeR.DE_results.MA_n_Volcano.pdf
12
-rw-rw-r-- 1 ycl6 ycl6 947 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_hs_vs_Sp_log.Sp_hs.vs.Sp_log.EdgeR.Rscript
13
-rw-rw-r-- 1 ycl6 ycl6 24305 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_hs_vs_Sp_plat.edgeR.DE_results
14
-rw-rw-r-- 1 ycl6 ycl6 12091 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_hs_vs_Sp_plat.edgeR.DE_results.MA_n_Volcano.pdf
15
-rw-rw-r-- 1 ycl6 ycl6 951 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_hs_vs_Sp_plat.Sp_hs.vs.Sp_plat.EdgeR.Rscript
16
-rw-rw-r-- 1 ycl6 ycl6 25862 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_log_vs_Sp_plat.edgeR.DE_results
17
-rw-rw-r-- 1 ycl6 ycl6 12468 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_log_vs_Sp_plat.edgeR.DE_results.MA_n_Volcano.pdf
18
-rw-rw-r-- 1 ycl6 ycl6 955 Nov 1 15:39 Trinity_genes.counts.matrix.Sp_log_vs_Sp_plat.Sp_log.vs.Sp_plat.EdgeR.Rscript
Copied!
Use head to examine one of the *.DE_results file.
head edgeR_genes/Trinity_genes.counts.matrix.Sp_log_vs_Sp_plat.edgeR.DE_results
1
logFC logCPM PValue FDR
2
TRINITY_DN251_c0_g1 9.6363125893139 14.5848472303309 2.13430918067156e-20 6.36024135840125e-18
3
TRINITY_DN309_c0_g1 8.42206045708238 15.072565164338 4.66076951545597e-19 6.94454657802939e-17
4
TRINITY_DN141_c0_g1 7.28961205941505 16.5621549422877 3.83166387777312e-17 3.80611945192129e-15
5
TRINITY_DN140_c0_g1 7.20427411091638 17.276544976763 5.13012298906905e-17 3.82194162685644e-15
6
TRINITY_DN261_c0_g1 7.69101068079639 14.0295251279574 8.91346030061623e-17 4.9619821474267e-15
7
TRINITY_DN114_c0_g2 7.43363511545729 14.8478356898501 9.99056808206717e-17 4.9619821474267e-15
8
TRINITY_DN18_c0_g1 7.08644807744307 15.1120605756225 4.47617278549774e-16 1.9055707001119e-14
9
TRINITY_DN32_c0_g2 -8.10320051153684 12.7123152654971 5.16395182569354e-16 1.92357205507084e-14
10
TRINITY_DN232_c0_g1 -11.9109106883623 12.0284022343563 8.15080537391968e-16 2.69882222380896e-14
Copied!
Use WinSCP to download the PDF file and view it on your PC or laptop.
Below shows the M-A and Volcano plots in the PDF file named Trinity_genes.counts.matrix.Sp_log_vs_Sp_plat.edgeR.DE_results.MA_n_Volcano.pdf
MA_n_Volcano
Last modified 1yr ago