### R code from vignette source 'vignettes/TSCAN/inst/doc/TSCAN.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: TSCAN.Rnw:45-48 ################################################### library(TSCAN) data(lpsdata) procdata <- preprocess(lpsdata) ################################################### ### code chunk number 2: TSCAN.Rnw:57-59 ################################################### STAT2expr <- log2(lpsdata["STAT2",]+1) lpspseudotime <- TSPpseudotime(procdata, geneexpr = STAT2expr, dim = 2) ################################################### ### code chunk number 3: TSCAN.Rnw:64-65 ################################################### plotpseudotime(lpspseudotime, markerexpr = STAT2expr) ################################################### ### code chunk number 4: TSCAN.Rnw:72-75 ################################################### diffval <- difftest(procdata,lpspseudotime[[1]]) #Selected differentially expressed genes under qvlue cutoff of 0.05 head(row.names(diffval)[diffval$qval < 0.05]) ################################################### ### code chunk number 5: TSCAN.Rnw:79-80 ################################################### singlegeneplot(STAT2expr, lpspseudotime[[1]]) ################################################### ### code chunk number 6: TSCAN.Rnw:89-94 ################################################### subpopulation <- data.frame(cell = colnames(procdata), sub = ifelse(grepl("Unstimulated",colnames(procdata)),0,1), stringsAsFactors = FALSE) #Comparing ordering with or without marker gene information order1 <- TSPpseudotime(procdata, geneexpr = STAT2expr, dim = 2) order2 <- TSPpseudotime(procdata, dim = 2) orders <- list(order1[[1]],order2[[1]]) ################################################### ### code chunk number 7: TSCAN.Rnw:98-99 ################################################### orderscore(subpopulation, orders)