### R代码从小插图来源的CSAR。Rnw ' ################################################### ### 代码块1号:设置 ################################################### 选项(宽度= 60)选项(继续= " ")选项(提示= " R > ") ################################################### ### 代码块2号:loadData ################################################### 图书馆(CSAR)数据(“CSAR-dataset”);head(sampleSEP3_test) head(controlSEP3_test) nhitsS<-mappedReads2Nhits(sampleSEP3_test,file="sampleSEP3_test",chr=c("CHR1v01212004"),chrL=c(10000)) nhitsC<-mappedReads2Nhits(controlSEP3_test,file="controlSEP3_test",chr=c("CHR1v01212004"),chrL=c(10000)) nhitsC$filenames nhitsS$filenames ################################################### ###代码块号3:runScore ################################################### 测试< -ChIPseqScore(控制= nhitsC示例= nhitsS文件=“测试”,倍= 10000)测试文件名美元赢得< -sigWin(测试)头(赢得)score2wig(测试、文件=“test.wig”倍= 10000)d < -distance2Genes(赢=赢,人造石铺地面= TAIR8_genes_test) d基因< -genesWithPeaks (d)(基因 ) ################################################### ### 代码块4号:runPermutation ################################################### permutatedWinScores(nn=1,sample=sampleSEP3_test,control=controlSEP3_test,fileOutput="test",chr=c("CHR1v01212004"),chrL=c(100000)) permutatedWinScores(nn=2,sample=sampleSEP3_test,control=controlSEP3_test,fileOutput="test",chr=c("CHR1v01212004"),chrL=c(100000)) nulldist<-getPermutatedWinScores(file="test",nn=1:2) getThreshold(winscores=values(win)$score,permutatedScores=nulldist,FDR=.05)################################################### ### 代码块5号:CSAR。Rnw: 98 - 99 ################################################### sessionInfo ()