### R code from vignette source 'vignettes/QuasR/inst/doc/QuasR.Rnw' ################################################### ### code chunk number 1: style ################################################### BiocStyle::latex(width=80, bibstyle="unsrturl") ################################################### ### code chunk number 2: options ################################################### #options(width=65) options('useFancyQuotes' = FALSE, continue=" ", digits=3) ################################################### ### code chunk number 3: cite ################################################### citation("QuasR") ################################################### ### code chunk number 4: install (eval = FALSE) ################################################### ## source("http://www.bioconductor.org/biocLite.R") ## biocLite("QuasR") ################################################### ### code chunk number 5: loadLibraries ################################################### library(QuasR) library(BSgenome) library(Rsamtools) library(rtracklayer) library(GenomicFeatures) library(Gviz) ################################################### ### code chunk number 6: help1 (eval = FALSE) ################################################### ## help.start() ################################################### ### code chunk number 7: loadQuasRLibrary (eval = FALSE) ################################################### ## library(QuasR) ################################################### ### code chunk number 8: help2 (eval = FALSE) ################################################### ## ?preprocessReads ################################################### ### code chunk number 9: help3 (eval = FALSE) ################################################### ## help("preprocessReads") ################################################### ### code chunk number 10: assign (eval = FALSE) ################################################### ## x <- 2 ################################################### ### code chunk number 11: ls (eval = FALSE) ################################################### ## ls() ################################################### ### code chunk number 12: printObject (eval = FALSE) ################################################### ## x ################################################### ### code chunk number 13: SampleSession1 ################################################### file.copy(system.file(package="QuasR", "extdata"), ".", recursive=TRUE) ################################################### ### code chunk number 14: SampleSession2 ################################################### sampleFile <- "extdata/samples_chip_single.txt" genomeFile <- "extdata/hg19sub.fa" proj <- qAlign(sampleFile, genomeFile) proj ################################################### ### code chunk number 15: SampleSession3 ################################################### qQCReport(proj, "extdata/qc_report.pdf") ################################################### ### code chunk number 16: SampleSession4 ################################################### library(rtracklayer) library(GenomicFeatures) annotFile <- "extdata/hg19sub_annotation.gtf" txStart <- import.gff(annotFile, format="gtf", asRangedData=FALSE, feature.type="start_codon") promReg <- promoters(txStart, upstream=500, downstream=500) names(promReg) <- mcols(promReg)$transcript_name promCounts <- qCount(proj, query=promReg) promCounts ################################################### ### code chunk number 17: sampleFile (eval = FALSE) ################################################### ## sampleFile1 <- system.file(package="QuasR", "extdata", ## "samples_chip_single.txt") ## sampleFile2 <- system.file(package="QuasR", "extdata", ## "samples_rna_paired.txt") ################################################### ### code chunk number 18: