Skip to content

Instantly share code, notes, and snippets.

View Eemaa26's full-sized avatar

Emma Sunnassee Eemaa26

View GitHub Profile
d3 = function() {
var d3 = {
version: "3.2.7"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window;
try {
d3_document.createElement("div").style.setProperty("opacity", 0, "");
# RNA-seq: differential gene expression analysis
*[back to course contents](..)*
This is an introduction to RNAseq analysis involving reading in count data from an RNAseq experiment, exploring the data using base R functions and then analysis with the DESeq2 package.
## Install and load packages
First, we'll need to install some add-on packages. Most generic R packages are hosted on the Comprehensive R Archive Network (CRAN, <http://cran.us.r-project.org/>). To install one of these packages, you would use `install.packages("packagename")`. You only need to install a package once, then load it each time using `library(packagename)`. Let's install the **gplots** and **calibrate** packages.
## See http://gettinggeneticsdone.blogspot.com/2013/06/customize-rprofile.html
## Load packages
library(BiocInstaller)
## Don't show those silly significanct stars
options(show.signif.stars=FALSE)
## Do you want to automatically convert strings to factor variables in a data.frame?
## WARNING!!! This makes your code less portable/reproducible.
library(ganalytics)
library(plyr)
library(ggplot2)
###########################################
# Change profileId to your own GA profile #
###########################################
gaQuery <- GaQuery(profileId = 123456789)
# Define our date range - end date is yesterday by default
@Eemaa26
Eemaa26 / Demos-from-packages.r
Last active August 29, 2015 14:13 — forked from meyera/R-Librarys.R
Demos available by pack
#### Demos in R
## see available demos by package
demo(package = .packages(all.available = TRUE))
##### demos in 'HH'
demo('likert-paper-noFormula', package='HH')
demo('likert-paper',package="HH")
demo(topic='likertMosaic-paper', package = "HH")
@Eemaa26
Eemaa26 / app.R
Last active August 29, 2015 14:11 — forked from wch/app.R
# By default, the directories in .libPaths() aren't writable on shinyapps.io, so
# create a subdir where we'll install our package.
if (!file.exists("R-lib")) {
dir.create("R-lib")
}
# Unfortunately, there's no way to get deployapp() to ignore this directory, so
# make sure to remove it locally before you call deployapp(). This can be done
# with:
# unlink("pkgInst/R-lib", recursive = TRUE)
* Reproducible Research
* Makefiles
* [Make for Reproducibility](http://zmjones.com/make/)
* [Why use Make](http://bost.ocks.org/mike/make/)
* [O'Reilly Make Book](http://oreilly.com/catalog/make3/book/)
* [Minimal Make, A Quick Tour](http://kbroman.org/minimal_make/)
* [Make for R and LaTeX](http://robjhyndman.com/hyndsight/makefiles/)
* [Software Carpentry Make Lessons](http://software-carpentry.org/v4/make/index.html)
* Misc
* [Best Practices for Software and Reproducible Research](http://openresearchsoftware.metajnl.com/article/view/jors.ay/63)
###############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@Eemaa26
Eemaa26 / Shiny-GGplotEval.r
Last active August 29, 2015 14:11 — forked from wch/.gitignore
Shiny-GGplotEval.r
R-Code
======
@Eemaa26
Eemaa26 / Shiny_readDat.r
Last active August 29, 2015 14:11
Shiny_ReadData -- AWESOME
require("shiny")
require("foreign")
#Then simply run:
shiny:::runGist("https://gist.github.com/SachaEpskamp/5796467")