Leonardo Collado-Torres
July 23rd, 2013
derfinder2 is a faster implementation than derfinder.
The goal is to perform:
Fast differential expression analysis of RNA-seq data at base-pair resolution.
derfinder2
Uses F-statistics
Has no test for expression
Does not assume a markov chain process: could affect the results!
derfinder
Uses moderated t-statistics
Multi-group comparisons are not implemented
Can take 4+ weeks for chr 1 (single core)
Has exploratory plot functions
library(derfinder2)
## Load the coverage from the BAM files
datadir <- system.file("extdata", "brainData", package="derfinder2")
coverageInfo <- makeCoverage(chr="21", datadir=datadir, samplepatt="*accepted_hits.bam$", bamterm=NULL, verbose=FALSE)
## Define params for calculateStats()
group <- brainInfo$outcome
adjustvars <- brainInfo[, c("sex", "age", "left.hemisph", "pmi", "brainpH")]
## Obtain the F-statistics
stats <- calculateStats(coverageInfo, group=group, colsubset=NULL, adjustvars=adjustvars, nonzero=TRUE, verbose=FALSE)
Explore the output
## Components
names(stats)
[1] "coverage" "position" "fstats"
## F-statistics as an Rle
stats$fstats
numeric-Rle of length 5958 with 1850 runs
Lengths: 1 1 ... 1
Values : 0.470267822419682 0.647430917411578 ... 1.12253412492073
Etc…
## If needed
install.packages("devtools")
## Actual installation steps
library(devtools)
install_github("derfinder2", "lcolladotor")
This presentation was a demo to try out the new RStudio presentation tools.
For more information check this.
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] BSgenome.Hsapiens.UCSC.hg19_1.3.19 BSgenome_1.28.0
[3] Rsamtools_1.12.3 Biostrings_2.28.0
[5] GenomicRanges_1.12.4 IRanges_1.18.2
[7] BiocGenerics_0.6.0 derfinder2_0.0.1
[9] knitr_1.3
loaded via a namespace (and not attached):
[1] bitops_1.0-5 codetools_0.2-8 digest_0.6.3 evaluate_0.4.4
[5] formatR_0.8 stats4_3.0.1 stringr_0.6.2 tools_3.0.1
[9] zlibbioc_1.6.0