Error in scv$pl$velocity_embedding_stream
Opened this issue · 2 comments
Hi
when i studied with this Tutorial,
https://github.com/JEFworks-Lab/veloviz/blob/package_extras/docs/scVeloVignette.md
I got this error:
#Error: AttributeError: can't set attribute 'categories'
somebody know what happened?
thank you
Hi,
Thanks for trying out the package! Can you please provide the part of the code that generated the error?
Thanks!
thanks for your reply:
The code was listed as below:
`veloviz = buildVeloviz(
curr = curr, proj = proj,
normalize.depth = TRUE,
use.ods.genes = TRUE,
alpha = 0.05,
pca = TRUE,
nPCs = 20,
center = TRUE,
scale = TRUE,
k = 20,
similarity.threshold = 0.2,
distance.weight = 1,
distance.threshold = 1,
weighted = TRUE,
verbose = FALSE
)
emb.veloviz <- veloviz$fdg_coords
plotEmbedding(emb.veloviz,
colors = cell.cols[rownames(emb.veloviz)],
main='VeloViz with dynamical velocity',
xlab = "VeloViz X", ylab = "VeloViz Y",
alpha = 0.8,
cex.lab = 1.5)
plotVeloviz(veloviz)
a.plot <- adata
#remove unconnected cells from anndata object
connected.cells <- rownames(emb.veloviz)
a.plot.vv <- a.plot[a.plot$obs_names$isin(connected.cells)]
a.plot.vv$obsm$update("X_veloviz1" = emb.veloviz)
#get colors
plot.cols = unique(cell.cols)
c = unlist(sapply(c(1:length(col)), function(x) which(plot.cols == col[x])))
plot.cols = plot.cols[c]
#plotting params
pt.size = 50
dnsty = 0.7
plt.size = c(3.5,3.5)
scv$pl$velocity_embedding_stream(a.plot.vv,
basis='umap',
density = 0.8,
cutoff_perc = 0,
n_neighbors = 20L,
title = "",legend_fontoutline = 2,
size = 50,
alpha = 0.6,
legend_fontsize = 12,
linewidth = 1.5,
show = FALSE,
figsize = c(5,5),
palette = plot.cols)
`
All the code run successfully, except scv$pl$velocity_embedding_stream. I got error"Error: AttributeError: can't set attribute 'categories'"
thanks