Closed halterc closed 1 year ago
I have encountered a similar issue (but with different error code, see below). I believe it is due to the fact that this particular sample has only 1 cell left after filtering.
Pre-filtering cells with scGate...
### Detected a total of 1 pure 'Target' cells (2.13% of total)
[1] "46 out of 47 ( 98% ) non-pure cells removed. Use filter.cells=FALSE to avoid pre-filtering"
Performing log-normalization
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
|====================== | 33%
Error: BiocParallel errors
1 remote errors, element index: 4
8 unevaluated and other errors
first remote error:
Error: All cells in the object being added must match the cells in this object
My initial thought is that handling these samples by assigning the cells to a NULL functional.cluster without running the projection or classification seems like the best way to handle this, although I'm currently just splitting by group, as there are large group effects in this dataset with some samples with few cells (and this solution is quick for exploratory purposes).
ProjecTILs version
> packageVersion("ProjecTILs")
[1] ‘3.1.0’
I agree, this is not desirable behavior. We will try to address it in the next update, will post here when it's solved.
Best -m
Hello! we pushed an update to the latest version (v3.1.1), to better handle cases with zero or 1 cells. I have tested several scenarios, and it appears to play nice in all cases. But if you still experience similar problems please report here again.
Best -m
Thank you, that was quick! I will test it out with my data as well.
Thanks, Jen
If there are e.g. zero (or too little?) CD8TILs to project onto the CD8TIL reference map the error it throws is not very obvious:
`object.CD8T.projected <- Run.ProjecTILs(query = object.CD8T, ref = ref, filter.cell = TRUE, skip.normalize = T, split.by = "Sample", ncores = 4)
[1] "Using assay RNA for SampleXYZ" Pre-filtering cells with scGate... Error: BiocParallel errors 1 remote errors, element index: 25 45 unevaluated and other errors first remote error: Error in run_scGate_singlemodel(data, model = model[[m]], k.param = k.param, : object 'pure.cells' not found`
-> Skip sample and through informative warning if it has zero (or too little) cells to project onto map