Skip to content

QC bug for nGene #341

@mvfki

Description

@mvfki

Mainly related to https://github.com/welch-lab/liger/blob/master/R/preprocess.R#L264

This implementation captures the number of value entries per cell from a sparse representation (CSC format, mat@x). When it happens that there are explicit zero in mat@x, the nGene calculated gets wrong. Although this is never expected in regular use, it happens that an ambient RNA subtraction tool, such as SoupX, keeps all value entries there even if some values have already been subtracted to zero (i.e. Matrix::drop0() not called after subtraction).

Planned fix: modify the line referred to at the beginning of this issue to calculate based on explicit values. Or, do drop0() at object creation to avoid the situation. I'd prefer the latter because it's more memory efficient, and the current nGene calculation is way faster than looking at explicit values.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions