# #——style-Sweave eval = TRUE,呼应= FALSE,结果= '飞机 '------------------- BiocStyle:乳胶 () ## ---- 快速入门,消息= FALSE, eval = FALSE ----------------------------------- # # 库(MMDiff2) #库(MMDiffBamSubset) # ExperimentData = ' BSgenome.Mmusculus.UCSC < -列表(基因组。mm9', # dataDir=system。文件(“extdata”,包=“MMDiffBamSubset”),# sampleSheet =“Cfp1.csv”)#元数据< -列表(“ExpData”= ExperimentData) #多< - DBAmmd(元数据)(“Cfp1-Peaks”)# #数据多< - setRegions(多党民主运动,山峰)#多< - getPeakReads (MMD) #多< - estimateFragmentCenters (MMD) #多< - compHists (MMD) #多< - compDists (MMD) #多< - setContrast(多党民主运动,对比= byCondition) #多< - compPvals (MMD) # res <——reportResults (MMD) # #设置,消息= FALSE --------------------------------------------------- # 加载库软件包(MMDiff2) # #——dataload消息= FALSE ------------------------------------------------ # 数据加载包库(MMDiffBamSubset) #创建元数据:ExperimentData = ' BSgenome.Mmusculus.UCSC < -列表(基因组。mm9', dataDir = system。文件(“extdata”,包=“MMDiffBamSubset”),sampleSheet =“Cfp1.csv”)的元数据< -列表(“ExpData”= ExperimentData) # #——地区,消息= FALSE ------------------------------------------------- 数据(Cfp1-Peaks)多党民主运动< - DBAmmd(元数据)多党民主运动< - setRegions(多党民主运动,山峰)多<——getPeakReads (MMD) # #——fragC消息= FALSE,标记= '隐藏 '----------------------------------- 多党民主运动<——estimateFragmentCenters (MMD) # #——嘘,消息= FALSE --------------------------------------------------- 多党民主运动< - compHists(多党民主运动,本。length=20, thelpos ="Center") ## ----peakplot1, markup='hide', message=FALSE, fig.width=7, fig.height=3, fig.align=' Center '---- plotPeak(MMD, Peak. Center)id = ' 241 ',阴谋。输入= FALSE, whichPos = "中心 ") ## ---- 主题specifcation ---------------------------------------------------- 库(MotifDb)主题< -查询(查询(MotifDb Mmusculus”),“E2F ') ## ---- peakplot2、消息= FALSE,无花果。width=7, fig.height=4, fig.align='center'----id = ' 241 ', NormMethod = NULL,阴谋。input =FALSE, thelpos ="Center", Motifs= Motifs,Motifcutoff="80%") ## ----peakplot3,message=FALSE,fig.;width=7, fig.height=5, fig.align='center'---- data("mm9-Genes") names(GR) <- GR$tx_name GR <- list(UCSCKnownGenes = GR) plotPeak(MMD,峰。id = ' 241 ', NormMethod = NULL,阴谋。输入= FALSE, whichPos = "中心",主题=图案,伊斯兰教纪元= GR) # #,经销,消息= FALSE,包括= FALSE ----------------------------------- 多党民主运动< - compDists(多党民主运动,dist.method =“多”,运行。parallel = FALSE) ## ----contrast-------------------------------------------------------------- MMD <- setContrast(MMD,contrast='byCondition') ## ----contrast2,message=FALSE, include=FALSE-------------------------------- group1 <- Samples(MMD)$Condition=='1' names(group1) <- Samples(MMD)$SampleID group2 <- Samples(MMD)$Condition=='2' names(group2) <- Samples(MMD)$SampleID contrast <- list(group1=group1, group2=group2, name1='WT,REsc', name2='Null') #setContrast(MMD,contrast=contrast) ## ----diffTest-------------------------------------------------------------- MMD <- compPvals(MMD,dist.method='MMD') ## -------------------------------------------------------------------------- plotDists(MMD, dist.method='MMD',whichContrast=1, diff.method='MMD.locfit', bUsePval=FALSE, th=0.1, title=NULL, what=3, xlim=NULL,ylim=NULL,Peak.IDs=NULL, withLegend=TRUE) ## -------------------------------------------------------------------------- res <- reportResults(MMD) Peak.ids <- names(res) plotPeak(MMD, Peak.id=Peak.ids[1], NormMethod=NULL,plot.input = FALSE, whichPos="Center",Motifs=motifs, anno=GR,whichContrast = 1) dev.off() plotDISTS4Peak(MMD,Peak.id=Peak.ids[1],dist.method='MMD', whichContrast=1,Zoom=TRUE) ## ----shinyApp,eval=FALSE--------------------------------------------------- # runShinyMMDiff2(MMD) ## -------------------------------------------------------------------------- sessionInfo()