Analyzing RNA-Seq data for differential gene expression
Materials and Software
- Data files
- RNA-Seq data in FASTQ format (Ex: dataset1.fastq, dataset2.fastq)
- Genome sequence files
- Genome sequence in FASTA format (Ex: REL606.fna)
- Genome sequence gene annotations in GFF3 format (Ex: REL606.gff3)
- Read mapper software
- BWA
- Download BWA
- To build, just type "make" in the source code directory.
- To install, move the executable "bwa" to somewhere in your $PATH, like $HOME/local/bin.
- For usage see the BWA manual.
- Bowtie2
- Download Bowtie
- To build, just type "make" in the source code directory.
- Add this directory to your $PATH or move bowtie, and bowtie-* star executable to your $PATH
- breseq
- R statistics package
- Bioconductor R modules
- library(edgeR)
- library(DESEQ)
Commands
Align reads to reference genome
Using BWA
First, index your genome so BWA can map read to it:
$bwa index REL606.fna
Then, align each data set:
$bwa aln REL606.fna dataset1.fastq > datasetX.sai
And convert to SAM format (assumes single-end data):
$bwa samse REL606.fna datasetX.sai datasetX.fastq > datasetX.sam
Using bowtie2
First, index your genome so bowtie2 can map read to it:
$bowtie2-build REL606.fna REL606
Then, align each data set:
$bowtie2 -x REL606 -U datasetX.fastq --phred33 -S REL606.sam
Optionally, add the
--local
flag if your reads do not map end-to-end.
Count reads mapping to genes
breseq RNASEQ -f REL606.fna -r REL606.gbk -o datasetX.count.tab datasetX.sam
Convert alignments to BAM
And convert to BAM format (assumes single-end data):
$samtools faidx REL606.fna
$samtools import REL606.fna datasetX.sam datasetX.unsorted.bam
$samtools sort datasetX.unsorted.bam datasetX
$samtools index datasetX.bam
Now you can use IGV to view them.
Analyze differential gene expression
library(DESEQ)
Topic revision: r4 - 2012-01-30 - 12:57:59 - Main.JeffreyBarrick