## ----options, cache=FALSE, include=FALSE, results='hide', message=FALSE, warning=FALSE---- knitr::opts_chunk$set(图2)align="center", cache=FALSE, error=FALSE, fig.width=6,fig. align="center", cache=FALSE, error=FALSE,height=6, autodep=TRUE, out。宽度= " 600 px”。height="600px", message=FALSE, warning=FALSE, results="hide", echo=TRUE, eval=TRUE) options(getClass.msg=FALSE) ## ----case-only----------------------------------------------------------- library(impulse sede2) lsSimulatedData <- simulateDataSetImpulseDE2(vecTimePointsA = rep(seq(1,8),3), vecTimePointsB = NULL, vecBatchesA = NULL, vecBatchesB = NULL, scaNConst = 30, scaNImp = 10, scaNLin = 10, scaNSig = 10, scaMuBatchEffect = NULL, scaSDBatchEffect = NULL,dirOutSimulation = NULL) # #——case-only-annotation,结果= '减价 '---------------------------- lsSimulatedData dfAnnotation # #——case-only2美元 ---------------------------------------------------------- objectImpulseDE2 < - runImpulseDE2 (matCountData = lsSimulatedData matObservedCounts美元,dfAnnotation = lsSimulatedData dfAnnotation美元,boolCaseCtrl = FALSE, vecConfounders = NULL, scaNProc = 1 ) ## ---- case-only-results,结果= '减价 '------------------------------- 头(objectImpulseDE2 dfImpulseDE2Results美元)# #——case-only-batch ----------------------------------------------------- 库(ImpulseDE2) lsSimulatedData < simulateDataSetImpulseDE2 (vecTimePointsA =代表(seq (8), 3), vecTimePointsB = NULL, vecBatchesA = c(代表(B1, 8),代表(B2, 8),代表(B3, 8)), vecBatchesB = NULL, scaNConst = 30, scaNImp = 10, scaNLin = 10, scaNSig = 10, scaMuBatchEffect = 1, scaSDBatchEffect = 0.2,dirOutSimulation = NULL) ## ----case-only-batch-annotation, results='markdown'---------------------- lsSimulatedData$dfAnnotation ## ----case-only-batch2---------------------------------------------------- objectImpulseDE2 <- runImpulseDE2(matCountData = lsSimulatedData$matObservedCounts, dfAnnotation = lsSimulatedData$dfAnnotation, boolCaseCtrl = FALSE, vecConfounders = c("Batch"), scaNProc = 1) ## ----case-only-batch-results,results='markdown'------------------------- head(objectImpulseDE2$ dfimpulse sede2results) ## ----plot-genes---------------------------------------------------------- #继续脚本的“批处理效果”库(ggplot2) lsgplotsGenes <- plotGenes(vecGeneIDs = NULL, scaNTopIDs = 10, objectImpulseDE2 = objectImpulseDE2, boolCaseCtrl = FALSE, dirOut = NULL, strFileName = NULL, vecRefPval = NULL,strNameRefMethod = NULL)打印(lsgplotsGenes [[1 ]]) ## ---- case-control-batch -------------------------------------------------- lsSimulatedData < simulateDataSetImpulseDE2 (vecTimePointsA =代表(seq (8), 3), vecTimePointsB =代表(seq (8), 3), vecBatchesA = c(代表(B1, 8),代表(B2, 8),代表(B3, 8)), vecBatchesB = c(代表(C1, 8),代表(C2, 8),代表(“C3”,8)),scaNConst = 30, scaNImp = 10, scaNLin = 10, scaNSig = 10, scaMuBatchEffect = 1, scaSDBatchEffect = 0.1,dirOutSimulation = NULL) # #——case-control-annotation,结果= '减价 '------------------------- lsSimulatedData dfAnnotation # #——case-control2美元 ------------------------------------------------------- objectImpulseDE2 < - runImpulseDE2 (matCountData = lsSimulatedData matObservedCounts美元,dfAnnotation = lsSimulatedData dfAnnotation美元,boolCaseCtrl = TRUE, vecConfounders = c(“批处理”),scaNProc = 1 ) ## ---- case-control-results,结果= '减价 '---------------------------- 头(objectImpulseDE2 dfImpulseDE2Results美元)# #——瞬变 ---------------------------------------------------------- 库(ImpulseDE2) lsSimulatedData < simulateDataSetImpulseDE2 (vecTimePointsA =代表(seq (8), 3), vecTimePointsB = NULL, vecBatchesA = c(代表(B1, 8),代表(B2, 8),代表(B3, 8)), vecBatchesB = NULL, scaNConst = 0, scaNImp = 100, scaNLin = 0, scaNSig = 0, scaMuBatchEffect = 1, scaSDBatchEffect = 0.2,dirOutSimulation = NULL) objectImpulseDE2 <- runimpulse - de2 (matCountData = lsSimulatedData$ matobservable counts, dfAnnotation = lsSimulatedData$dfAnnotation, boolCaseCtrl = FALSE, vecConfounders = c("Batch"), boolIdentifyTransients = TRUE, scaNProc = 1) ## ----transient-results, results='markdown'------------------------------- head(objectImpulseDE2$dfImpulseDE2Results) ## ----heatmap------------------------------------------------------------- # Continuing script of "Transiently regulated genes" library(ComplexHeatmap) lsHeatmaps <- plotHeatmap( objectImpulseDE2 = objectImpulseDE2, strCondition = "case", boolIdentifyTransients = TRUE, scaQThres = 0.01) draw(lsHeatmaps$complexHeatmapRaw) # Heatmap based on normalised counts ## ----session------------------------------------------------------------- sessionInfo()