Skip to content

Consider warning users when using relative abundances with scCODA #889

@maltekuehl

Description

@maltekuehl

Description of feature

Somebody (definitely not me) might have naively used relative sample-level abundances (columns summing to 1) as inpus to scCODA and gotten very confused at log2FCs of 0 for all variables.

Having a small warning that absolute abundances are required might prevent others (again, definitely not me) from losing half an hour debugging. Should be straightforward to detect. In prepare (https://github.com/scverse/pertpy/blob/main/pertpy/tools/_coda/_base_coda.py#L168), we have:

sample_adata.obsm["sample_counts"] = np.sum(sample_adata.X, axis=1)

This could be checked to be > 1, if I understand the code correctly.

Thanks!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions