* using log directory 'd:/Rcompile/CRANpkg/local/3.6/bcTSNE.Rcheck' * using R version 3.6.3 (2020-02-29) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'bcTSNE/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'bcTSNE' version '0.10.0' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... NOTE Packages suggested but not available for checking: 'kBET', 'lisi', 'harmony', 'dlfUtils' * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'bcTSNE' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * loading checks for arch 'i386' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * loading checks for arch 'x64' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [6s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking sizes of PDF files under 'inst/doc' ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... ** running examples for arch 'i386' ... [6s] OK ** running examples for arch 'x64' ... [5s] OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [22s] WARNING Error(s) in re-building vignettes: --- re-building 'simExperiment.Rnw' using knitr ordinary text without R code label: unnamed-chunk-2 (with options) List of 1 $ warning: logi FALSE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pkgLoaded <- suppressPackageStartupMessages({ c(require(bcTSNE), require(data.table), require(batchelor), require(kBET), require(splatter), require(scater), require(Rtsne), require(lisi), require(harmony), require(dlfUtils), require(xtable)) }) pkgLoaded <- all(pkgLoaded) ## Uncomment to install kBet & lisi ## Note: the packages will require compilation # if (!require(drat)) {install.packages("drat"); library(drat)} # drat::addRepo("daynefiler") # install.packages(c("lisi", "kBET", "harmony", "dlfUtils")) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:27 2021 ------## Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'kBET' Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'lisi' Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'harmony' Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'dlfUtils' ordinary text without R code label: unnamed-chunk-3 (with options) List of 1 $ eval: logi TRUE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { p <- newSplatParams(seed = 1234, batchCells = rep(200, 4), batch.facLoc = 0.2, batch.facScale = 0.1, group.prob = c(0.1, 0.2, 0.3, 0.4), de.facLoc = 0.1, de.facScale = 0.4) sim <- splatSimulate(p, method = "groups", verbose = FALSE) sizeFactors(sim) <- librarySizeFactors(sim) sim <- normalize(sim) sim <- normalize(sim, return_log = FALSE) assay(sim, "centered") <- t(scale(t(normcounts(sim)), center = TRUE, scale = FALSE)) Z <- model.matrix( ~ -1 + factor(colData(sim)$Batch)) grp <- factor(sim$Group) bch <- as.integer(factor(sim$Batch)) } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:39 2021 ------## ordinary text without R code label: calcMet (with options) List of 1 $ echo: logi FALSE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { calcMetrics <- function(Y, bchLst) { calcSil <- function(x) { s <- batch_sil(pca.data = list(x = Y), batch = x, nPCs = 2) 1 - abs(s) } calcKBET <- function(x) { kBET(Y, batch = x, do.pca = FALSE, plot = FALSE)$average } calcPCA <- function(x) { pcRegression(pca.data = prcomp(Y), batch = x, n_top = 2)$pcReg } sil <- sapply(bchLst, calcSil) kbet <- sapply(bchLst, calcKBET) lisi <- compute_lisi(Y, meta_data = as.data.frame(bchLst), label_colnames = names(bchLst)) lisi <- colMeans(lisi) sizes <- sapply(bchLst, function(x) length(unique(x))) lisi <- (lisi - 1)/(sizes - 1) pca <- sapply(bchLst, calcPCA) res <- list(sil = sil, kbet = kbet, lisi = lisi, pca = pca) do.call(cbind, res) } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:39 2021 ------## ordinary text without R code label: pltFunc (with options) List of 1 $ echo: logi FALSE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { pltSimRes <- function(Y, lbl) { par(mar = c(4, 1, 2, 1) + 0.1) plot(Y, ann = FALSE, axes = FALSE, bty = "n", col = grp, pch = bch) title(main = lbl) legend(x = grconvertX(0.2, "nfc"), y = line2user(2, 1), legend = rep(" ", 4), pch = 1:4, xpd = NA, bty = "n", horiz = TRUE, xjust = 0, yjust = 0.5) legend(x = grconvertX(0.2, "nfc"), y = line2user(3, 1), legend = rep(" ", 4), pch = 16, col = 1:4, xpd = NA, bty = "n", horiz = TRUE, xjust = 0, yjust = 0.5) text(x = grconvertX(0.2, "nfc"), y = line2user(2:3, 1), labels = c("Batch:", "Cell-type:"), xpd = NA, adj = c(1, 0.5)) } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: unnamed-chunk-4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ res <- vector(mode = "list", length = 6) names(res) <- c("btcc", "btlc", "hmlc", "hmcc", "mnn", "tsne") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: tsne ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { set.seed(1234) res$tsne <- Rtsne(t(assay(sim, "centered")), inital_dims = 50)$Y pltSimRes(res$tsne, "t-SNE") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: bctsne-cc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { set.seed(1234) res$btcc <- bctsne(t(assay(sim, "centered")), Z, k = 50)$Y pltSimRes(res$btcc, "bcTSNE-centered") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: bctsne-lc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { set.seed(1234) res$btlc <- bctsne(t(logcounts(sim)), Z, k = 50)$Y pltSimRes(res$btlc, "bcTSNE-logcounts") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: harmony (with options) List of 1 $ message: logi FALSE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { set.seed(1234) sim <- runPCA(sim, 50, exprs_values = "logcounts") sim <- RunHarmony(sim, group.by.vars = "Batch") res$hmlc = Rtsne(reducedDim(sim, "HARMONY"), pca = FALSE)$Y pltSimRes(res$hmlc, "Harmony-logcounts") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: harmony-centered (with options) List of 1 $ message: logi FALSE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { set.seed(1234) sim <- runPCA(sim, 50, exprs_values = "centered") sim <- RunHarmony(sim, group.by.vars = "Batch") res$hmcc = Rtsne(reducedDim(sim, "HARMONY"), pca = FALSE)$Y pltSimRes(res$hmcc, "Harmony-centered") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: mnn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { set.seed(1234) tmp <- mnnCorrect(sim, batch = factor(sim$Batch)) res$mnn <- Rtsne(t(assay(tmp, "corrected")), initial_dims = 50)$Y rm(tmp) pltSimRes(res$mnn, "mnnRes") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: comp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { batchList <- list(batch = factor(sim$Batch), cellType = factor(sim$Group)) met <- lapply(res, calcMetrics, bchLst = batchList) } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: figs (with options) List of 2 $ echo : logi FALSE $ results: chr "hide" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { met <- lapply(met, round, 4) met <- lapply(met, as.data.table, keep.rownames = TRUE) for (i in seq_along(met)) met[[i]][ , alg := names(met)[i]] met <- rbindlist(met) met <- met[ , .(rn, alg, sil, kbet, lisi, pca)][order(rn, alg)] met[alg == "btcc", alg := "bcTSNE-centered"] met[alg == "btlc", alg := "bcTSNE-logcounts"] met[alg == "hmlc", alg := "Harmony-logcounts"] met[alg == "hmcc", alg := "Harmony-centered"] met[alg == "mnn", alg := "MNN"] met[alg == "tsne", alg := "\\textit{t}-SNE"] met[rn == "batch", rn := "Batch"] met[rn == "cellType", rn := "Cell type"] met[ , tmp := seq_along(alg), by = rn] met[tmp != 1, rn := ""] met[ , tmp := NULL] setnames(met, c("", "", "SIL", "kBET", "iLSIS", "PcR")) } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: unnamed-chunk-5 (with options) List of 2 $ echo : logi FALSE $ results: chr "asis" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (pkgLoaded) { print(xtable(met, digits = 4),hline.after = c(-1, 0, 6, nrow(met)), include.rownames = FALSE, sanitize.text.function = I) } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: unnamed-chunk-6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code label: unnamed-chunk-7 (with options) List of 3 $ eval : logi FALSE $ echo : logi FALSE $ resuls: chr "hide" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ R code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## For internal use, save the sim results to the untracked inst/notrack folder # saveRDS(res, "../inst/notrack/sim.res") # saveRDS(met, "../inst/notrack/sim.metrics") # saveRDS(sim, "../inst/notrack/sim.sce") # saveRDS(as.data.table(colData(sim)), "../inst/notrack/sim.cellMeta") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##------ Fri May 14 04:32:40 2021 ------## ordinary text without R code --- finished re-building 'simExperiment.Rnw' runtime error R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application. * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 1 NOTE