velocyto.R icon indicating copy to clipboard operation
velocyto.R copied to clipboard

filter.genes.by.cluster.expression error

Open Junedays opened this issue 2 years ago • 0 comments

When we use the clusters and embedding information from seurat, if some of the clusters have only one cell, then, when we do the rna velocity following lines in this tutorial http://pklab.med.harvard.edu/velocyto/notebooks/R/DG1.nb.html

emat <- filter.genes.by.cluster.expression(emat,cluster.label,min.max.cluster.average = 0.5) nmat <- filter.genes.by.cluster.expression(nmat,cluster.label,min.max.cluster.average = 0.05)

it might cause an error like : Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) : 'x' must be an array of at least two dimensions.

To avoid this error, we could remove those clusters with only one cell .

Hope this could be fixed in the next version

Junedays avatar Dec 01 '22 05:12 Junedays