### R代码从vignette源'ReQON。Rnw ' ################################################### ### 代码块1号:风格 ################################################### BiocStyle:乳胶 () ################################################### ### 代码块2号:ReQON。Rnw: 46 - 54岁 ################################################### 库(ReQON)库(seqbias)图书馆(Rsamtools) reads_fn <系统。文件(“额外/例子。bam”,包= " seqbias”)#排序bam排序< - sortBam (reads_fn, tempfile()) #指数bam indexBam(排序 ) ################################################### ### 代码块3号:ReQON。Rnw: 67 - 88 ################################################### ref_fn < -系统。文件(“额外/例子。fa", package = "seqbias") ref_f <- FaFile(ref_fn)打开。FaFile (ref_f) seq < - scanFa (ref_f) len < -长度(seq [[1]]) ref < -矩阵(nrow = len ncol = 3) #染色体/序列的名字在第一列ref[1] < -代表(“seq1”,len) #序列在第2列ref [2] < - c (1: len) #在第三列str引用基地< - toString (subseq (seq [[1]], 1, len)) s < - strsplit (str, NULL) ref [3] < - s[[1]] #查看参考文件参考[1:5,]#保存参考文件编写。表(参考文件=“ref_seq.txt”,9月=“t \”,引用= FALSE, row.names = FALSE, col.names = FALSE ) ################################################### ### 代码块数量4:ReQON。Rnw: 109 - 117 ################################################### # 设置培训地区reg < -粘贴(“seq1:1——“莱恩,9 = " ")诊断< - ReQON (Recalibrated_example排序。”bam”地区= reg RefSeq = " ref_seq.txt”,nerr = 20, nraf = 0.25, plotname = " Recalibrated_example_plots.pdf”)#删除参考序列文件分开(“ref_seq.txt " ) ################################################### ### 代码块5号:ReQON。Rnw: 148 - 153 ################################################### # 显示错误计数的阅读位置诊断ReadPosErrors #情节ReadPosErrorPlot(诊断ReadPosErrors美元,美元startpos = 0 ) ################################################### ### 代码块6号:ReQON。Rnw: 164 - 166 ################################################### # 情节QualFreqPlot(诊断QualFreqBefore美元,诊断QualFreqAfter美元 ) ################################################### ### 代码块7号:ReQON。Rnw:188-200 ################################################### #从ReQON输出报告FWSE $FWSE # plot before re校准和报告FWSE f1 <- FWSEplot(诊断$ErrRatesBefore,诊断$QualFreqBefore, col = "blue", main_title = "报告和经验质量:之前")f1 # plot after re校准和报告FWSE f2 <- FWSEplot(诊断$ErrRatesAfter,诊断$QualFreqAfter, col = "red", main_title = "报告和经验质量:之后")f2