1. RSEM的安装和使用:

  $ tar -xzf RSEM-1.3.0.tar.gz

  $ cd RSEM-1.3.0

  $ make

  $ make install

  $ echo 'PATH=$PATH:/.../' >> ~/.bashrc

  $ source ~/.bashrc

               $ extract-transcript-to-gene-map-from-trinity trinity.fa gene_map (可选,转录本和基因都做)

  $ rsem-prepare-reference --bowtie2 ref_trinity.fasta ref_trinity

              $ rsem-prepare-reference --transcript-to-gene-map ene_map --bowtie2 ref_trinity.fasta ref_trinity(可选,转录本和基因都做)

  $ rsem-calculate-expression -p 48 --paired-end --bowtie2 read1.fq read2.fq ref_trinity sample.name

              $ rsem-plot-model sample.name sample.name.diagnostic.pdf (可选,看一些统计)

 

  $ /util/abundance_estimates_to_matrix.pl --est_method RSEM sampleA.results sampleB.results --name_sample_by_basedir     (Build Transcript and Gene Expression Matrices)

                         --name_sample_by_basedir requires that you have all your expression results organized into separate directories

                         The 'counts.matrix' file is used for downstream analyses of differential expression. The TMM.EXPR.matrix file is used as the gene expression matrix in most other analyses.

                         例子:/util/abundance_estimates_to_matrix.pl --est_method kallisto --gene_trans_map Trinity.fasta.gene_trans_map --out_prefix kallisto --name_sample_by_basedir sampleA/abundance.tsv sampleB/abundance.tsv

  $ R

   > source("https://bioconductor.org/biocLite.R")

   > biocLite("edgeR")

   > biocLite("limma")

   > biocLite("DESeq2")

   > biocLite("ctc")

   > biocLite("Biobase")

   > install.packages("gplots")

   > install.packages("ape")

 $ /Analysis/DifferentialExpression/run_DE_analysis.pl --matrix genes.counts.matrix --method edgeR --samples_file samples_described.txt   (Differential Expression Analysis)

            建立samples_described.txt

                    cond_A sampleA
                    cond_A sampleB
                    cond_B sampleC
                    cond_B sampleD

  $ /Analysis/DifferentialExpression/analyze_diff_expr.pl --matrix TMM.EXPR.matrix -P 1e-3 -C 3   (Extracting and clustering differentially expressed transcripts)