## ----style, echo = FALSE, results = 'asis'--------------------------------- knitr::opts_chunk$set( eval=as.logical(Sys.getenv("KNITR_EVAL", "TRUE")), cache=as.logical(Sys.getenv("KNITR_CACHE", "TRUE"))) ## ----setup, echo=FALSE----------------------------------------------------- suppressPackageStartupMessages({ library(Biostrings) library(GenomicRanges) library(SummarizedExperiment) library(airway) library(rtracklayer) library(ShortRead) library(GenomicAlignments) library(RNAseqData.HNRNPC.bam.chr14) library(VariantAnnotation) }) ## ----install, eval=FALSE--------------------------------------------------- # source("https://bioconductor.org/biocLite.R") # biocLite(c("DESeq2", "org.Hs.eg.db")) ## ----require--------------------------------------------------------------- library(GenomicRanges) ## ----help-bioc, eval=FALSE------------------------------------------------- # help(package="GenomicRanges") # vignette(package="GenomicRanges") # vignette(package="GenomicRanges", "GenomicRangesHOWTOs") # ?GRanges ## ----five-lines------------------------------------------------------------ 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) abline(fit) ## ----help-r, eval=FALSE---------------------------------------------------- # class(fit) # methods(class=class(fit)) # methods(plot) # ?"plot" # ?"plot.formula" ## ----classes-and-methods--------------------------------------------------- library(Biostrings) dna <- DNAStringSet(c("AACAT", "GGCGCCT")) reverseComplement(dna) ## -------------------------------------------------------------------------- data(phiX174Phage) phiX174Phage letterFrequency(phiX174Phage, "GC", as.prob=TRUE) ## ----classes-and-methods-discovery, eval=FALSE----------------------------- # class(dna) # ?"DNAStringSet-class" # ?"reverseComplement,DNAStringSet-method"