### R code from vignette source 'vignettes/Rsubread/inst/doc/Rsubread.Rnw' ################################################### ### code chunk number 1: Rsubread.Rnw:77-81 ################################################### library(Rsubread) ref <- system.file("extdata","reference.fa",package="Rsubread") path <- system.file("extdata",package="Rsubread") buildindex(basename=file.path(path,"reference_index"),reference=ref) ################################################### ### code chunk number 2: Rsubread.Rnw:102-104 ################################################### reads <- system.file("extdata","reads.txt",package="Rsubread") align(index=file.path(path,"reference_index"),readfile1=reads,output_file=file.path(path,"alignResults.SAM")) ################################################### ### code chunk number 3: Rsubread.Rnw:139-143 ################################################### library(Rsubread) reads <- system.file("extdata","reads.txt",package="Rsubread") x <- qualityScores(filename=reads,nreads=1000) boxplot(x) ################################################### ### code chunk number 4: Rsubread.Rnw:150-156 ################################################### library(Rsubread) reads <- system.file("extdata","reads.txt",package="Rsubread") ## Fraction of A,T,G and C in the entire dataset x <- atgcContent(filename=reads,basewise=FALSE) ## Fraction of A,T,G and C at each base location across all the reads xb <- atgcContent(filename=reads,basewise=TRUE) ################################################### ### code chunk number 5: Rsubread.Rnw:163-166 ################################################### library(Rsubread) results <- system.file("extdata","alignResults.SAM",package="Rsubread") propmapped(results)