library(bigMap)
# first 50 principal components
load('./mcsk15.RData')
# +++ ./mcsk15/start.R
library(bigMap)
# +++ load data
load('~/omics/macosko15/mcsk.RData')
X <- mcsk15$clust_id
# +++ perplexities
ppx.list <- round(nrow(X) * c(.005, .01, .05, .10, .20, .30, .40, .50), 0)
# +++ run
m.list <- lapply(ppx.list, function(ppx)
{
m <- bdm.init(X, ppx = ppx, threads = 20)
m <- bdm.ptsne(X, m, theta = 0.5, threads = 20, layers = 2)
m <- bdm.knp(X, m, threads = 20)
m <- bdm.hlCorr(X, m, threads = 20)
m
})
# +++ save
save(m.list, file = '~/omics/macosko15/bm456/mlist.RData')
Submit job:
$ qsub -pe make 20 -l h_vmem=4G Rsckt ./mcsk15/start.R
load('./mlist.RData')
nulL <- lapply(m.list, function(m) bdm.cost(m))
nulL <- lapply(m.list, function(m) {
m$lbls <- mcsk15$cell_type
bdm.ptsne.plot(m, class.pltt = mcsk15$cell_type_pltt, ptsne.cex = 0.3)
})
hlTable <- sapply(m.list, function(m) summary(m$hlC)[4])
hlTable <- matrix(hlTable, nrow = 1)
colnames(hlTable) <- sapply(m.list, function(m) m$ppx$ppx)
rownames(hlTable) <- c('<hlC>')
knitr::kable(hlTable, caption = 'hl-Correlation') %>%
kable_styling(full_width = F)
| 224 | 448 | 2240 | 4481 | 8962 | 13442 | 17923 | 22404 | |
|---|---|---|---|---|---|---|---|---|
| <hlC> | 0.1325026 | 0.1582668 | 0.123278 | 0.1445667 | 0.1204305 | 0.2877653 | 0.2562428 | 0.2939314 |
bdm.knp.plot(m.list)
rTimes <- sapply(m.list, function(m) c(m$ppx$t[3], m$t$epoch, m$t$ptsne[3], (m$ppx$t[3] +m$t$ptsne[3])))
rTimes <- round(rTimes /60, 2)
colnames(rTimes) <- sapply(m.list, function(m) m$ppx$ppx)
rownames(rTimes) <- c('betas', 'epoch', 'ptsne', 'total')
knitr::kable(rTimes, caption = 'Computation times (min)') %>%
kable_styling(full_width = F)
| 224 | 448 | 2240 | 4481 | 8962 | 13442 | 17923 | 22404 | |
|---|---|---|---|---|---|---|---|---|
| betas | 0.13 | 0.13 | 0.19 | 0.24 | 0.36 | 0.47 | 0.51 | 0.51 |
| epoch | 0.06 | 0.06 | 0.08 | 0.10 | 0.15 | 0.20 | 0.21 | 0.21 |
| ptsne | 2.37 | 2.50 | 3.32 | 4.41 | 6.41 | 8.35 | 8.99 | 8.96 |
| total | 2.50 | 2.63 | 3.50 | 4.65 | 6.77 | 8.82 | 9.51 | 9.47 |
Intel(R) Xeon(R) CPU E5-2650 v3 2.30GHz, 32Mb cache, 20 cores, 4GB/core RAM.