## ----options, results='hide', echo=FALSE-------------------------------------- #options(width=65) options('useFancyQuotes' = FALSE, continue = " ", digits = 3) ## ----cite, eval=TRUE---------------------------------------------------------- citation("QuasR") ## ----install, eval=FALSE------------------------------------------------------ # if (!require("BiocManager")) # install.packages("BiocManager") # BiocManager::install("QuasR") ## ----loadLibraries, eval=TRUE------------------------------------------------- suppressPackageStartupMessages({ library(QuasR) library(BSgenome) library(Rsamtools) library(rtracklayer) library(GenomicFeatures) library(Gviz) }) ## ----help1, eval=FALSE-------------------------------------------------------- # help.start() ## ----loadQuasRLibrary, eval=FALSE--------------------------------------------- # library(QuasR) ## ----help2, eval=FALSE-------------------------------------------------------- # ?preprocessReads ## ----help3, eval=FALSE-------------------------------------------------------- # help("preprocessReads") ## ----assign, eval=FALSE------------------------------------------------------- # x <- 2 ## ----ls, eval=FALSE----------------------------------------------------------- # ls() ## ----printObject, eval=FALSE-------------------------------------------------- # x ## ----SampleSession1, eval=TRUE------------------------------------------------ file.copy(system.file(package = "QuasR", "extdata"), ".", recursive = TRUE) ## ----SampleSession2, eval=TRUE------------------------------------------------ sampleFile <- "extdata/samples_chip_single.txt" genomeFile <- "extdata/hg19sub.fa" proj <- qAlign(sampleFile, genomeFile) proj ## ----SampleSession3, eval=TRUE------------------------------------------------ qQCReport(proj, "extdata/qc_report.pdf") ## ----SampleSession4, eval=TRUE------------------------------------------------ library(rtracklayer) library(GenomicFeatures) annotFile <- "extdata/hg19sub_annotation.gtf" txStart <- import.gff(annotFile, format = "gtf", feature.type = "start_codon") promReg <- promoters(txStart, upstream = 500, downstream = 500) names(promReg) <- mcols(promReg)$transcript_name promCounts <- qCount(proj, query = promReg) promCounts ## ----sampleFileSingle, echo=FALSE, results="asis"----------------------------- cat(paste(readLines(system.file(package = "QuasR", "extdata", "samples_chip_single.txt")), collapse = "\n")) ## ----sampleFilePaired, echo=FALSE, results="asis"----------------------------- cat(paste(readLines(system.file(package = "QuasR", "extdata", "samples_rna_paired.txt")), collapse = "\n")) ## ----sampleFile, eval=FALSE--------------------------------------------------- # sampleFile1 <- system.file(package="QuasR", "extdata", # "samples_chip_single.txt") # sampleFile2 <- system.file(package="QuasR", "extdata", # "samples_rna_paired.txt") ## ----