HOMER

Software for motif discovery and next-gen sequencing
analysis

Analysis of RNA-Seq data with R/Bioconductor

There are several different tools available for RNA-Seq
analysis. The statistical computing environment R has
been a popular platform for the development of RNA-seq
analysis algorithms. This is partially a result of the
strong microarray community that developed the Bioconductor
suite of programs.

The primary input files for this analysis are sorted BAM
files. You should have a single BAM file for each
experiment you want to analyze. Technical replicates
should be combined into single BAM files (this type of
analysis is primarily meant for biological replicates).

Installing Bioconductor and packages in R

Go here
to get a full description about how what bioconductor is
and how to install it (below is the cheat sheet):
After you start R, type:

# load the script from the internet that is used in
install bioconductorsource("http://bioconductor.org/biocLite.R")

# Each of these commands tells Bioconductor to download
and install each packagebiocLite("GenomicRanges")
biocLite("GenomicFeatures")biocLite("Rsamtools")biocLite("DESeq")biocLite("edgeR")biocLite("org.Mm.eg.db")

Counting Reads in annotated genes (using R)

# load the transcript annotation file from UCSC.
Make sure to enter the correct genome versiontxdb=makeTranscriptDbFromUCSC(genome='mm9',tablename='refGene')
# Use the function transcriptsBy(txdb,'gene') for the
whole genic region instead of just exons
ex_by_gene=exonsBy(txdb,'gene')

# load the samtools library for Rlibrary(Rsamtools)

# read the sequencing read alignment into R (combine with
next step to save memory)reads1r1=readBamGappedAlignments("exp1.rep1.bam")reads1r2=readBamGappedAlignments("exp1.rep2.bam")reads2r1=readBamGappedAlignments("exp2.rep1.bam")reads2r2=readBamGappedAlignments("exp2.rep2.bam")
#repeat as necessary for more samples)