-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hello,
I am running the combining datasets tutorial with the MOB dataset.
Everything works fine until the first call of vizAllTopics:
library(STdeconvolve)
## load built in data
data(mOB)
pos <- mOB$pos
cd <- mOB$counts
annot <- mOB$annot
mobCorpus <- preprocess(t(mOB$counts),
extractPos = FALSE,
selected.genes = NA,
nTopGenes = NA,
genes.to.remove = NA,
removeAbove = NA,
removeBelow = NA,
min.reads = 100,
min.lib.size = 100,
min.detected = 1,
ODgenes = TRUE,
nTopOD = NA,
od.genes.alpha = 0.05,
gam.k = 5,
verbose = TRUE)
## choose optimal number of cell-types
ldas <- fitLDA(t(as.matrix(mobCorpus$corpus)), Ks = seq(2, 15, by = 1), ncores = 7)
## get best model results
optLDA <- optimalModel(models = ldas, opt = 12)
## extract deconvolved cell-type proportions (theta) and transcriptional profiles (beta)
results <- getBetaTheta(optLDA, perc.filt = 0.05, betaScale = 1000)
deconProp <- results$theta
deconGexp <- results$beta
## visualize deconvolved cell-type proportions
vizAllTopics(deconProp,
pos,
groups = annot,
group_cols = rainbow(length(levels(annot))),
r=0.4)
The error I get is:
Error in `$<-.data.frame`(`*tmp*`, "Pixel.Groups", value = c("3: Outer Plexiform Layer", :
replacement has 260 rows, data has 0
The only part of the code that I changed was in the fitLDA function, which I changed the input from corpus to mobCorpus$corpus since it was throwing an error.
Thanks for your help/time!
Metadata
Metadata
Assignees
Labels
No labels