Skip to content

Instantly share code, notes, and snippets.

@sidderb
sidderb / server.R
Created January 30, 2013 09:52
A Shiny/R app to display the Illumina human body map dataset. I have not included the expression data due to it's size (19Gb) but this should work with any RNA-seq data set analysed with a TopHat->Cufflinks->CuffDiff pipeline.
library(shiny)
library(deSolve)
library(cummeRbund)
# load cuffDiff data, must be in top dir and called cuffData.db:
cuff = readCufflinks()
shinyServer(function(input,output) {
getData = reactive(function() {
@sidderb
sidderb / strandedBamImport
Last active March 15, 2016 05:44
Visualising stranded RNA-seq data with Gviz/Bioconductor
# A function to extract reads from a stranded RNA-seq BAM file. Intended to be used as a custom importFunction
# in the DataTrack constructor of Bioconductor's Gviz package. With properly stranded data this allows the plotting
# of coverage tracks from each strand of the genome.
#
# 6 Nov 2014 - bensidders at gmail dot com
#
# UPDATE: 10 Sep 2015:
# The funciton can now plot data from libraries created in either orientation. Due to the manner in which Gviz calls
# this function, you need to specify the library orientation with a global variable "libType" to be one of
# "fr-firststrand" or "fr-secondstrand".