genomic data
1296 software packages; also…
Package ‘landing page’
A package needs to be installed once, using the instructions on the package landing page (e.g., DESeq2).
source("https://bioconductor.org/biocLite.R")
biocLite(c("DESeq2", "org.Hs.eg.db"))
biocLite()
installs Bioconductor, CRAN, and github packages.
Once installed, the package can be loaded into an R session
library(GenomicRanges)
and the help system queried interactively, as outlined above:
help(package="GenomicRanges")
vignette(package="GenomicRanges")
vignette(package="GenomicRanges", "GenomicRangesHOWTOs")
?GRanges
x <- rnorm(1000)
y <- x + rnorm(1000)
df <- data.frame(X=x, Y=y)
plot(Y ~ X, df)
fit <- lm(Y ~ X, df)
anova(fit)
## Analysis of Variance Table
##
## Response: Y
## Df Sum Sq Mean Sq F value Pr(>F)
## X 1 999.71 999.71 929.56 < 2.2e-16 ***
## Residuals 998 1073.32 1.08
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
abline(fit)
data.frame()
plot()
, lm()
, anova()
, abline()
: methods defined on generics to transform instances
Discovery and help
class(fit)
methods(class=class(fit))
methods(plot)
?"plot"
?"plot.formula"
tab completion!
Example: working with DNA sequences
library(Biostrings)
dna <- DNAStringSet(c("AACAT", "GGCGCCT"))
reverseComplement(dna)
## A DNAStringSet instance of length 2
## width seq
## [1] 5 ATGTT
## [2] 7 AGGCGCC
data(phiX174Phage)
phiX174Phage
## A DNAStringSet instance of length 6
## width seq names
## [1] 5386 GAGTTTTATCGCTTCCATGACG...GATTGGCGTATCCAACCTGCA Genbank
## [2] 5386 GAGTTTTATCGCTTCCATGACG...GATTGGCGTATCCAACCTGCA RF70s
## [3] 5386 GAGTTTTATCGCTTCCATGACG...GATTGGCGTATCCAACCTGCA SS78
## [4] 5386 GAGTTTTATCGCTTCCATGACG...GATTGGCGTATCCAACCTGCA Bull
## [5] 5386 GAGTTTTATCGCTTCCATGACG...GATTGGCGTATCCAACCTGCA G97
## [6] 5386 GAGTTTTATCGCTTCCATGACG...GATTGGCGTATCCAACCTGCA NEB03
letterFrequency(phiX174Phage, "GC", as.prob=TRUE)
## G|C
## [1,] 0.4476420
## [2,] 0.4472707
## [3,] 0.4472707
## [4,] 0.4470850
## [5,] 0.4472707
## [6,] 0.4470850
Discovery and help
class(dna)
?"DNAStringSet-class"
?"reverseComplement,DNAStringSet-method"
Step 1. Experimental design
Step 2. Wet-lab sequence preparation
Step 3. (Illumina) Sequencing
Step 4. Alignment
Step 5. Reduction
Step 6. Analysis
Step 7. Comprehension