bimberlabinternal / CellMembrane

An R package with wrappers and pipelines for single cell RNA-seq analysis
10 stars 3 forks source link

fixes bug in creation of pcts matrix #250

Closed gboggy2 closed 5 months ago

gboggy2 commented 5 months ago

Hi all, I noticed I was still getting errors with the latest version. This should fix the problem, at least it did for me.

bbimber commented 5 months ago

Hi @gboggy2 -

i think the existing code would fail with single cells, but I believe oyu want to change it to something more like this. The alternative would to be give it two drop=FALSE arguments.

pcts <- counts[,rownames(seuratObj@meta.data)[seuratObj$KeyField == keyfield],drop = FALSE]

i did not test this code